Skip to content

Actyx/Actyx

Repository files navigation

Actyx

PRs welcome discord license

dockerhub Rust SDK JS/TS SDK

commits contributors


    

Actyx is a decentralized event database, streaming and processing engine that allows you to easily build local-first cooperative apps. For more information on how to use it, please refer to developer.actyx.com. You’re also very welcome to drop us a line in the forum and watch this space (or give it a ✩)!

Features

  • durable event stream storage in peer-to-peer network using libp2p and ipfs-embed
  • low-latency replication between nodes
  • tag-based and time-based indexing of events
  • full-fledged support for event-sourcing, guaranteeing eventual consistency
  • query language for extracting and summarizing events (still growing)

For our high-level roadmap please check out this wiki page.

Quick demo

First, make sure you already have cmake and protobuf-compiler installed on your machine by running the following commands:

cmake --version
protoc --version

If these trigger some errors, you might want to install these dependencies.

Then, to try it out, clone the repo and start Actyx from within the rust/actyx directory (you’ll want to compile with --release for more serious testing):

cargo run --bin actyx

In another terminal, also in rust/actyx, interact with the running Actyx process using the CLI:

# first create your keypair:
cargo run --bin ax users keygen

# then ask for all events:
cargo run --bin ax events query localhost 'FROM allEvents'
# or get the listen addresses from the discovery mechanism:
cargo run --bin ax events query localhost 'FROM "discovery" FILTER IsDefined(_.NewListenAddr) SELECT _.NewListenAddr[1]'

The last argument is an AQL expression, you can play around a little bit with the 'discovery' and (after some time) 'metrics' events that Actyx emits by itself. For emitting events and writing more complex logic, please take a look at the Typescript SDK.

How to get Actyx

For up-to-date binaries built for a variety of host systems please refer to Actyx Releases. If you want to build it yourself from source, you’ll need GNU make (version 4.2 or later), the current stable Rust toolchain, and language-specific development environments for building the respective SDKs.

Common commands are:

# compile Actyx and Actyx CLI for your current host system
make current

# build all Typescript
make all-js

There are provisions in the Makefile for cross-building, but those currently only work for Actyx employees — we’ll fix that soon.

Contributing

We welcome all kinds of contributions, whether they are in the form of bug reports, feature requests, or code. Just open an issue or pull request and we’ll guide you through the process where needed — we look forward to hearing from you!

Please be respectful when interacting with others on this repository. We reserve the right to ban you from participating in discussions or development in case of repeated or severe cases of uncivilised conduct.

Structure of the codebase

This is a monorepo, containing all parts that make up the Actyx suite. We have structured the parts by programming language:

  • js/sdk contains the Typescript/Javascript SDK
  • js/node-manager holds the Electron app Actyx Node Manager, a graphical version of the Actyx CLI
  • jvm/os-android hosts the Android-specific part of Actyx (written in Kotlin) and the build definition for the APK
  • rust/actyx is the main codebase containing the native code for Actyx and Actyx CLI
  • rust/sdk and rust/sdk_macros are the crates that make up the Rust SDK
  • rust/release is a tool for automatically generating version numbers and changelog

In addition to these main parts there are folders for github workflows, Azure pipelines, some design documents, JSON schema definitions, and the Windows installer. The integration directory holds our AWS-based integration test suite that ensures the interoperability of the various parts listed above. The website sources are in the web folder, accompanied by the documentation samples in third-party from which code snippets are extracted.

Licensing

Actyx, Actyx CLI, Actyx Node Manager, and the SDKs (for Typescript/Javascript, Rust) are available under the Apache 2.0 open-source license. This license and the accompanying NOTICE applies to all files in the dotnet, integration, js, jvm, rust, third-party, wix directories except where specified otherwise.

For commercial licensing please contact Actyx Support.