Introducing RSpace

RSpace-0.1 is the first implementation of the storage layer component of the RChain blockchain.

The RChain Coop’s development team is pleased to announce the initial release of the storage layer — RSpace. RSpace — 0.1 is an early version of the RChain storage implementation. This is another of the pre-production release milestones toward the release of the RChain blockchain.

About This Release

How RSpace — 0.1 works

RSpace — 0.1 is a Scala library that has been designed to provide a disk-backed tuple space to the Rholang interpreter. It is based on an earlier, in-memory implementation written in the Rosette Base Language (RBL).

Traditionally, a key-value store provides two main functions for interacting with a given store: put which persists a piece of data at given key, and get which retrieves the data stored at a particular key.

RSpace — 0.1 departs from this model and provides a novel approach to storing and retrieving data.

Here are some key differences:

  • Rather than associating a piece of data with a particular key, in RSpace, a piece of data is associated with a channel. Roughly speaking, in RSpace, a channel can be any Scala type that can be serialized to and deserialized from Array[Byte].
  • In addition to storing data, RSpace can also store continuations which represent actions to carry out once the data is retrieved. Roughly speaking, in RSpace, a continuation can be any Scala type that can be serialized to and deserialized from Array[Byte].
  • A continuation is associated with a list of channels and a list of patterns. Like channels and continuations, patterns can be any Scala type that can be serialized to and deserialized from Array[Byte]. Users of rspace provide their own custom match function for matching patterns against data.
  • The two main functions for interacting with a given store are:
  • consume, which searches the store for data matching a given list of patterns at a given list channels; and
  • produce, which, given a piece data at a given channel, searches the store for matching continuation, using existing data in the store to help satisfy the match.

Read the RSpace — 0.1 specification for complete details.

How to use RSpace — 0.1

With this release RSpace — 0.1 implements the basic tuplespace functionality for use in the Rholang interpreter, included in the RNode — 0.2 release. RSpace — 0.1 allows the Rholang interpreter to persist and retrieve objects related to its execution state. It will not execute those objects. RSpace — 0.1 also exists as a general storage layer outside of the context of the Rholang interpreter and provides a self-contained library for use by Scala developers.

Specifically developers can use the library to:

  • Fetch the library as a JAR or build it from source
  • Read documentation for using the library
  • Read the documentation for the Scaladoc API
  • Store and retrieve data from the library

RSpace — 0.1 does not support

  • Storage functionality relating to history, blockdag, or blockchain
  • Operation in a distributed setting
  • Support for system processes

For more information and detailed instructions on using rspace, see the tutorial.

Get started with RSpace — 0.1

Download this release and find documentation at the RChain developer portal: https://developer.rchain.coop

We want to thank all community members for their continued support and invite everyone to test this new release. Building and testing a network of nodes at every stage of the development process is key to the success of delivering a blockchain with industrial-scale utility. Direct questions and comments to the RChain developer forum. Bugs can be filed on our JIRA.

Read more about the RChain Coop.

Look for more releases in the coming weeks as we continue to build the RChain blockchain.