-
Notifications
You must be signed in to change notification settings - Fork 0
Fleeto Architecture
Fleeto system consists of two mobile applications and one mediator server. Fleeto client requests a drive by specificity his pickup and dropoff locations, this goes to the mediator server which makes the decision of which drivers are able to pickup the client, sends them a 'pickup' request. One or more driver uses their driver App to inform the server that they are willing to take that drive, and the server decides who's the best (based on some criteria) and assigns the driver to the trip.
Fleeto system is a huge system, this project here will focus only on the server side. Providing an open source mobile App is TBD (probably an SDK but not an App).
It can be divided into the following main systems:
- Backend database
- Frontend API
- State Tracker
- Events Manager
- Administrator Dashboard
Data store for keeping information about:
- Drivers
- Clients
- Users Credentials
- Trips
- Payment Information
- ...
Technology: Any relational database, possibly MySQL.
An HTTP API that handles clients & drivers Apps requests. The Frontend API will contain most of the business logic that manipulates users' data in the Backend Database. This includes the following functionalities:
- User registrations and authentication.
- Billing and Payments.
- Drivers registration.
- Users/Drivers reputation.
- ...
TBD: Should that be divided into Client API and Driver API? Technology: Ruby on Rails.
It stores the current state of all the drivers. It accepts requests from the Frontend API. Every driver will have a state that contains the following information:
- Location
- In a trip?
- Destination
- Current Trip Route (no sure, because this is kind of a historic info)
State Tracker also should provide an API for querying the drivers' state. These queries can be:
- Get current location of a driver
- Get top ten nearest drivers to location lat and long.
Technology: It should be some data store that is optimized for writes and supports geolocation queries.
- Redis: Maybe?
This is Queuing system that manages events in Fleeto. Some examples of events in Fleeto would include the following:
- Driver location changed
- Driver canceled the trip
- Driver ended the trip
The event manager works as a communication channel between the Backend API and the Mobile apps.
Technology: Apache Kafka
A privileged access to all the components of Fleeto. It has its own Database that contains administrators' credentials.
Technology: Ruby on Rails
Q: Would it be better if API calls like "request_a_drive" is asynchronous? A: