I've checked in some initial sketch examples in examples/go, they don't
work yet as the implementation is just stubs but I'd like to hear any
feedback on how they look.

The main difference from python examples is that since Go has good
facilities for creating and listening on connections, and it is more
natural in Go to handle multiple connections concurrently in goroutines,
I am doing all the connection handling in Go and then just running the
reactor on individual connections.

The big question this raises is what we do if a handler on one
connection (e.g. receiving messages) opens a new connection (e.g. to
send messages on a different connection.) The natural Go approach to
this would be to start a new goroutine for the new connection and run it
with a new handler (or in dire straits use a single thread-safe handler
on both)

I need to put together some examples to show what this would look like,
in particular for sending replyto messages - when to use the existing
connection and when to open a new one?

Cheers,
Alan.


Reply via email to