Onboarding

S2 is available for preview. Apply now to get started!

1

Log in to the dashboard.

2

Create a new organization and generate a new authentication token.

Get started with the CLI

1

Install the S2 CLI

This method works on macOS and Linux distributions with Homebrew installed.

brew install s2-streamstore/s2/s2

The binary should be installed as s2.

2

Persist your authentication token

s2 config set --auth-token <your-auth-token>
3

Create a new basin

Basin names must be globally unique. Try creating a basin with your GitHub handle, something like my-username-basin.

A basin name must be between 8 and 48 characters long and comprise lowecase letters, numbers and hyphens. It cannot begin or end with a hyphen.

export MY_BASIN_NAME="<your basin name>"
s2 create-basin $MY_BASIN_NAME

Check if the basin is active. You should see your basin’s name in the list with an active status:

s2 list-basins
4

Grab your popcorn!

Nothing better than Star Wars to get us a good feeling of how we can exercise append and read sessions and see what data in motion looks like.

We will start by creating a new stream called starwars.

s2 create-stream s2://$MY_BASIN_NAME/starwars

If you remember the good old days of ASCII art, some of you may have streamed Star Wars from towel.blinkenlights.nl on a telnet client!

We will do the same, except we will “append” the movie to our starwars stream, and read from the stream live.

Start by creating a read session like so:

s2 read s2://$MY_BASIN_NAME/starwars -s 0 2> /dev/null

Open another terminal and start an append session:

export MY_BASIN_NAME="<your basin name>" # Set the basin name for new terminal
nc towel.blinkenlights.nl 23 | s2 append s2://$MY_BASIN_NAME/starwars

Go back to the previous terminal with read session to enjoy the movie:

Estimate your end-to-end latency

1

Create a new stream in a basin with a storage class you intend to use

s2 create-stream s2://$MY_BASIN_NAME/ping -s express
2

Run the ping test

s2 ping s2://$MY_BASIN_NAME/ping -n 10