SAGA is inspired by the observation that the world is a constantly changing information ecosystem and everything exists in a state of co-existence. SAGA is a non-linear information router that provides methods to capture and facilitate change. In software design methodology lingo this is called change data capture (CDC)
Properties
In order to support a system capable of processing an evolving data set Saga has a flexible time-series-based data structure for storage and a decoupled data processing/reaction system for dynamic behavior. At the core of SAGA is a property that immutably identifies a single datum. Each property has a name, a value, a timestamp, meta data and a parent object.
We distinguish between three different types of a parent objects. Users, Bots and Globals.
Users
A user has a list of properties that describe its current state, such a location, inventory items, heartbeat, score and so forth. What distinguishes a user from a bot parent type is that a user has a real world identity and the ability authenticate with SAGA. Each user has a unique immutable ID, a username as well as policies that describe the users permissions in SAGA
Bots
A bot is every entity that is not a user. A chatty character in a game, a networked light in a dark alley, a networked audio speaker or a wandering virtual spatial agent traversing the digital. A bot has a set of properties in an identical structure to users. Each bot has a unique immutable ID and a name.
Globals
Global properties are akin to system wide configurations or anonymous data, at least from a user or bot perspective, that needs to processed before it can be associated with a user or bot. Examples are API keys for external systems or incoming data from external systems that is not aware of SAGA data structures. There is only one global object parent ever.
Messaging
SAGA has a data structure to represent natural language (or less natural) conversations between users and bots. SAGA can integrate with push or pull based message delivery system such as SMS, Telegraph, FB or entirely custom via HTTP calls. SAGA supports a wide range of chat systems such a Chatscript or GPT-3.
Scripts
SAGA Scripts handles the processing of changing properties, incoming and outgoing messages as well as user lifecycle events and http calls. A script is a block of node.js that subscribes to a certain kind of change through a naming convention called script path that declares what a script can handle. A script can create new properties, messages, users, bots and interact with external services. SAGA is a non-linear system that can run scripts in a distributed and parallel way in a single cloud or hybrid cloud setting.
Jobs
Jobs are similar to scripts except that they are triggered by time events instead of property events. A time event can be a one-off such as 6/10/2019 or a recurring event such as "Every Saturday" or "Every 10 seconds".
Jobs are useful for such things as autonomous agents that at each "heartbeat" (i.e. a timer that chimes every n seconds) perform a set action, such as a location query. Another use case here would be recurring data summarization processes.