Comments (1)
Long-lived polling from node to researcher:
There are several approaches for long-lived polling as using unary RPC and stream RPC. During the long-lived polling nodes asks for tasks from researcher such as train, search and etc.
Unary - Unary RPC
Creates a new request in a while loop. Waits until timeout or receives a task from researcher. Researcher answers as unary RPC as well.
- Creates new connection to request new task.
- Sending new task request requires a certain amount of time since it creates new connection.
- Requires to increase max message length (default 4MB)
- The time consumed for receiving task is not stable (test: between 2 seconds and 5 seconds for 30MB of data) it may be due to sending large dataset
- Does not require asynchronous programming.
- Risk of memory due to receiving large message in single request.
Unary - Streaming RPC
Creates a new request in a while loop.Waits until timeout or receives a task from researcher. Researcher answers with streaming to send large messages as 4MB chunks.
- Creates new connection to request new task - one the node side.
- Sending new task request requires time to create new connection.
- Does not require to increase max message length, large messages will be send as small message chunks
- The time consumed for receiving a large task message is stable (test: around 2.9 seconds for 30MB of data - with 4 other nodes requesting at the same time)
- Does not require asynchronous programming on the node side.
- No Risk of memory due to receiving large message in single request.
- Performs slower comapre to "Stream-Stream RPC" approach while the message size is smaller. It is due to time crating a new connection to request new task from researcher. (test: 60ms slower)
Streaming-Streaming RPC
Node creates a streaming request and receives task in a streaming. Connection is created once.
- Does not create new connection to request new task. Sends task request within the open stream.
- Sending new task request is faster since it does not create a new connection.
- Does not require to increase max message length, large messages will be send as small message chunks
- The time consumed for receiving task is stable (test: avg 3.2 seconds for 30MB data - with 4 other nodes requesting at the same time )
- Does require asynchronous programming where one co-routine listens for tasks, and another one asks for new tasks.
- No risk of memory due to receiving large message in single request.
- Performs better for small size messages compare to "Unary-Streaming RPC approach" (test: 60ms faster)
from fedbiomed.
Related Issues (20)
- Create message types for additive secret sharing HOT 1
- `SecaggSetup` (node) implementation for additive secret sharing on node
- Create researcher `SecaggAdditiveKeyContext` to launch the setup phase for JL secagg using additive secret sharing
- Implement node endpoint for N2N message to handle `AddtiveSSharingRequest`, `AdditiveSSharingReply` in `fedbiomed/node/request/_n2n_controller.py`
- Merge all the tasks and test additive secret sharing
- Create researcher `SecaggKeyContext ` for additive secret sharing in `fedbiomed/researcher/secagg/secagg_context` HOT 1
- Researcher notebook requires authentication HOT 1
- Secure node to node communication for honest but curious scenario HOT 1
- Handle the request `secagg-additive-ss-setup-request` in the `Node` class
- Nonce security in LOM secure aggregation
- Implement `serialize` and `desearialize` methods for Message classes
- Remove MP-SPDZ dependency
- Design of secure node to node communication for honest but curious scenario doing
- Use symmetric encryption for node to node communications
- Unified interface to send messages on node side
- [New issue]: Redesign `nodes.requests` module
- batch_size issue
- Improve checks for `Message` class
- Experiment run returns unclear message if given node id is not existing in gRPC server
- LOM secure aggregation fails with 10+ nodes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fedbiomed.