Crate kay[][src]

Kay is a high-performance actor system, suitable for simulating millions of entities.

In Kay, actors concurrently send and receive asynchronous messages, but are otherwise completely isloated from each other. Actors can only mutate their own state.

Have a look at ActorSystem, World and Swarm to understand the main abstractions.

Current Shortcomings:

Structs

ActorSystem

The main thing inside of which all the magic happens.

External

An owning reference to local state outside the actor system that can safely be embedded in actor states and passed in messages, as long as they stay on one machine.

MachineID

Identifies a machine in the network

Networking

Represents all networking environment and networking state of an ActorSystem

Packet

Combination of a message and its destination recipient id

RawID

A RawID uniquely identifies an Actor, or even a Actor within a Swarm

World

Gives limited access to an ActorSystem (typically from inside, in a message handler) to identify other actors and send messages to them.

Enums

Fate

Return type of message handling functions, signifying if an Actor/Actor should live on after receiving a certain message type.

Traits

Actor

Trait that Actors instance have to implement for a Swarm so their internally stored instance RawID can be gotten and set.

Message

Trait that a datastructure must implement in order to be sent and received as a message.

TraitIDFrom

Helper trait that signifies that an actor's TypedID can be converted to an actor trait TypedID if that actor implements the corresponding trait.

TypedID

TypedID is a construct on top of a RawID that can refer to a specific kind of actor, or actor trait at compile time