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

Switch to event based listening #3

Open
LivInTheLookingGlass opened this issue May 21, 2017 · 6 comments
Open

Switch to event based listening #3

LivInTheLookingGlass opened this issue May 21, 2017 · 6 comments

Comments

@LivInTheLookingGlass
Copy link
Contributor

The current daemon is brittle and inefficient. What needs to happen is a simple event loop for me to tie into. Unfortunately this is where my Python skills are less than stellar, so I'll need to learn what frameworks are available.

@LivInTheLookingGlass
Copy link
Contributor Author

As a sidenote, this would allow for supporting WebSocket and potentially UDP

@Kentoseth
Copy link

Kentoseth commented Sep 21, 2017

Will this library be useful: AsyncIO

It is part of the standard-library and will thus have no external dependencies.

Alternatively, there is also this: aioHTTP

Supports both Server WebSockets and Client WebSockets out-of-the-box.

aioHTTP is built on top of asyncIO, so the 2 could work together.

And it looks like AsyncIO itself also has UDP support: link

@LivInTheLookingGlass
Copy link
Contributor Author

I'm definitely aware of AsyncIO. The problem is that I don't know how to use it. I'll definitely get there eventually, but classes have kept me from working on this too much.

@Kentoseth
Copy link

Can you break down exactly what is the first minimum-viable goal for a rewrite using asyncIO/aioHTTP?

If the goals/targets are clear, I can attempt a small re-write on an experimental branch.

@LivInTheLookingGlass
Copy link
Contributor Author

The minimum viable goal would be

  1. Supporting all the same transports it does now
  2. Modeled at least vaguely like the Javascript one (although that might not be possible, so loose goal)
  3. The total elimination of the BaseDaemon clases
  4. Stretch goal: The ability to understand WebSockets

If 4 is achieved, then you would no longer need bridge nodes between browsers and python.

@LivInTheLookingGlass
Copy link
Contributor Author

Also, if it's able to support multiple event loops, that's definitely a large plus. Because some of them are significantly faster than AsyncIO.

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

No branches or pull requests

2 participants