Arc Pattern – Explained
Arc Pattern – Explained
🧩 Depends On:
-
Bridge Pattern: Enables abstraction between client and server with independent development.
-
Bidirectional Streaming: Both server and client can initiate communication.
🔁 How the Arc Pattern Works:
-
Bridge Initialization:
-
Both client and server start communication from their end using a bridge pattern.
-
This means they are ready to send and receive data.
-
-
Arc Creation:
-
When both ends successfully connect and streaming begins, an Arc is formed — representing a complete and active communication loop.
-
Think of the "arc" as a real-time bridge with data flowing both ways.
-
-
Dynamic Arcs for Requests:
-
Each new request initiates a new arc, which allows for faster and isolated communication paths.
-
This supports scalability and low-latency performance, especially in systems needing many short-lived connections.
-
-
Fallback with Circuit Breaker:
-
If the arc fails to form (due to timeout, failure, etc.), the system falls back to a Circuit Breaker Pattern, stopping repeated failed attempts and rerouting logic.
-
🟢 Best Use Cases:
-
Systems with frequent, short-lived communication needs.
-
Real-time applications requiring quick connections and fast failover.
-
Examples:
-
Zomato, Swiggy: Food delivery requests between user, server, and delivery partner.
-
Ola, Pathao: Real-time route tracking and ride updates.
-
Kafka-style Systems: Handling multiple producers/consumers in real-time.
-
Would you like a diagram showing the Arc Pattern lifecycle (including the fallback to Circuit Breaker)?
Comments
Post a Comment