Ubuntu Streaming Install
Big Picture Streaming Diagrams
Here's a diagram showing how the different components of this installation fit together.
Streaming is optimized so that Stream API inputs are threaded as they arrive on the Row64 Server.
Install Components
Sublime Text Editor
For quick cross-platform setup, we often use Sublime Text. It can be installed with the following command:
sudo snap install sublime-text --classic
To open a file in sublime, you can use the subl
command.
To keep things simple, we show editing with Sublime in these instructions.
Install Row64 Server V3.5
Follow the instructions in the Server documentation to install Row64 Server V3.5.
Install ByteStream Viewer
ByteStream Viewer is useful for debugging both .ramdb and .dash files. You can watch streaming changes as they happen, so it’s great for diagnostics.
Download row64bsviewer-3.5_amd64.deb here:
https://app.row64.com/Install/V3_5/RedHat/row64bsviewer-3.5-0.x86_64.rpm
From the terminal, run:
sudo dpkg -i row64bsviewer-3.5_amd64.deb
Pin Bytestream to Favorites
Click the App button in Ubuntu:
Type “ByteStream and right click “Pin To Dash”
Test ByteStream
Navigate in Nautilus (Ubuntu File Explorer) to the folder:
/var/www/ramdb/live/RAMDB.Row64/Examples
Drag in the file Atari.ramdb. Note Table/Text switcher on the top right.
Install Row64 Stream
Download row64stream-3.5_amd64.deb here:
https://app.row64.com/Install/V3_5/Ubuntu/row64stream-3.5_amd64.deb
From the terminal, run:
sudo dpkg -i row64stream-3.5_amd64.deb
Next, connect the streaming API to the server.
From the terminal, run:
cd /opt/row64server/row64stream/install
sudo python3 Connect_Stream.py
Verify row64stream is running
From the terminal, type:
sudo systemctl status row64stream
You should see:
Other useful commands:
sudo systemctl start row64stream
sudo systemctl stop row64stream
Test Examples and Debugging
To confirm that the setup works, run test examples as directed on the following document:
Test Examples
Install Local Kafka
Turn OFF all Streams
Before you install Local Kafka, set all your tests in apiconfig.json to OFF.
Also, run the following command:
sudo systemctl stop row64stream
Local Kafka Features:
For quick testing of row64server & Kafka on the same server/VM:
-
Automatically installs Kafka as a service & all dependencies (including Java)
-
Installs row64kgen (a Kafka producer that streams the Motion example)
-
Good for learning and getting used to the features
-
You can switch out your own Java/Python/Rust/Go producer with the same setup
Requires that row64server and row64stream is already installed.
Local Kafka Install - row64kgen:
Download row64kgen-3.5_amd64.deb here:
https://app.row64.com/Install/V3_5/Ubuntu/row64kgen-3.5_amd64.deb
This will install both kgen & a local Kafka service.
From the terminal, run:
sudo dpkg -i row64kgen-3.5_amd64.deb
Next, connect Local Kafka & kgen
From the terminal, run:
cd /opt/row64server/row64kgen/install
sudo python3 Connect_Ubuntu.py
Test Running KGen (Kafka Producer / Generator)
Run row64kgen from the terminal:
cd /opt/row64server/row64kgen/
./row64kgen
The log should begin to repetitively output a success message.
Second Terminal: See Producer Output
You can log the Kafka producer output in another terminal.
Type:
/opt/kafka/bin/kafka-console-consumer.sh --topic r64_kafka_stream.topic --bootstrap-server localhost:9092
See Local Kafka Drive Dashboard Browser
Edit the streaming config file by typing in the terminal:
subl /opt/row64server/conf/apiconfig.json
And turn all other tests to OFF Turn the example Motion_LocalKafka to “ON” and save the file.
Restart the Stream API with:
sudo systemctl stop row64stream
sudo systemctl start row64stream
Navigate to the following link:
http://localhost/dash/examples/motion
And see the player motion driven by the local Kafka feed.
Connect Cloud Kafka
Cloud Connection Example
Open the apiconfig.json file and study the settings on “Motion_DeltaStream”
It shows an example of an AWS connection.
Other than extra “METADATA” tags it works in the exact same manner as the Local Kafka example. If you have multiple BOOTSTRAP_SERVERS, you can comma separate them.
API Configuration Diagram