Socket
Book a DemoInstallSign in
Socket

tarant

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tarant

Actor model for reactive and scalable applications.

3.1.47
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

logomakr_7yenvo

npm Build Status Coverage Status PRs Welcome issues Welcome npm GitHub issues GitHub pull requests Downloads

Join Gitter

Tarant is a TypeScript/JavaScript library for building software using the actor system model. You can visit the home page for more information and a more complete quick start guide: https://tarant.js.org/

  • Actors are easy to reason about: An actor is the unit of state and logic of your application. They are transactional, so you don't need to handle state rollbacks in case of errors.
  • Actors improve performance: Asynchronous by default, every actor actual communication is non-blocking so slow actors will not block fast actors.
  • Actors are extensible: As actors are built on top of objects, actor classes can be inherited, composed and injected.

Features

Tarant implements a rich set of features that makes it suitable for building complex applications.

  • Actors are reliable because they are transactional. You don't need to bother yourself with error recovery.
  • Actors are performant, as they are pull-based and decoupled from other actors lifecycle.
  • Actors are easy to debug. All messages come with information about the sender and all the state information is saved in a time machine, for further debugging and navigation.
  • The Actor System has an event bus. Actors can subscribe, publish and request messages from any topic and subscriptions can be handled at any time.
  • The Actor System is highly extensive. You can add your own supervisor and materializers to add new features like implicit persistence or rendering of actors.

Showcase

Quick start

Creating your first actor system is easy and you don't need to understand everything that is happening under the hood. First you must install the package:

npm install tarant --save

Then create your first ActorSystem

let { Actor, ActorSystem } = require('tarant')
let system = ActorSystem.default()

And create your actor class:

class Ping extends Actor {
    ping() {
        console.log("PING")
    }
}

Then you only need to instantiate your actor and send messages to it:

let myPinger = system.actorOf(Ping, [])
myPinger.ping()

The application will continue running and processing messages until you stop the actor system:

system.free()

If you run the application you will see the following output:

PING

Contribution PRs Welcome Issues Welcome

PR and issues are always welcome as a quick way of contributing to the project. Remember to be polite, this is a open source project and ordinary requirements for PRs and issues are also a requirement.

If you want to be a long-term contributor and participate actively on the design of new features on the project, contact us! Check the package.json to see who you need to contact.

Created my free logo at LogoMakr.com

Keywords

actor system

FAQs

Package last updated on 10 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.