Giter Club home page Giter Club logo

kay's Introduction

kay

kay is a...

  • High-performance actor system for Rust
  • suitable for simulating millions of entities in realtime
  • which only communicate using asynchronous messages

kay can be transparently and trivially scaled onto...

  • multiple cores
  • multiple networked computers
  • browser clients with wasm and cargo web

It offers...

  • Actor IDs identifying
    • Instances of an Actor Type
    • Broadcasts to all instances of an Actor Type
    • Generic (type-erased) Actor Trait IDs
    • Actor instances across networked computers
  • A Recipient<Message> trait in which a user implements message handling for each message type that an Actor can receive
  • InstanceStores - collections of large numbers of instances of one actor type
    • Compact and efficiently managed memory storage for dynamically-sized instance state, supplied by chunky
    • Dispatch of messages to individual instances
    • Very efficient broadcasting of a message to all instances
  • Serialisation-free persistence, snapshotting and loading of actor and system state using memory-mapped files, implemented by chunky
  • Abstractions like futures and map-reduce for awaiting and aggregating asynchronous responses from other actors
  • "Essential" message types that are handled even after a panic occurs in an Actor, allowing interactive inspection of the whole panicked system

It internally uses...

  • A message queue per Actor Type that is
    • unbounded
    • multi-writer, single-reader
    • lock-free
  • The experimental TypeId feature, to tag message blobs with their type id for runtime message handling function dispatch
  • A Slot Map in InstanceStores to assign unique IDs to instances, while always keeping them in continous memory chunks. This makes iterating over them for broadcast messages very fast.

kay is inspired by Data-Oriented Game Development, Erlang and the original ideas behind Object-Orientedness. It is thus named after Alan Kay.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.