A Massively Multi-user Datastore, Synced with Mobile Clients
Read Full ArticleSummary
The article discusses the architectural design of a massively multi-user datastore developed at Square, which is tailored to manage extensive merchant catalogs synced with mobile clients. It emphasizes the challenges of maintaining data consistency and availability across various client states, particularly when offline. The solution employs an entity-attribute-value model to provide both structure and flexibility, allowing for rapid feature development and custom data integration. Key features include synchronizable constraints, an append-only data model for transactional integrity, and a rollback mechanism for maintaining historical data states. The design aims to ensure that clients can operate with predictable data formats while allowing for extensibility and efficient data management.
Key Learnings
- 1The use of an entity-attribute-value model allows for a flexible yet structured approach to data management, accommodating diverse client needs.
- 2Implementing synchronizable constraints as catalog objects enhances data integrity and client-side validation without requiring schema changes.
- 3An append-only data model facilitates transactional properties while enabling efficient rollback and history tracking capabilities.
- 4The architecture supports both location-aware and merchant-aware clients, optimizing data delivery based on client context.
- 5By allowing clients to create new object types and attribute definitions via API, the system promotes rapid iteration and customization.
Who Should Read This
Senior Software Architects designing scalable, multi-tenant data solutions for mobile applications.
Test Your Knowledge
What are the trade-offs of using an entity-attribute-value model compared to traditional relational databases in this context?
How does the append-only data model impact the performance of read and write operations during high concurrency?
What failure scenarios could arise from the use of synchronizable constraints, and how can they be mitigated?
In what ways does the architecture support scalability as the number of merchants and data volume increases?
Why is it important to allow clients to create new object types and attribute definitions, and what implications does this have for data governance?
Topics
More articles about Microservices
Explore Microservices engineering →You can't stream the energy: A developer's guide to Google Cloud Next '26 in Vegas
The article serves as a guide for developers attending Google Cloud Next '26 in Las Vegas, highlighting the importance of in-person collaboration and the value of hands-on learning. It outlines key...
Hyperforce Migration at Scale: How Deterministic Automation Replaced Manual Spreadsheets Across 95,000 Organizations
The article outlines the development of the Migration Intake and Processing Service (MIPS) at Salesforce, which automates the migration of over 95,000 organizations to Hyperforce. It highlights the...
Safeguarding Dynamic Configuration Changes at Scale
The article outlines Airbnb's dynamic configuration platform, Sitar, which enables safe and reliable runtime behavior changes without service interruptions. It emphasizes the importance of a coherent...
My Journey to Airbnb — Anna Sulkina
Anna Sulkina's journey to Airbnb highlights her extensive experience in engineering, particularly in application and cloud infrastructure. She transitioned from hardware diagnostics to software...
The Container paradox: Why the Inference Cloud Demands a “Decoupled” Database
The article explores the challenges of managing databases within Kubernetes clusters, particularly in the context of the Inference Cloud, where AI-driven applications require efficient data access...
More from Square Engineering
View Square engineering blogs →Command Line Observability with Semantic Exit Codes
The article presents a novel approach to enhancing command line tool observability at Square by introducing semantic exit codes inspired by HTTP status codes. By categorizing exit codes into user...
Celebrating the release of Android Studio Electric Eel
The release of Android Studio Electric Eel introduces a significant performance enhancement through a new parallel project import feature, which reduces average sync times for large codebases by 60%....
Developer Spotlight: Reference Health
The article highlights the journey of Reference Health, a platform that integrates Square's payment solutions into healthcare systems, enabling providers to accept secure payments directly through...
Stampeding Elephants
The article 'Stampeding Elephants' presents a case study from Square's Mobile Developer Experience (MDX) Android team, detailing their journey to modernize the build logic of their Point of Sale...
Why You Need an Experimentation Template
The article emphasizes the significance of using an experimentation template for A/B testing within data science teams, particularly at Block. It outlines how such a template ensures that...