chriscoderdr / morro-ride-sharing

1 stars 1 forks source link

Architecture and Tech Stack #3

Open chriscoderdr opened 1 month ago

chriscoderdr commented 1 month ago

Research task on architecture and tech stack in preparation to the project

chriscoderdr commented 1 month ago

Morro Taxi - Architectural Decisions Summary

Mapping & Location Services

API Security & Backend Integration

State Management

Mobile Development Framework

Backend Architecture

Real-Time Communication

Authentication

Admin Panel

Quality Assurance (QA) Testing

Data Fetching & Mutations

UI Component Library

ERD

Image

FlowChart

Image

chriscoderdr commented 1 month ago

This task won't be close, will keep updating

chriscoderdr commented 1 month ago

We will be using this figma library https://www.figma.com/design/aIciAYC3gzTo73E9NRk6bU/RNUI-Library-(Community)?node-id=33-8909&node-type=canvas&t=36ltdOAXBLHa5Qhm-0

chriscoderdr commented 2 weeks ago

Architectural Decision: Choosing BullMQ for Queuing in Morro Taxi

Why We Chose BullMQ Over Other Queuing Libraries

In Morro Taxi, we need a robust queuing system due to the volume and complexity of ride requests that must be processed concurrently and distributed effectively to nearby drivers. After evaluating various options, including Bee-Queue and Kue, BullMQ emerged as the optimal choice.

Reasons for Choosing BullMQ

  1. Advanced Control and Concurrency Management: BullMQ supports advanced job prioritization, rate limiting, and concurrency settings. This is crucial in Morro Taxi to manage thousands of ride requests, ensuring that the nearest drivers are efficiently notified, and unassigned rides are rapidly reassigned.

  2. Reliability and Redis Integration: Built on top of Redis, BullMQ provides reliable, in-memory queuing with durability options, enabling Morro Taxi to handle large-scale requests with high resilience. It also offers delayed jobs and retry mechanisms, making it ideal for managing ride requests with multiple potential retries.

  3. Ease of Monitoring: BullMQ offers in-depth tooling and monitoring options, which allow for real-time insights into the queue's state, job progress, and error handling, crucial for managing an app like Morro Taxi with fluctuating demand and critical uptime needs.

  4. Scalability for Parallel Processing: Given Morro Taxi's requirement to manage thousands of concurrent ride requests, BullMQ’s parallel processing and horizontal scaling are key to achieving high throughput while maintaining queue integrity and performance.

Why We Need a Queue in Morro Taxi

In Morro Taxi, a queuing system is essential to efficiently process ride requests and assign them to available drivers based on proximity and availability. Here’s why:

In summary, BullMQ was chosen for its concurrency control, Redis integration, scalability, and ease of monitoring, all critical features for supporting Morro Taxi's real-time ride request processing and driver allocation system.