Skip to main content

2 posts tagged with "Phoenix"

View All Tags

How to Build WatermelonDB Sync Backend in Elixir

· 13 min read
Fahri Nurul Hidayat
Software Engineer

WatermelonDB​

WatermelonDB is a reactive database for React frontend application that supports data synchronization.

WatermelonDB

What I like about this database is you can bring your own sync backend (HTTP-based) as long as it complies with this spec:

OperationRequest Params / BodyResponse Body
Pull- lastPulledAt: integer, Unix time in milliseconds (ms)- changes: (JSON)
- timestamp: integer, Unix time in milliseconds (ms)
Push- changes: (JSON)
- lastPulledAt: integer, Unix time in milliseconds (ms)
X

The following is a brief how pull and push operation works. Please refer to Sync documentation for the details