Automatic tfetch
Connection Upgrade
#33
Labels
enhancement
New feature or request
long term
The change described in this issue will likely take much longer than typical issues.
This is a proposal for a new feature that will vastly improve performance. Things like NVLink or InfiniBand can be used under the hood.
API
First, reviewing the
tfetch
interface (network concerns only, there are utilities for gradients not discussed because they won't need to change):A hidden feature is that the headers of these requests include a unique ID (that can be forwarded), to facilitate
user distinction. (This is how
sm.io.serve
can maintain user objects.)Current Impl
tfetch
currently implements point to point transmission withfetch
, a slow HTTP protocol. Ideally, this should be upgrade to something if possible. (In the case of federated learning across the network, nothing needs to change.)Better Impl
For performance reasons, the improved underlying communication protocol will need to be implemented natively. Flashlight is the right place for this. It can expose a multitude of APIs (based on hardware/OS constraints) that can be wrapped in JS easily.
There are a couple of ways to implement async functions in JavaScript:
Polling (bad, but sometimes necessary. this prevents automatic pipelining)
Promises (good! non-blocking and can be done concurrently)
The text was updated successfully, but these errors were encountered: