obsidienne
Shoutcast server and cache
Hi,
I’m creating with friends a little website around a shoutcast radio. We have a JS and an iOS player.
Those player display the standard music metadata (title, artist, song art) but also additional data from our website like the suggestor, its rank, …
Those player display the current and the last 5 songs played.
The shoutcast API is suboptimal because you have to check every X seconds if the song has changed and it gives you mostly the file title being streamed.
How can i create an OTP ? app:
- with a 5 second scheduler integrated
- with a in memory fifo/queue store to save the last 5 songs played and the current song (and metadatas)
Between ETS, queue form erlang, genstage or task.. i’m a bit lost
thanks
Most Liked
OvermindDL1
A GenServer returning a ‘timeout’ option of 5 seconds (5000 in milliseconds as I recall it takes) would be easy, just whenever you get the timeout then query and send the results to the listening process (say a Phoenix.PubSub or so for broadcasting to a web page).
You could just store it in ETS so everything can access it immediately.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








