Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Change ZHT Shell to Use threading instead of multiprocess #20

Open
mghlarsen opened this issue Nov 5, 2011 · 1 comment
Open

Change ZHT Shell to Use threading instead of multiprocess #20

mghlarsen opened this issue Nov 5, 2011 · 1 comment

Comments

@mghlarsen
Copy link
Owner

No description provided.

@mghlarsen
Copy link
Owner Author

After further investigation, it turns out that gevent is really persnickety about being used in multiple threads, and I think there's some sort of issue with gevent_zeromq. I've been thinking a lot about architecture lately, and this would be nice, but it will have to wait for the basics to get stable enough that I can refactor to where gevent isn't being used.

The final architecture that would work best would probably involve:

  • Multiple smaller devices, all event-driven, using inproc to communicate.
  • Some sort of threadpool handling transient tasks.
  • It may be possible to make the transient tasks more event-driven, but without gevent this might get hairy.

Anyway, until we get a certain base level of features, this probably won't happen, which honestly isn't terrible. The other solution is gevent handling stdin/stdout properly, which would remove the problem where blocking for stdin blocks all the other processes. I still like the rearchitecting for better scalability reasons, though. At some point it is likely that this will be less than entirely IO bound, and at that point, actual parallelism could be quite useful.

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

No branches or pull requests

1 participant