qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: proton-j reactor implementation?
Date Tue, 31 Mar 2015 15:02:25 GMT
On Mon, 2015-03-30 at 00:11 +0100, Adrian Preston wrote:
> Hello all,                                     
> 
> I've been following the development of the reactor API and think that it looks really
neat. Is anyone working on a pure Java version? I'd be interested in helping.
> 
> Regards
> - Adrian
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> 

I'm currently working on a Go version which is not directly relevant,
but porting directly from the python handlers.py and it is pretty
straightforward. That's where I would start. For Go I also had to wrap a
bunch of lower-level proton details but the task should be easier for
Java since all that stuff already exists in Java.

In Go I am not using the proton reactor to establish or select over
connections, so I'm not using any of the reactor or selectable events. I
have a goroutine per connection pumping a proton transport with separate
event handling per-connection so we have connection concurrency but each
proton engine is only used in a single thread.

I'm not sure what the right approach is for Java. Having a C-based
reactor is useful in C and for some bindings (e.g. the python binding
uses it) but in languages that have their own version of event
loops/polling/selecting it may be better to go with the native
approach. 

Cheers,
Alan.


Mime
View raw message