I understand that there is ClientApp short lived process that get triggered on an FL round, but was wondering if my application has some long running business logic how do I incorporate it within a client?
In case i chose to have the business logic as a separate process how can I spawn it when the supernode is created? Can it be spawned from inside the SuperNode?
Hello @boscojacinto , interesting use case ! It sounds like what you need is to run the SuperNode with --isolation=process. In this way, it won’t automatically spawn a process to run the ClientApp. Instead, you need to launch it manually in a node in your same network. Like this:
Note the --insecure flag, this means that TLS isn’t enabled. This process is designed to be executed in the same machine or same network as your SuperNode (i.e. not through the open internet).
THe flwr-clientapp process is long running. Currently it doesn’t have built-in mechanisms to customize it. But it should be straightforward to do so if you are confortable forking the Flower repository. The flwr-clientapp is defined here: flower/framework/py/flwr/client/clientapp/app.py at main · adap/flower · GitHub with the main infinite loop being defined in the run_clientapp() function.