{"id":18282451,"url":"https://github.com/amithkoujalgi/distributed-system-observability-demo","last_synced_at":"2026-05-09T04:32:07.099Z","repository":{"id":210355497,"uuid":"720978535","full_name":"amithkoujalgi/distributed-system-observability-demo","owner":"amithkoujalgi","description":"This project is centered around the simulation of a stock market environment through the utilization of distributed systems and a message broker for seamless communication among different components of the system.","archived":false,"fork":false,"pushed_at":"2024-02-21T00:17:51.000Z","size":7290,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T05:29:15.713Z","etag":null,"topics":["distributed-computing","distributed-systems","distributed-tracing","micrometer","microservices","observability","spring","spring-boot","telemetry","tracing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amithkoujalgi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-11-20T05:17:22.000Z","updated_at":"2024-01-05T21:21:14.000Z","dependencies_parsed_at":"2024-01-01T10:09:01.299Z","dependency_job_id":"346f8685-6a82-4f3c-bb04-dd23ca5a61ae","html_url":"https://github.com/amithkoujalgi/distributed-system-observability-demo","commit_stats":{"total_commits":190,"total_committers":2,"mean_commits":95.0,"dds":0.0736842105263158,"last_synced_commit":"40a689118dd5e590c3a3928e01d4663ea1911460"},"previous_names":["amithkoujalgi/distributed-processing-demo","amithkoujalgi/distributed-system-observability-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amithkoujalgi/distributed-system-observability-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amithkoujalgi%2Fdistributed-system-observability-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amithkoujalgi%2Fdistributed-system-observability-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amithkoujalgi%2Fdistributed-system-observability-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amithkoujalgi%2Fdistributed-system-observability-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amithkoujalgi","download_url":"https://codeload.github.com/amithkoujalgi/distributed-system-observability-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amithkoujalgi%2Fdistributed-system-observability-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["distributed-computing","distributed-systems","distributed-tracing","micrometer","microservices","observability","spring","spring-boot","telemetry","tracing"],"created_at":"2024-11-05T13:05:17.092Z","updated_at":"2026-05-09T04:32:07.072Z","avatar_url":"https://github.com/amithkoujalgi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo of Distributed System with Observability\n\n## [Work in progress]\n\n![Java](https://img.shields.io/badge/Java-17-green.svg)\n![Spring Boot](https://img.shields.io/badge/Spring_Boot-3-green.svg)\n![Postgres](https://img.shields.io/badge/Postgres-blue.svg)\n![Kafka](https://img.shields.io/badge/Confluent--Kafka-7.3.2%2B-red.svg)\n![Redis](https://img.shields.io/badge/Redis-6.0.20%2B-blue.svg)\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Design](#)\n- [Prerequisites](#prerequisites)\n- [Run](#run)\n- [References](#references)\n\n## Introduction\n\nThis project is centered around the simulation of a stock market environment through the utilization of distributed\nsystems and a message broker for seamless communication among different components of the system. In this simulation,\nproducers generate synthetic stock price data as well as buy and sell orders, while consumers execute these orders and\nensure the system stays up-to-date.\n\nThe system offers APIs that allow traders to list their orders, review their portfolio, and create new orders for buying\nor selling. Additionally, it provides APIs for accessing information on available stock instruments, including their\nlast traded price and more.\n\nAs part of its design, the system incorporates observability features, enabling the tracking of various aspects within\nthe system. This enhances transparency and facilitates in-depth analysis of its functioning.\n\n_Please note that this simulation is a simplified version and might not represent real-world trading conditions or all\naspects of a complex stock market._\n\n## Prerequisites\n\n- [Docker](https://www.docker.com/products/docker-desktop/)\n- [Docker Compose](https://docs.docker.com/compose/)\n- [httpie](https://httpie.io/)\n- [make](https://formulae.brew.sh/formula/make)\n\n## Build\n\n```shell\nmvn clean install\n```\n\n## Run\n\nStart docker containers:\n\n```shell\nmake start-docker\n```\n\nStart Java apps:\n\n```shell\nmake start-apps\n```\n\nWith all services up, access:\n\n| Description             | Port/Link                  | Additional Info                          |\n|-------------------------|----------------------------|------------------------------------------|\n| Postgres                | 5432                       |                                          |\n| Postgres UI             | http://localhost:5050      | U: `pgadmin4@pgadmin.org`\u003cbr/\u003eP: `admin` |\n| Kafka UI                | http://localhost:8080      |                                          |\n| Redis UI                | http://localhost:8050      |                                          |\n| Grafana UI              | http://localhost:3000      |                                          |\n| Keycloak                | http://localhost:9000      |                                          |\n| Eureka Service Registry | http://localhost:9900      |                                          |\n| Spring Boot Admin       | http://localhost:9800      |                                          |\n| Auth Service            | http://localhost:9901/docs |                                          |\n| Ticker Service          | http://localhost:9902/docs |                                          |\n| Order Service           | http://localhost:9903/docs |                                          |\n| App UI                  | http://localhost:9910      | U: `test`\u003cbr/\u003eP: `test`                  |\n\nGenerate traffic:\n\n```shell\nmake traffic\n```\n\nStop apps:\n\n```shell\nmake stop-apps\n```\n\nStop docker containers:\n\n```shell\nmake stop-docker\n```\n\nDesign:\n\n```mermaid\n  flowchart LR\n    script[Script]\n    as[Auth Server]\n    ts[Ticker Server]\n    os[Order Server]\n    r[Redis]\n    db[Database]\n    k[Kafka]\n    p[Producer]\n    c[Consumer]\n    script --\u003e|Calls API| ts;\n    script --\u003e|Calls API| os;\n    ts --\u003e as;\n    os --\u003e as;\n    r --\u003e ts;\n    os --\u003e k\n    ts --\u003e db;\n    os --\u003e db;\n    p --\u003e|Generate synthetic Orders| k;\n    k --\u003e|Consumes Orders| c;\n    r --\u003e|Instrument price lookup| c;\n```\n\n### Images\n\nSpring Admin:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/spring-admin.png\"/\u003e\n\nService Registry:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/eureka.png\"/\u003e\n\nService Registry:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/eureka.png\"/\u003e\n\nService Details via Service Registry:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/spring-admin-service.png\"/\u003e\n\nService Logs via Service Registry:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/spring-admin-service-logs.png\"/\u003e\n\nCentral Dashboard - Service Logs:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/logs-dash.png\"/\u003e\n\nCentral Dashboard - Stats of HTTP Requests (Latency/Throughput):\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/http-dash.png\"/\u003e\n\nSample Exemplar:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/exemplar.png\"/\u003e\n\nSample Trace:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/trace.png\"/\u003e\n\nSample Logs for a Trace:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-system-observability-demo/main/images/trace-logs.png\"/\u003e\n\n\nService Graph for a Trace:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/trace-node-graph.png\"/\u003e\n\nFull Service Graph:\n\u003cimg src=\"https://raw.githubusercontent.com/amithkoujalgi/distributed-processing-demo/main/images/services-graph.png\"/\u003e\n\n### Improvements:\n\n- [ ] Filter by URLs of a selected service/application on `HTTP Stats` Grafana Dashboard\n- [ ] Instrumentation of Redis APIs\n- [ ] Instrumentation of consumer\n- [ ] Traffic via API gateway by applying auth filters\n\n### References:\n\n- https://www.youtube.com/watch?v=fh3VbrPvAjg\u0026ab_channel=SpringI%2FO\n- https://spring.io/guides/tutorials/metrics-and-tracing/\n- https://stackoverflow.com/questions/76418005/not-able-to-trace-database-requests-with-spring-boot-3-and-micrometer\n- https://github.com/micrometer-metrics/micrometer-samples/blob/main/micrometer-samples-boot3-database/src/main/java/io/micrometer/boot3/samples/db/SampleController.java\n- https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html\n- https://www.confluent.io/blog/monitor-kafka-clusters-with-prometheus-grafana-and-confluent/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famithkoujalgi%2Fdistributed-system-observability-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famithkoujalgi%2Fdistributed-system-observability-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famithkoujalgi%2Fdistributed-system-observability-demo/lists"}