[ROOT] / doc / toc / ARCCore / Class / StreamProcessor
AddOrRemoveOutgoingConnections , AddTimestampAsRequired , CreateBareBonesInstance , Initialize , OutsideLocalReceiver , ReadStorageFile , ReceiveAndDistribute , StartTCPIPCommunication , ToString
Implements the storage mechanism for AgoRapide.
Coordinates the PropertyStream with other nodes.
TODO: Implement discarding of data when not listening to incoming connections (saves memory usage).
TODO: (search for this TODO in code to see where relevant to make changes).
Has the following functionality:
(note: Terminology is kept close to the one used for the MQTT protcol, although AgoRapide does not use MQTT in itself)
1) Listen to incoming TCP/IP connections from other nodes. An incoming connections may be either for:
a) Incoming data (from a publishing client), for us to distribute.
as a CoreDB we would then store the data locally and then distribute the data to all current downstream subscriber clients as relevant according to their respective subscriptions (Note: For incoming data on an incoming connection an implicit -IsAll-, '+*', is assumed), as a ArmDB we would then forward the data to a CoreDB )
b) Outgoing data, downstream subscribing client requests subscription
we would then typically be a CoreDB or a ArmDB.
After having reveived the Subscription and ClientUpdatePosition
from the subscribing client we will then keep the client continously up-to-date with new data.
2) Connect to other nodes. An outgoing connection may be either for
a) Publishing properties. ( As a publishing Client the data would be locally in-application generated properties.
As an ArmDB the data would typically have been received over an incoming connection from a Client )
b) Receiving (as downstream subscribing client) data from upstream server.
We would then typically be an ArmDB or Client
We would send Subscription and ClientUpdatePosition as soon as connection is established.
TODO: May 2020: The code in this class should be tidied up a bit before any more functionality is added.
Note that the examples above do not take into scenarios like load-balancing and fault tolerance where CoreDB would be connecting among themselves.
Note that information about outgoing connection and their purpose should be possible to distribute over the PropertyStream, therefore we have implemented the class ActualConnection (distribution itself not implemented as of Mar 2020).
Note: A vision for AgoRapide is that load-balancing / fault tolerance and similar should be mostly a configuration issue around already in-built functionality in ARCCore / StreamProcessor. In other words the core functionality should provide a language which is suffiently rich in order for you to describe these different setups, there should be no need for additional C# code.
Note how this class inherits PConcurrent which offers thread-safe access to properties (and is also able to ExposingApplicationState to outside).
|AddOrRemoveOutgoingConnections||Not relevant for CoreDB.|
|AddTimestampAsRequired||Adds Timestamp to the property stream (to -_queueReceive-) as specified by TimestampResolution.|
|CreateBareBonesInstance||Creates a bare-bones StreamProcessor instance.|
|Initialize||Initializes this instance of StreamProcessor|
|OutsideLocalReceiver||The outside (in the sense outside of this class) local mechanism which receives all PropertyStreamLine registered by this class.|
|ReadStorageFile||Reads one storage file from disk|
|ReceiveAndDistribute||Process all messages in receive queue.|
|StartTCPIPCommunication||Starts communicating over TCP/IP.|
|ToString||TODO: Decide on what we actually want with ToString for this class.|
Generated 2021-10-20 23:17:14.997 UTC