[erlang-questions] NineNines Bullet
Tue Apr 2 23:09:31 CEST 2013
That's the idea.
As for the rest:
stream = message from the browser, info = message from erlang
On 04/02/2013 11:00 PM, Lee Sylvester wrote:
> Yes, that's how I was seeing it. Mentally at least. I've got a similar thing built in Go which I want to port to Erlang using Bullet. Go's websocket implementation is quite far from complete and has been a headache to work with. I'm hoping to have something a lot more robust with Erlang.
> So, let me get this straight… init handles the connection setup and terminate handles the teardown. So, I can make calls in those two functions to add the user to a room collection or removing her.
> What are the differences between stream and info? When do those come into play? I'm assuming one (stream?) is invoked when data is sent from the end user. Is that right?
> On 2 Apr 2013, at 21:35, Loïc Hoguin <> wrote:
>> Rooms is a bit out of scope. I agree it could use some more documentation though.
>> The basic idea is that when your process connects its pid is added to a list somewhere (gproc, gen_server, anything else). When a message is sent to the room, all pids in the list receive it. You can also broadcast when someone enters or leave the room. And you remove the pid from the list when it's gone (using monitors for example).
>> On 04/02/2013 10:27 PM, Lee Sylvester wrote:
>>> Hi Loïc,
>>> Yes, I spotted that. It just doesn't seem very explanatory. I was hoping for something a little bit more extensive. Preferably something that used the concept of rooms. The NineNines support page for Bullet is also a little thin… :-S I guess I'm too much of a noob.
>>> On 2 Apr 2013, at 21:23, Loïc Hoguin <> wrote:
>>>> On 04/02/2013 10:08 PM, Lee Sylvester wrote:
>>>>> Hey guys,
>>>>> Does anyone here know of a good tutorial or chat example of NineNines Bullet handler for Cowboy?
>>>> Have you looked at the clock example that comes with it? Building a chat on top of that is just making connection processes talk to each other using a registry like gproc or a gen_server that dispatches messages.
>>>> Loïc Hoguin
>>>> Erlang Cowboy
>>>> Nine Nines
>> Loïc Hoguin
>> Erlang Cowboy
>> Nine Nines
More information about the erlang-questions