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

Migrate to AsyncIO/Concurrent logic #199

Open
blueset opened this issue Apr 11, 2020 · 1 comment
Open

Migrate to AsyncIO/Concurrent logic #199

blueset opened this issue Apr 11, 2020 · 1 comment

Comments

@blueset
Copy link
Member

blueset commented Apr 11, 2020

Is your feature request related to a problem? Please describe.
Concurrency has been popular for IO heavy applications like EFB. There’s a wide range of frameworks like aiorequests / telethon / fbchat-async that has first-class AsyncIO support. We might need to redesign our framework to adopt that.

Describe the solution you'd like
Need sometime to think of a redesign of the framework, especially the communication part, to adopt AsyncIO.

Currently the most popular slave channel, EWS, is depending on unmaintained-for-years libraries (namely itchat and wxpy) that has been forked and vendored into EWS. We might need to rewrite them to fit the AsyncIO pattern. Or consider using libraries like trio to wrap around them.

Describe alternatives you've considered
N/A

Additional context
As always if you have any suggestions on how we shall design the framework or so, leave a comment below.

@shejialuo
Copy link

Hi, @blueset. Actually, I am interesting in this problem. And I want to ask you some questions.

Now the EFB framework initializes the Thread for one master channel and many slave channels. And all the channels define start_poll method to start their own functionality. And If we want to use asyncio library, why not just change the Threads to Coroutines. I know it won't such simple, so I am confused about the needs.

  • How the concurrent should be? Channel-to-Channel level or something else?
  • For a better way, we shouldn't change the API provided, but could it be realistic?

And thanks again for your patience.

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