The core architecture pattern that powers Multisynq applications
Understanding the Model-View-Synchronizer (MVS) architecture is fundamental to building successful Multisynq applications. This pattern ensures perfect synchronization across all users while maintaining clean separation of concerns.
Handles user input and output
Handles calculation and simulation
Stateless cloud service
π Guaranteed State Synchronization
The model state is guaranteed to always be identical for all users.
This is the fundamental promise of Multisynq. No matter how many users are in a session, their model state will be perfectly synchronized. This eliminates the complexity of managing distributed state.
π¨ View Flexibility
View state is NOT synchronized and can differ between users.
This allows for personalized experiences while maintaining shared core functionality. Users can have different UI preferences, screen sizes, or device capabilities.
π‘ Event-Driven Communication
All communication happens through events.
Events provide a clean, decoupled way for components to communicate. The routing is handled automatically by Multisynq.
Session Creation
When a Multisynq application starts, it joins a session. Users with the same session ID will share the same synchronized state.
Synchronization
The synchronizer ensures all users receive the same events in the same order, maintaining deterministic execution.
Snapshot Management
Snapshots are periodically saved to the cloud. New users can join by loading a recent snapshot instead of replaying all events from the beginning.
Understanding these routing rules is crucial for proper Multisynq development:
Events from view to model are reflected to all users
This ensures all users see the same game state changes.
Events from view to model are reflected to all users
This ensures all users see the same game state changes.
Events from model to view are executed locally only
This allows for local feedback without network overhead.
Events between views are local only
Perfect for managing local UI state.
Events between models are local only
Used for internal model organization.
Critical Rule: The view can read from the model, but canβt write to it directly.
Hereβs how the MVS pattern works in practice:
All users see exactly the same state at all times, eliminating sync bugs and conflicts.
Clear separation between business logic (Model) and presentation (View) improves maintainability.
Deterministic execution means no server-side state management or complex conflict resolution.
Local computation with synchronized results provides excellent performance and responsiveness.
ποΈ Model Design
future()
for time-based behaviorsπ¨ View Design
π‘ Event Design
Avoid these common mistakes:
Learn how to build robust, synchronized models
Master view development and user interaction
Deep dive into event-driven communication
Understand state persistence and recovery
The Model-View-Synchronizer pattern is the foundation of all Multisynq applications. Understanding this architecture deeply will help you build more robust, maintainable, and scalable multiplayer experiences.