tarant

Tarant

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://www.tarant.io/ 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.

Tarant Vue

Motivation Provide the capabilities to actors to be render using the vue framework. Installation add it to your project using npm install tarant-vue --save or yarn add tarant-vue Usage Extend the vue actor with a template and the properties to bind to the id of the actor will relate to the html component id import { VueActor } from "tarant-vue"; export default class AppActor extends VueActor { constructor() { super("#app") this.

Tarant Local Storage

Motivation Usually complex applications need to store offline part of the state, so it can be synced back or reused later. This module lets tarant store your actors serialized in the local storage and recovered implicitly. Installation Add it to your project using npm install tarant-local-storage --save or yarn add tarant-local-storage Usage You need to mark which classes need to be exported first. Usually this is done with the LocalStoragePersisted

Tarant Sync Client

Motivation Provide the capabilities to actors to synchronize with a backend. Installation add it to your project using npm install tarant-sync-client --save or yarn add tarant-sync-client Usage Initialize the sync client with the configuration you desire and add it to your actor system as both a materializxer and a resolver import { RemoteResolverMaterializer } from "tarant-sync-client"; import AppActor from '../AppActor'; const config : any = { sync: { active: true, delay: 1000 }, paths: { pull: "/pull", push: "/push", }, actorTypes: { AppActor } } const remote = new RemoteResolverMaterializer(config) const system = ActorSystem.

Tarant Sync Router Express

Motivation remote-sync server for bindings clients using routers or tarant-sync-router-express Installation add it to your project using npm install tarant-sync-router-express --save or yarn add tarant-sync-router-express Usage initialize your controllers/routers by calling the SyncController with the actor system and the wanted configuration. Adding them to your express app. import SyncController from "tarant-sync-router-express" import { ActorSystem, ActorSystemConfigurationBuilder } from 'tarant' import AppActor from '../AppActor' const app: express.Application = express() const port: number = 3002 const config : any = { paths: { pull: "/pull", push: "/push", }, actorTypes: { AppActor } } const system : any = ActorSystem.

Tarant DB Persist

Motivation Provide the capabilities to actors on the backend to be persisted using waterline adapters. Installation add it to your project using npm install tarant-db-persist --save or yarn add tarant-db-persist Usage Initialize the sync client with the waterline adapter from the persist storage you will be interested on import { ActorSystem, ActorSystemConfigurationBuilder } from 'tarant'; import * as diskAdapter from 'sails-disk'; import { PersistResolverMaterializer } from 'tarant-db-persist'; import AppActor from '.