[erlang-questions] NFI's and running multiple VM's
Fri Mar 13 14:03:05 CET 2015
Your options are:
1. Use the NIF wrapper and launch an Erlang node for each session. You can
use distributed Erlang to make this seem like a single system, but I have
doubts about this scaling well.
2. Forget the NIF and write a port process in the language of your choice.
This will scale better.
3. Can you skip libspotify entirely and consume the spotify Web API? You
could use native Erlang http clients in that case. This would scale best.
On Thu, Mar 12, 2015 at 5:45 PM, Leandro Ostera <me@REDACTED> wrote:
> Hello there guys,
> I've been shoving tons of Erlang content down my
> information-ingestion-system for the past few days, and I'll continue to do
> so in the next few weeks while I embark on this strange land.
> Anywho, I wanted to say hi and thank everyone who either has spoken at (or
> is planning to) that appears on the Erlang Solutions vimeo videos –which
> has been my main source of getting into this besides Fred Hebert's book
> (got the rocking paperback edition)– or put up an article online somewhere.
> Kudos for the great material.
> And for a beginners question...
> I was trying to use a quite old erlang wrapper around libspotify
> <https://github.com/arjan/espotify>, which seems to be defining a bunch
> of NIFs, to make an audio streaming server that would keep N web-based
> clients playing the same audio at (give or take milliseconds) the same
> time. The problem is that according to one of the source files
> it'd only be able to have one open Spotify session per VM, which of course
> didn't sound too exciting. Is this a limitation of building the wrapper as
> a set of NIFs? What'd be a way of not having these sessions attached to the
> VM but instead maybe to a particular process that would take care of
> buffering/streaming the audio? If the session was to stick to the VM,
> what'd be a practical way of making this support 100 sessions (or upwards)?
> I hope these questions make sense.
> Frankly, I've been postponing this day for the past 2 years or so.
> Hopefully it's the right time now :)
> Thanks and cheers!
> Leandro Ostera
> Github <http://github.com/ostera> | LinkedIn
> <http://linkedin.com/in/leostera> | Facebook
> <http://facebook.com/leostera> | @leostera <http://twitter.com/leostera>
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions