Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other alternatives to RabbitMQ #7

Open
giovannipizzi opened this issue Oct 14, 2021 · 4 comments
Open

Other alternatives to RabbitMQ #7

giovannipizzi opened this issue Oct 14, 2021 · 4 comments

Comments

@giovannipizzi
Copy link

Hi Chris, just adding here the link to another message broker that a colleague just mentioned to me today:
https://mqtt.org/
This seems to be much more lightweight than RabbitMQ, as it's designed for IoT devices, but has similar concepts (actually I think there is a RabbitMQ plugin for the mqtt protocol).

It seems there are many py client libraries, a few are unmaintained but at least one or two seem to be actively maintained (like the eclipse one). Beside checking if this would work for our usecase, one would need also to check if there are robust and easy to install servers/brokers (otherwise we just shift the problem rather than fixing it :-) ).

I just wanted to mention it here so we don't forget - a solution as proposed in this repo without additional servers has clearly that pro, but I fear that implementing a robust message passing protocol with guarantees is a lot of work, and relying on some existing protocol and implementation (but simpler to install and use than RabbitMQ) could be a good compromise.

(As a note there's also ZeroMQ but I think it's a much more low-level communication library, while mqtt has a full protocol definition).

@chrisjsewell
Copy link
Owner

Cheers Gio,

One thing I would kind of "counter" with though, is that we are not really looking for a message broker per se; this is our whole problem with our (mis)use of rabbitmq, a message broker is for passing messages, not for running processes.

I was actually talking recently to Marnik about things like rate limiting the amount calculations that can be submitted to a scheduler at a time, e.g. to deal with job limits on HPCs.
I noted that if you can get this "vertical integration" of a process coordinator right, this kind of thing becomes trivial to implement.

I do take your point about implementation work though; (good) re-use of existing libraries is always something I would look for; although again our current reliance on kiwipy + aiopika + aiormq is not exactly simple or easy to debug.
I noted recently (aiidateam/kiwipy#100), for example, that this is the sequence of calls required just to send a simple kill message:

verdi process kill

plumpy.process_comms.RemoteProcessThreadController.kill_process msg={"intent": "kill", "message": "..."}
-> kiwipy.rmq.threadcomms.RmqThreadCommunicator.rpc_send (wrap syncio await with timeout)
-> async kiwipy.rmq.communicator.RMQCommunicator.rpc_send
-> async kiwipy.rmq.communicator.RmqPublisher.rpc_send (converts message to aio_pika.Message)
-> async kiwipy.rmq.messages.BasePublisherWithReplyQueue.publish_expect_response
-> async kiwipy.rmq.messages.BasePublisherWithReplyQueue.publish
-> async aio_pika.exchange.Exchange.publish
-> async aiormq.channel.Channel.basic_publish

As a note there's also ZeroMQ

FYI, this is what circus already uses

@giovannipizzi
Copy link
Author

I agree with your points, and we'll need to say if a simple solution (e.g. the one you propose) is simple enough (probably yes) and robust enough (hard to say without proper testing). I guess the discussion on a replacement for RabbitMQ is a good topic for one of the discussions of a coding week :-)

@chrisjsewell
Copy link
Owner

Indeed 👍

@csadorf
Copy link

csadorf commented Feb 24, 2022

I've made a comment on the associated AEP relevant to this question: aiidateam/AEP#30 (comment) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants