track ongoing bus trips and save full trip location history
- Ruby version: 2.6.5
- Rails Versiom: 6.0.2
- Redis Version: 4.0.9
- Database: Postgresql
- Workers: Sidekiq
$ git clone [email protected]:Abd-El-Rahman-HSN/trips.git
$ cd trips
$ bundle install
$ rails db:create
$ rails db:migrate
$ rails s
$ bundle exec sidekiq
- CRUD for the trip
- Update trip status: the status can be only changed in one direction. For example, the trip cannot be changed from completed to ongoing.
- API full trip history
- Write Unite Test whith Rspec
- Serializing API
- Optimization API Full Trip History Using sidekiq and Redis
- Docker
- Trip model for save trip bus that contain city, Enum of status (ongoing, completed) and driver_id and full_trip model for save full trip location history.
- Default Status trip is ongoing and you can change status to completed but can't change completed status to ongoing.
- I use Database Postgresql and use Redis in caching API full trip location history because if we used record in Postgresql only in this case we will have a big performance issue in reading
- And Use Background jobs (Sidekiq) Because it's expected to be a large number of recordings.