qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject Proton's new async features - any examples? 'cause I'm scratching my head!
Date Fri, 14 Mar 2014 15:38:05 GMT
Hey folks,
I've noticed that PROTON-525/531/534 cover work to expose some bits of 
messenger that were previously internal and allow messenger to be driven 
from an external poll/select/epoll.

I'm quite interested in this from the perspective of the JavaScript 
bindings that I'm working on, but to be honest I'm currently left 
scratching my head trying to figure out how the new APIs are intended to 

I don't suppose that there are any examples available?

I currently have a recv-async.c and send-async.c (attached) they are 
still a bit hacky as they are currently work in progress as I push the 
necessary features into emscripten (the C->JavaScript compiler I'm 
using) but they both work in either native C or JavaScript (the 
emscripten_set_network_callback gets triggered by WebSocket activity and 
allows fully async behaviour, so I don't need any nasty polling).

I've just merged the latest proton-c stuff to the branch I'm working on 
for the JavaScript bindings and everything is still working nicely with 
the current approach, but I'm guessing that the new capabilities might 
be able to make things more efficient?

I'm currently working on actual binding code, so I can call messenger 
direct from native JavaScript as opposed to compiling C/C++ into 
JavaScript, so far it has got a lot of parallels with the python 
bindings - though clearly only async stuff makes any sense for JavaScript.

I'd really appreciate tips and code samples from the folks who have been 
working on this API.


View raw message