jola
The Authenticated Transfer Protocol, or atproto, is the protocol underpinning Bluesky and a growing ecosystem of apps and services, like Leaflet and Tangled. It’s a decentralized system where each user has all their data in one place, but can still participate in shared spaces. This has cool side-effects like there being tons of different frontends for Bluesky, and apps being able to integrate with each other without even having an API.
The mechanism that makes it feasible to have 3K+ active data servers, but a place like Bluesky that shows it all in one place, is the relay, which is an aggregated stream of all events from all data servers.
Jetstream is the user friendly way of consuming that data, as JSON records over websockets. Kite provides an Elixir native integration with the jetstream that manages the websocket lifecycle, keep alive, and automatic per connection filters.
For the wow factor, try it out in a terminal with Mix.install
Mix.install([:kite])
defmodule MyApp.Posts do
use Kite,
endpoint: "wss://jetstream.us-west.bsky.network",
collections: ["app.bsky.feed.post"],
kinds: [:commit]
def handle_event(payload, _context), do: IO.inspect(payload)
end
MyApp.Posts.start_link([])
Process.sleep(:timer.seconds(60))
Run it and enjoy all the live content on Bluesky in fast mode.
For a more permanent setup you’ll want to add the module to your application children list instead, and probably define the cursor handling callbacks. There’s a bunch of neat features, including filtering on collections (eg app.bsky.feed.post for all the Bluesky posts) and dids, the decentralized IDs of user accounts.
For a full set of features and more documentation, take a look at:
- HexDocs: Kite — kite v0.1.0
- Main repo: jola.dev/kite at main · Tangled
- Github mirror:
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










