Domain Logic

Domain needs vary greatly for a variety of concerns such as storage, security, monitoring, and more. There are a plethora of options available in each of those categories and the list continues to grow. Hiveio is the glue that binds them. Regardless of the desired patterns, the same atomic operations can be applied. The first opinion Hiveio makes is with the Actor Model.

Actor Model

The Actor Model consists of 'actors' as universal primitives of concurrent computation. Hiveio Actors perform actions on command by making local decisions, calling on other actors to perform various actions, or sending messages to other actors through various means. This is a relatively plain but powerful concept that provides the basic building blocks for your application logic. Most development time is spent within this construct. Actors have various channels with which they communicate:

Immediate
Asynchronously making local decisions or calling on another actor to perform.
Eventual
Sending messages via an internal (Actor System) or external (Kafka) message bus.

Hiveio Actors are able to achieve highly concurrent operations by leveraging Node.js' non-blocking, asynchronous I/O. These actors can be arranged to perform tasks for a variety of architectures. Everything is asynchronous from the ground up, even validation via transport schemas.

Actor Types

There are 2 different types of Actors defined in the Hiveio framework. They are:

Actor
This is the base Actor for the Hiveio framework. It is similar to a combination of a Controller and Model classes in the MVC pattern. It can be defined to parse paths from URLs, associated with Models and their Schemas, or both.
MessageActor
This extends the base Actor for the Hiveio framework. It is meant to handle more specific use cases for Domain Commands|Events to act upon the Model. It can be defined to support only Event Models and their Schemas but also Commands Models and Data Models. It can also be defined to parse paths from URLs along with the previously mentioned Models and their Schemas.