georgymh / decentralized-ml

Interoperable and decentralized machine learning.
Apache License 2.0
9 stars 5 forks source link

Blockchain Patch #33

Closed kiddyboots216 closed 5 years ago

kiddyboots216 commented 5 years ago

Listening has been refactored to use CRON/timers (in keeping with Scheduler) rather than asyncio.

Blockchain Gateway/Utils are cleaned.

Tests for Gateway/Utils are cleaned. The integration test for the Gateway is on #31

georgymh commented 5 years ago

@kiddyboots216 curious to know, why the shift from asyncio to CRON/Timers? Also, what from the list of changes wasn't addressed in this PR?

@neeleshdodda44 and @nzoghb, I'm letting you take over this PR as reviewers since you started reviewing first. I'm just here spectating lol.

kiddyboots216 commented 5 years ago

@georgymh so a few things re: the way the rest of the system interacts w blockchain are left in the communication-job PR. And the integration tests (which are pretty hefty) are in that PR as well. Shifted to CRON from Asyncio because Python has a global interpreter lock, which is why Async is useless (this is also why everyone uses Go instead of Python) and using CRON rather than Asyncio makes the service suffer less slowdown. This is why Python uses "multiprocessing"; however because we're using a single thread for the Scheduler (and would want to use a single thread for listening) the async was slow.