Astra DB Loom
Loom is a thread based chat server, where users can send messages to one or more threads via hashtags (ex. I'm heading to the park at noon #family #friends #frisbee_club ).
60 minutes • Advanced
Updated February 3, 2022
Astra DB Loom
60 minutes, Advanced, Start Building
Loom is a thread based chat server, where users can send messages to one or more threads via hashtags (ex. "I'm heading to the park at noon #family #friends #frisbee_club" ). Users can subscribe to new threads they see by clicking them and start new threads but just adding a new hashtag to a message.
Quick Start
-
Signup for DataStax Astra, or login to your already existing account.
-
Create an Astra DB Database or use an existing one.
-
Create an Astra DB Keyspace called
sag_loom
in your database. -
Generate an Application Token with the role of
Database Administrator
for the Organization that your Astra DB is in. -
Once the app is finished launching in the Gitpod IDE, copy the
.env.example
file to a file named.env
and fill the required values in from your Application Token and Astra DB connection settings. -
Start the example by running the following command in the Gitpod console:
source .env
mix phx.server
How this works
The app demonstrates working with DataStax Astra DB, Elixir, and Phoenix Liveviews together. The project attempts to make the best use of this stack. Messages histories are saved and loaded in Astra DB, while new messages are shared via Phoenix channels between all active users in a "thread". The goal is a fast, scalable, and durable chat/messaging application.