Caber is a microservices-based application that replicates the core features of an online cab booking app. It is composed of three microservices: User, Captain, and Ride.
For Synchromus communition :
REST APIFor Asynchromous communtion :
RabbitMQ
Kafka (for geolocation tracking)Note: This architecture does not follow the Saga design principle. Each service manages its own database and communicates via REST and messaging, but distributed transactions with compensating actions (as in Saga) are not implemented.
Install my-project with npm
git clone https://github.com/astitva3110/microservices.gitStart message brokers (RabbitMQ & Kafka)
Do this with every service
# in separate terminals
cd user && npm install && npm start
cd captain && npm install && npm start
cd ride && npm install && npm start
Server: Node, Express
Message Broker: RabbitMQ
Event Streaming / Pub-Sub: Kafka
Databases:MongoDB
Google Maps API for ETA and geolocation calculations.
REST for synchronous APIs
- ETA calculation using Google Maps API
- Dynamic price calculation based on distance and vehicle.
- Geolocation tracking of rides using Kafka
- Basic ride booking and captain assignment
- Implement Saga/Orchestrator or Choreography for distributed transactions