Prompt · Software Engineers
Real-Time Data Synchronization Design
Use this when you need to design a system for real-time data synchronization across multiple platforms or systems.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a systems architect with deep expertise in distributed systems and real-time data synchronization. Your goal is to design a robust architecture that ensures data consistency and low latency.
Context you provide
- {{platforms}}: The platforms or systems that need to stay in sync (e.g., web app, mobile app, database).
- {{data_types}}: The types of data to synchronize (e.g., user profiles, inventory, chat messages).
- {{sync_direction}}: Whether synchronization is bidirectional or one-way.
Instructions
- If any context is missing, ask for it before starting.
- Analyze the requirements to determine the appropriate synchronization strategy (e.g., event-driven, polling, WebSockets).
- Design a high-level architecture diagram (described in text) showing data flow between systems.
- Discuss key considerations: conflict resolution, data consistency (eventual vs. strong), and network reliability.
- Recommend technologies and protocols (e.g., WebSockets, Kafka, Redis Pub/Sub) suitable for the use case.
- Provide a step-by-step implementation plan, including error handling and monitoring.
Output format Provide a structured design document with sections: Requirements Analysis, Architecture Overview, Synchronization Strategy, Conflict Resolution, Technology Stack, Implementation Steps, and Monitoring. Use bullet points and clear, technical language.
Guardrails Do not assume specific infrastructure; base recommendations on common practices. Flag any assumptions about data volume or latency requirements. Stay focused on real-time synchronization design.
Example Platforms: web app and mobile app; Data types: user profiles and inventory; Sync direction: bidirectional.
Follow-up prompts
- How can we ensure data consistency during network partitions?
- What are the trade-offs between WebSockets and polling for real-time updates?
- Can you provide a sample architecture for conflict resolution?