{"id":29016554,"url":"https://github.com/memgraph/example-streaming-app","last_synced_at":"2025-08-02T15:34:48.514Z","repository":{"id":45053254,"uuid":"379992257","full_name":"memgraph/example-streaming-app","owner":"memgraph","description":"An example repository on how to start building graph applications on streaming data. Just clone and start building 💻 💪","archived":false,"fork":false,"pushed_at":"2022-01-12T13:21:20.000Z","size":193,"stargazers_count":56,"open_issues_count":6,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-25T22:38:12.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://memgraph.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-24T16:45:37.000Z","updated_at":"2025-06-11T23:09:37.000Z","dependencies_parsed_at":"2022-09-17T07:50:28.285Z","dependency_job_id":null,"html_url":"https://github.com/memgraph/example-streaming-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/memgraph/example-streaming-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fexample-streaming-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fexample-streaming-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fexample-streaming-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fexample-streaming-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/example-streaming-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fexample-streaming-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268411443,"owners_count":24246260,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-06-25T22:30:37.805Z","updated_at":"2025-08-02T15:34:48.475Z","avatar_url":"https://github.com/memgraph.png","language":"Rust","readme":"# Example Streaming App 🚀🚀\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/memgraph/example-streaming-app/blob/main/LICENSE\" alt=\"Licence\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/memgraph/example-streaming-app\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/memgraph/example-streaming-app\" alt=\"Languages\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/languages/count/memgraph/example-streaming-app\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/memgraph/example-streaming-app/stargazers\" alt=\"Stargazers\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/memgraph/example-streaming-app?style=social\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThis repository serves as a point of reference when developing a streaming application with [Memgraph](https://memgraph.com) and a message broker such as [Kafka](https://kafka.apache.org).\n\n![Example Streaming App](https://user-images.githubusercontent.com/4950251/137717495-fab38a69-b087-44ef-90b4-188a7187fbab.png)\n\n*KafkaProducer* represents the source of your data.\nThat can be transactions, queries, metadata or something different entirely.\nIn this minimal example we propose using a [special string format](./kafka) that is easy to parse.\nThe data is sent from the *KafkaProducer* to *Kafka* under a topic aptly named *topic*.\nThe *Backend* implements a *KafkaConsumer*.\nIt takes data from *Kafka*, consumes it, but also queries *Memgraph* for graph analysis, feature extraction or storage.\n\n## Installation\nInstall [Kafka](./kafka) and [Memgraph](./memgraph) using the instructions in the homonymous directories.\nThen choose a programming language from the list of supported languages and follow the instructions given there.\n\n### List of supported programming languages\n- [c#](./backend/cs)\n- [go](./backend/go)\n- [java](./backend/java)\n- [node](./backend/node)\n- [python](./backend/python)\n- [rust](./backend/rust)\n\n## How does it work *exactly*\n### KafkaProducer\nThe *KafkaProducer* in [./kafka/producer](./kafka/producer) creates nodes with a label *Person* that are connected with edges of type *CONNECTED_WITH*.\nIn this repository we provide a static producer that reads entries from a file and a stream producer that produces entries every *X* seconds.\n\n### Backend\nThe *backend* takes a message at a time from kafka, parses it with a csv parser as a line, converts it into a `openCypher` query and sends it to Memgraph.\nAfter storing a node in Memgraph the backend asks Memgraph how many adjacent nodes does it have and prints it to the terminal.\n\n### Memgraph\nYou can think of Memgraph as two separate components: a storage engine and an algorithm execution engine.\nFirst we create a [trigger](./memgraph/queries/create_trigger.cypher): an algorithm that will be run every time a node is inserted.\nThis algorithm calculates and updates the number of neighbors of each affected node after every query is executed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fexample-streaming-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fexample-streaming-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fexample-streaming-app/lists"}