...
- Entity
- Entities are used to model application state. In Talon, an application exposes its state to the platform by providing it with a single root object that references the rest of the application state. The single root forms an object graph a state tree that is held fully in memory, supports transactional semantics, and is replicated asynchronously to backup instances in a delta based pipelined fashion as application code modifies it in the course of processing.
- Message
- A message can be thought of as a special type of entity that is enhanced to allow transport over the platform's Simple Message Abstract (SMA) layer. A message can't reference other entities because it is serialized as an independently transportable unit.
Embedded EntityAnchor EmbeddedEntity EmbeddedEntity - An embedded entity models a collection of fields of primitive types or other embedded entities. An embedded entity can be embedded into a Message, Entity or other Embedded entity as a field, and become part of that type's serializable unit, e.g. not another node from the standpoint of ROG, and a transported part of a message from the standpoint of SMA.
...
Tip |
---|
Think of arrays as being used with messages and embedded entities. Collections are used in referencing non-embedded embedded entities elsewhere in an application's state graphtree. |
Enumerations
The X Platform supports modeling of enumeration types. Enumeration types can be of type int, char or string and, according to their type, they must be assigned a code value that is used to generate their field tag for protobuf/xbuf encoding:
...
An application's state is represented as an object graph a state tree in which entities represent the nodes. The platform replicates the deltas to this object graph as state tree as changes are made to the its nodes in the graph. When an entity is set as a field of another object it constitutes an addition to the object graph state tree which is then replicated to other peers. Similarly when a field of an entity is removed (set to null) it constitutes a removal which is then replicated to the peers and possibly persisted.
An entity that serves as the root of an object graph state tree can be marked as root, which indicates it will not have any parents in the object tree. A root object should not be declared as the child of another object. Application provided state should not be defined as root objects because the server appends them to an underlying root object internally.
An entity type can be marked as transactional. The platform tracks field updates to transactional entities and can rollback changes made to them in the event of an application exception or an explicit rollback. By default, entities and collections are transactional while messages are not. A message can be declared transactional, which is useful in the event that a message is stored as part of an application's state graphtree.
See State Tree Limitations for some important limitations on the current state graph tree implementation that may have an impact on state modeling.
...
- Entities declared as embedded cannot be defined such that there are cycles in the resultant graphtree.
- Entities declared as embedded cannot currently be used as members in collections, but may be used as array members.
...