riptide v0.5.0-beta2 API Reference
Modules
Riptide is a data first framework for building realtime applications. Riptide makes building snappy, realtime applications a breeze by letting you think purely in terms of your data and functionally about what should happen when it changes.
Riptide Interceptors let you define simple rules using Elixir's pattern matching that trigger conditionally when data is written or read. Each one is defined as a module that can be added to your Riptide configuration for easy enabling/disabling.
A mutation represents a set of changes that can be applied to a Riptide.Store
. This module contains functions that make it easy to compose complex mutations and combine them together.
Riptide stores are where data can be written to and read from. This module provides a behavior that can be implemented to integrate any data store with Riptide. Regardless of the underlying store, Riptide consistently provides a tree data model
This module provides a macro to define a store that splits up the data tree between various other stores. It is implemented via pattern matching paths that are being written or read and specifying which store to go to.
This store persists data to LMDB using a bridge built in Rust. LMDB is a is a fast, memory mapped key value store that is persisted to a single file. It's a great choice for many projects that need persistence but want to avoid the overhead of setting up a standalone database.
This store persists all data into an ETS table. It will not survive restarts and is best used for local development or in conjunction with Riptide.Store.Composite
to keep a portion of the tree in memory.
A proxy store that will write data to multiple stores.
This store persists data to a single Postgres table as materialized paths. It is best used in scenarios where your application will have multiple erlang nodes running that all need shared access to data. Note with this store Postgres is treated like a dumb key/value store and does not take advantage of any other Postgres capabilities.
This store forwards all mutations and queries to another Riptide instance. This is useful if you have multiple Riptide instances but want all of them to write and read from a primary node. This is comparable to web applications that write to a centralized Postgres database. Used in conjuction with Riptide.Store.Composite
will allow you to store some data globally and some data locally.
This module allows you to generate sortable Time UUIDs that can be used to control sorting order in Riptide stores. They have a time component that defaults to creation time as well as a random component.