Introduction/Question

48 views
Skip to first unread message

Darryl Pierce

unread,
Mar 4, 2014, 8:43:46 AM3/4/14
to eventm...@googlegroups.com
Hi, all! I'm new to the group and wanted to discuss my plans and what I'd like to do using Event Machine.

I work on the messaging project called Qpid [1], doing language bindings for Ruby and Perl. What I'm wanting to do is integrate Event Machine and our Proton project [2] for other projects that want to subscribe to use it for messaging.

But I'm not sure exactly how to approach this. Looking through the protocols modules it seems that each wants to be its own implementation of the desired protocol; i.e., the smtpserver.rb module implements an actual SMTP server.

What I want to do is build a protocol module (assuming that's the right approach) on _top_ of our existing engine, which will handle accepting connections, etc. What I would like to do is have the EM bits send out notifications based on events (message queued, message sent, message received, connection received, reply received, etc.).

What's the best approach to this?


Sorry for this being a possible repost: I emailed from my regular client but didn't see the message show up.

Darryl L. Pierce

unread,
Mar 4, 2014, 3:49:22 PM3/4/14
to eventm...@googlegroups.com
So chatting with some people in IRC it was recommended to me to extend
EM::Channel with my, which worked out pretty nicely. My new class
(EM::P::AMQPEndpoint) wraps the underlying Messenger type from the
Proton libraries and, when a message is received, pushes that message
into the Channel for processing.

Now, how would one refine this in order to send more messaging-related
events. What I'm thinking is notifications on a per-message as well as
per-connection basis. So, for example, A creates a message and sends it
to B. There are scenarios where A wants to know that B received the
message, or that B has either acknowledged or rejected the message, or
that B has sent a reply to that specific message. In such a case I would
like to fire off events like:

* message_sent
* message_send_failure
* message_received
* message_acknowledged
* message_rejected
* reply_received

But I don't see all of the above represented in the protocols modules.
What would be the recommended path for adding such notifications?

--
Darryl L. Pierce <mcpi...@gmail.com>
http://mcpierce.blogspot.com/
Famous last words:
"I wonder what happens if we do it this way?"
Reply all
Reply to author
Forward
0 new messages