This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
sync 03
Nicolas Sebrecht edited this page Mar 17, 2016
·
2 revisions
In this case, the full state backend is run as a controller (so inside a driver worker).
{worker} {worker} {worker}
+---------+-------+ +----------+ +----------+
| | | (drives) | | (drives) | |
| driver | state |<------------| engine +-------------------->| driver |
| | | | | | |
+---------+-------+ +----------+ +----------+
- In the engine:
right.search(searchConditions) # Async
leftMessages = left.search(searchConditions) # Sync
rightMessages = right.getSearchResult_sync() # Sync
# 3-way merge.
left.update(mergedMessages) # Async?
right.update_sync(mergedMessages) # We have to keep track on successful writes.
I stopped, here. The implementation would be very very tricky.
- ?
- All the successful writes of one side must be forwarded to the other.
- Is it the expected job for a sync engine?
- Asymmetric calls from the engine. That sucks hard.
- Keeping track on write results might be hard to get it right in fully async environement.
- Very complex implementation.
- The engine needs a way to update the chain of controllers.