This is designed to be used as a microservice within a larger architecture. This will take in CRUD messages for scenes, as well as track user device registrations.
A .proto file is included to allow generating the bindings for any language (the [protocol buffer compiler] (https://developers.google.com/protocol-buffers/) is installed by the build_deps script), which can be used to communicate via protocol buffers.
In order to allow for real-time, distributed visualization, one of the key problems that needs to be solved is ensuring that coordinate systems between various user devices and objects are synchronized. A key abstraction in this case is a ‘Scene’ which is an arbitrary collection of objects and devices. A device can register/de-register from any scene, as well as apply corrections to the coordinate system relationship between it and the scene it’s registered to.
This is done by storing relationships between scenes and devices, and then using these to build relationships between scenes themselves. When devices move between these scenes, they will apply corrections. As they apply corrections, we will build a set of known mappings between scenes which should allow users to move without needing any corrections by returning the pre-calculated differences.
Object Change Streams¶
Object Change Streams ensure that all registered User Devices remain up to date about objects within their scenes. Crazy Ivan monitors a Kafka Topic, which is populated by CLyman upon receipt of Object Updates. Crazy Ivan picks up these messages and sends them out to the registered devices via UDP.