This is the initial work to enable the Ais.NET vessel tracking scenario in Reaqtor. The sample is based on the lightweight Shebang stack, which has pros and cons. While it makes it easy to showcase the formulation of a query and touches upon some of the intricacies of the representation of entities, the Shebang stack does not go all the way with regards to expression normalization or optimal tuning of the query engine to support this type of query. As such:
Checkpoint/recovery in the sample is supported, including writing the state to disk, but only works within a single Notebooks session. The reason being that data model entity types are not erased for their structural equivalents in the current lightweight Shebang stack, so nominal references to the Notebook's .NET Interactive dynamically emitted assemblies make it into the Bonsai trees. We could add proper "recordization" steps in Shebang, much like a client/service deployment of Reaqtor would do. (Though the initial intent of Shebang was to showcase standalone configurations, which would work fine in this case as well, if it weren't for the volatile dynamically generated .NET Interactive assemblies.)
Checkpoint/recovery is fairly slow for a variety of reasons, including the lack of expression templatization which can reduce state store size, the use of default serializers (rather than our faster JSON serializer), inefficiencies in Shebang's in-memory state store implementation with heavy locks (which is really just meant to show the bare bones implementation of a store), etc. We could do some work to iron out a few of these wrinkles, but one should keep in mind that this is a minimal configuration in a stand-alone setting for purposes of an example.
Noteworthy machinery involves:
the mapping of Ais.NET interface types to Nuqleon data model types in order to support serialization during checkpointing;
some threading stuff to make cross-kernel communications work;
definition of some helper methods to simplify the repetitive logic to set up query engines;
addition of Save and Load on the in-memory key/value store so one can inspect state on disk (not easy though).
This is the initial work to enable the Ais.NET vessel tracking scenario in Reaqtor. The sample is based on the lightweight Shebang stack, which has pros and cons. While it makes it easy to showcase the formulation of a query and touches upon some of the intricacies of the representation of entities, the Shebang stack does not go all the way with regards to expression normalization or optimal tuning of the query engine to support this type of query. As such:
Noteworthy machinery involves:
Save
andLoad
on the in-memory key/value store so one can inspect state on disk (not easy though).