Skip to content

Async switch #17

@asmodehn

Description

@asmodehn

Since pyzmp role is mostly to transfer messages from Node A to Node B, and our current usecase is to transfer messages between Web Servers and Ros Nodes, It makes sense to use an async framework.
Check : http://klen.github.io/py-frameworks-bench/

Since we also have to support python 2.7 we have a number of candidates :

  • trollius -> deprecated
  • asyncio -> python3 only
  • twisted -> looks good. Might move to support asyncio. Autobahn supports twisted and asyncio.
  • tornado -> primary usecase is web. our usecase is more generic.

So twisted seems the way to go.

@dhirajdhule I have thought about that for a while, and I think this is the way to go for pyzmp. To start integrating twisted to replace our main loop in there, and have it managed by a long time proven and maintained python package.

To be clear, the communication between two processes is another topic, but inside one process, we should start implementing asynchronous behaviors. Later on we will be able to improve pyros and rostful with this as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions