This is a read-only archive of the Mumble forums.

This website archives and makes accessible historical state. It receives no updates or corrections. It is provided only to keep the information accessible as-is, under their old address.

For up-to-date information please refer to the Mumble website and its linked documentation and other resources. For support please refer to one of our other community/support channels.

Jump to content

Python / Ice / Asynchronous Questions


darkman802
 Share

Recommended Posts

I've never done anything with Python that would be considered asynchronous / concurrent, so I'm having some trouble understanding if this project I have in mind will work or not.


I was thinking about getting real time events from murmur servers, sending them to rabbitmq (which is a messaging broker), and then consuming the events in different ways.


To do that I would use Python to subscribe to the ice events of the virtual servers. The part I'm not sure how will work is when I want events from multiple virtual servers.

Since I don't think Python is asynchronous by default, how would I connect to multiple virtual servers, and what would happen if multiple events were sent at the same time?

Would it "just work", or would python ignore some of the events because it can only do one thing at a time?

Link to comment
Share on other sites

I believe ice supports some sort of asynchronous operations, but I'm just not sure if it does what I'm wanting it to do. The idea is to subscribe to the events of multiple virtual servers and when an event/callback is received, to push that event into rabbitmq using the python library pika https://github.com/pika/pika.


Another question comes up when pika is introduced because in the examples for an asynchronous publisher http://pika.readthedocs.org/en/0.9.13/examples/asynchronous_publisher_example.html, it uses an io loop to respond to events from rabbitmq (such as to reconnect if it receives a disconnected event).


I'm not sure what I would need to do to to get ice working with pika. I assume ice uses some kind of io loop because one of the ice commands you usually call is

communicator.waitForShutdown()

or something similar to that.

Since there seems to be two event loops in the fray I'm not sure if they would work together, or what I would need to do to get them to work.

Link to comment
Share on other sites

 Share

×
×
  • Create New...