How to handle client ids in Flower Next apps?


I’m trying out the new flower interface based on ServerApp/ClientApp. The old start_simulation interface allowed providing a list of clients_ids which where then passed to client_fn and were also available in the server’s ClientManager.

The new run_simulation provides no such option and returns different identifiers in the mentioned entities. The cid passed to client_fn seems to be the internally generated partition_id. However, the mapping to DriverClientProxy in ClientManager.clients uses some other type of internally generated id.

Is there any way to map from these different types of ids at this point? I’m implementing a custom scheduler and did not yet find a way to do so as the ids in DriverClientProxy are generated after simulation start.


Hi @pwiesner, this is a feature we definitively want to add to the new Simulation Engine. This will be possible by passing a custom state_factory that comes with some pre-registered nodes and node-id:partition-id mapping. The code base is ready for this but is not exposed to higher-level APIs. It’d require you to pass a node mapping as opposed to creating it before starting the simulation (which essentially mirrors the functionality you are familiar with via start_simulation)

For now I think you are going to get a better experience using the start_simulation approach, while we complete some optimizations and better API that will be ready when FLower Next gets fully launched in a couple of months.

1 Like

Amazing, thanks for the fast reply! Then I’ll try to find some workaround for now and wait until you introduce the new argument in a future release :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.