{"id":26658861,"url":"https://github.com/denisecase/buzzline-03-case","last_synced_at":"2025-03-25T10:17:07.069Z","repository":{"id":272218756,"uuid":"897593152","full_name":"denisecase/buzzline-03-case","owner":"denisecase","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-13T01:45:06.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T02:36:20.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denisecase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-02T22:33:44.000Z","updated_at":"2025-01-13T01:45:09.000Z","dependencies_parsed_at":"2025-01-13T02:36:22.111Z","dependency_job_id":null,"html_url":"https://github.com/denisecase/buzzline-03-case","commit_stats":null,"previous_names":["denisecase/buzzline-03-case"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fbuzzline-03-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fbuzzline-03-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fbuzzline-03-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fbuzzline-03-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisecase","download_url":"https://codeload.github.com/denisecase/buzzline-03-case/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245440550,"owners_count":20615633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T10:17:06.523Z","updated_at":"2025-03-25T10:17:07.059Z","avatar_url":"https://github.com/denisecase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# buzzline-03-case\n\nStreaming data does not have to be simple text.\nMany of us are familiar with streaming video content and audio (e.g. music) files. \n\nStreaming data can be structured (e.g. csv files) or\nsemi-structured (e.g. json data). \n\nWe'll work with two different types of data, and so we'll use two different Kafka topic names. \nSee [.env](.env). \n\n\n## Task 1. Use Tools from Module 1 and 2\n\nBefore starting, ensure you have completed the setup tasks in \u003chttps://github.com/denisecase/buzzline-01-case\u003e and \u003chttps://github.com/denisecase/buzzline-02-case\u003e first. \nPython 3.11 is required. \n\n## Task 2. Copy This Example Project and Rename\n\nOnce the tools are installed, copy/fork this project into your GitHub account\nand create your own version of this project to run and experiment with.\nName it `buzzline-03-yourname` where yourname is something unique to you.\nFollow the instructions in [FORK-THIS-REPO.md](https://github.com/denisecase/buzzline-01-case/blob/main/docs/FORK-THIS-REPO.md).\n    \n\n## Task 3. Manage Local Project Virtual Environment\n\nFollow the instructions in [MANAGE-VENV.md](https://github.com/denisecase/buzzline-01-case/blob/main/docs/MANAGE-VENV.md) to:\n1. Create your .venv\n2. Activate .venv\n3. Install the required dependencies using requirements.txt.\n\n## Task 4. Start Zookeeper and Kafka (2 Terminals)\n\nIf Zookeeper and Kafka are not already running, you'll need to restart them.\nSee instructions at [SETUP-KAFKA.md] to:\n\n1. Start Zookeeper Service ([link](https://github.com/denisecase/buzzline-02-case/blob/main/docs/SETUP-KAFKA.md#step-7-start-zookeeper-service-terminal-1))\n2. Start Kafka ([link](https://github.com/denisecase/buzzline-02-case/blob/main/docs/SETUP-KAFKA.md#step-8-start-kafka-terminal-2))\n\n## Task 5. Start a JSON Producer\n\nIn VS Code, open a terminal.\nUse the commands below to activate .venv, and start the producer. \n\nWindows:\n\n```shell\n.venv\\Scripts\\activate\npy -m producers.json_producer_case\n```\n\nMac/Linux:\n```zsh\nsource .venv/bin/activate\npython3 -m producers.json_producer_case\n```\n\nWhat did we name the topic used with JSON data? \nHint: See the producer code and [.env](.env).\n\n## Task 6. Start a JSON Consumer\n\nConsumers process streaming data in real time.\n\nIn VS Code, open a NEW terminal in your root project folder. \nUse the commands below to activate .venv, and start the consumer. \n\nWindows:\n```shell\n.venv\\Scripts\\activate\npy -m consumers.json_consumer_case\n```\n\nMac/Linux:\n```zsh\nsource .venv/bin/activate\npython3 -m consumers.json_consumer_case\n```\n\nWhat did we name the topic used with JSON data? \nHint: See the consumer code and [.env](.env).\n\n## Task 7. Start a CSV Producer\n\nFollow a similar process to start the csv producer. \nYou will need to:\n1. Open a new terminal. \n2. Activate your .venv.\n3. Know the command that works on your machine to execute python (e.g. py or python3).\n4. Know how to use the -m (module flag to run your file as a module).\n5. Know the full name of the module you want to run. Hint: Look in the producers folder.\n\nWhat did we name the topic used with csv data? \nHint: See the producer code and [.env](.env).\n\n## Task 8. Start a CSV Consumer\n\nFollow a similar process to start the csv consumer. \nYou will need to:\n1. Open a new terminal. \n2. Activate your .venv.\n3. Know the command that works on your machine to execute python (e.g. py or python3).\n4. Know how to use the -m (module flag to run your file as a module).\n5. Know the full name of the module you want to run. Hint: Look in the consumers folder.\n\nWhat did we name the topic used with csv data? \nHint: See the consumer code and [.env](.env).\n\n## About the Smart Smoker (CSV Example)\n\nA food stall occurs when the internal temperature of food plateaus or \nstops rising during slow cooking, typically between 150°F and 170°F. \nThis happens due to evaporative cooling as moisture escapes from the \nsurface of the food. The plateau can last for hours, requiring \nadjustments like wrapping the food or raising the cooking temperature to \novercome it. Cooking should continue until the food reaches the \nappropriate internal temperature for safe and proper doneness.\n\nThe producer simulates a smart food thermometer, sending a temperature \nreading every 15 seconds. The consumer monitors these messages and \nmaintains a time window of the last 5 readings. \nIf the temperature varies by less than 2 degrees, the consumer alerts \nthe BBQ master that a stall has been detected. This time window helps \ncapture recent trends while filtering out minor fluctuations.\n\n## Later Work Sessions\nWhen resuming work on this project:\n1. Open the folder in VS Code. \n2. Start the Zookeeper service.\n3. Start the Kafka service.\n4. Activate your local project virtual environment (.env).\n\n## Save Space\nTo save disk space, you can delete the .venv folder when not actively working on this project.\nYou can always recreate it, activate it, and reinstall the necessary packages later. \nManaging Python virtual environments is a valuable skill. \n\n## License\nThis project is licensed under the MIT License as an example project. \nYou are encouraged to fork, copy, explore, and modify the code as you like. \nSee the [LICENSE](LICENSE.txt) file for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fbuzzline-03-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisecase%2Fbuzzline-03-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fbuzzline-03-case/lists"}