A sync engine takes away the need for your feature developers to have to worry about how data will get from the server to the client.
Note
Some confusion arises when you think of the Linear Sync Engine as the benchmark. This is largely because Linear makes some opionated choices which work for their application. Ex: Storing the entire workspace data on client. It works for them because there won't be billions of issues in an organisation, and in memory joins for these issues aren't a problem. So you'd believe that this is the job of the sync engine, it's not, it just happens to be that Linear's sync engine does it.
The entire idea I'm proposing here is that we make a system which syncs the required data to the client without making the application developers build APIs for it.
If you've gotten the idea, you'd be able to understand that this is a replacement for REST and graphQL rather than being a replacement for your entire backend.
-
Code as source of truth rather than syncing objects to remote sync server (like convex and instant currently do)
-
Mutations should happen via an API rather than directly mutating the object and having DB rules handle permissions, this is to allow writing rules as application logic.
-
Models should be defined as classes in a package so they can be imported on the frontend and on the backend.
Like every system, there are characters. I will be introducing these in the beginning. It'll help you understand the pieces.
Then we'll be going deeper into understand how the properties and implementations of these characters have to be changed for every application.
The applications we'll be looking at are as follows:
| Sr. No | Name | Description |
|---|---|---|
| 1. | Linear | A project management tool |
| 2. | Zomato | A food delivery and menu app |
| 3. | Uber | A ride sharing app |
| 4. | Investmint | A stock market trading app |
| 5. | Mixpanel | An analytics app |
| 6. | A text based social media app |
Going through should offer enough variety that should help you design a sync engine for your own application.