3 ms·
So you need to process your events linearly, but you don't need to store them linearly. Here's a way you could achieve this: - keep sqlite - use Pouchdb on t
by rakoo 12y ago
So you need to process your events linearly, but you don't need to store them linearly.
Here's a way you could achieve this:
- keep sqlite
- use Pouchdb on top of it to sync your data to your server, typically Couchdb
- Since you know the order of events, tag each of them with an application-level sequence number
- On your server, when you receive an event, check all events that happened before, in order. For each event, if it has not been processed, process it
- mamcx 12y agoBut I need to duplicate the data to pouch, then move it to couch. My question is how do the sync myself. How build the log so it be usefull to this task? To be clear, how is the algorithm for this? Any hint or open source example?