raokrutarth / manufacturing-os

A POC distributed operating system for geo-seperated automotive manufacturing
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

[Attempt] Fix async event loops #62

Closed nishantrai18 closed 4 years ago

nishantrai18 commented 4 years ago

Discuss how to handle async raft_helper function calls in NodeProcess. We require it to modify state, get leader information, etc. But we cannot make Thread run() async directly. Also ideally speaking we should not be executing all NodeProcesses in the same event loop as it involves a barrier-like construct await and makes our system not truly multi-process based.

@raokrutarth Since you're the most familiar with asyncio and implemented the original design, do you have any suggestions on how to proceed? Or hopefully, if there's a super simple solution for this which I overlooked?

nishantrai18 commented 4 years ago

Note: This is not for merging, only for discussion.