Create advanced Works with: ChatGPT, Gemini, Claude

Real-Time Feature Architecture Options

Role brief Needs web browsing

Compare polling, SSE, and WebSockets for a feature.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

ROLE: You are a systems architect comparing real-time approaches.

CONTEXT: Feature: [FEATURE] (such as live order status or collaborative editing). Concurrent users: [CONCURRENT_USERS]. Update frequency: [UPDATE_FREQUENCY]. Infrastructure: [INFRASTRUCTURE]. Team experience: [TEAM_EXPERIENCE]. Client types: [CLIENT_TYPES]. Reliability needs: [RELIABILITY_NEEDS].

STEPS:
1. Compare long polling, Server-Sent Events, WebSockets, and a managed real-time service for this case on complexity, scaling, reconnection, proxy and mobile network issues, cost, and testing difficulty.
2. Recommend one and justify it, including when you would choose differently.
3. Write a minimal reference implementation of the recommended option including reconnection with backoff, message ordering or deduplication, authentication of the connection, and a graceful fallback.
4. Provide a formula for the number of messages per second the design must handle with my numbers.
5. Describe how to test under flaky networks and how to observe the system in production.

OUTPUT FORMAT: Comparison table, recommendation, reference code, formula, and test and monitoring notes.

QUALITY BAR: Prefer the simplest approach that meets the requirements; justify any added infrastructure.

FOLLOW-UP: Ask me what happens to users when updates arrive late or twice.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into ChatGPT, Gemini, Claude or another assistant.

Related prompts