kernel.shell.site
Site control shared both by clients and the server.
Generates and receives messages at a site. Modifies the global context. Site control operations are assumed to run atomically in a single thread, no synchronization is performed.
combined-effect!
(combined-effect!)
Calculates the next combined effect, which is a feature model or conflict descriptor, stores it in the context and returns it.
initialize-context-mesh-topology
(initialize-context-mesh-topology site-ID initial-FM)
Initializes global context for a new site in a mesh topology. Called when the site is ready to generate and receive operations.
receive-heartbeat!
(receive-heartbeat! message)
Receives a heartbeat message at a site. Updates the global context and returns the (updated) combined effect.
receive-leave!
(receive-leave! message)
Receives a leave message at a site. Updates the global context and returns the (updated) combined effect.
receive-message!
(receive-message! message)
Receives a message at a site. If a server vector clock is attached, updates its garbage collector (irrelevant for mesh topologies). Checks which kind of message has been received and dispatches to the according receive function. Returns the (updated) combined effect.
receive-operation!
(receive-operation! CO)
Receives an operation message at a site. Extracts the operation from the message, then updating the global context. Calls the MOVIC algorithm with the new operation after the CDAG, HB and CC have been updated. Returns the (updated) combined effect.
resolve-conflict!
(resolve-conflict! MCG-ID)
After all sites have (externally) agreed on a resolved version, this function resolves the conflict by resetting the system to its initial state, only with the resolved MCG’s operations included in the new initial feature model. This is possible because all sites are synchronized at this point, and all CDAGs, HBs etc. are equal across sites. In that case, they can all effectively be garbage-collected, i.e. re-initialized.