[erlang-questions] [ANN] Bullet 0.2.0

Loïc Hoguin essen@REDACTED
Mon Jun 11 19:18:05 CEST 2012

On 06/11/2012 07:11 PM, Motiejus Jakštys wrote:
> On Mon, Jun 11, 2012 at 5:18 PM, Loïc Hoguin<essen@REDACTED>  wrote:
>> Hello!
>> I'm glad to finally announce the first beta version of the Bullet project.
>> Bullet is a Cowboy handler and associated Javascript library for
>> maintaining a persistent connection between a client and a server.
>>   https://github.com/extend/bullet
>> In short: it does websocket when they're available, it simulates them with
>> long-polling otherwise, both transports have the same exact API client and
>> server-side, and it reconnects automatically on disconnection.
>> It's already used in production by myself at least. The documentation is
>> probably a bit lacking so feel free to send some feedback.
> Hi,
> looks interesting indeed.
> It could be very useful if it had -callback specs, so we could
> implement a "bullet handler". Something like this:
> -module(bullet_handler).
> -callback init(eh(), eh(), list(), true | false | once) ->  {ok,
> something(), term()}.=
> (I was too lazy to go to cowboy internals to look better at it).
> -callback stream(...) ->  ...
> In that case:
> * we will know what callback modules are supposed to return
> * dialyzer will verify we are returning sane things
> Since -callback is supported only from R15B. I will ask a follow-up
> question for erlangers to find out erlang version using macros. Then
> -callback could be "constanted out".
> The client library looks awesome, thanks for that. :)

Yeah that's coming for the next version. We decided to stop supporting 
R14 after Cowboy 0.6 so all the callback stuff will be added after that 
release, without the macros.

Thanks for the feedback!

Loïc Hoguin
Erlang Cowboy
Nine Nines

More information about the erlang-questions mailing list