Example: Accessing a map locally and remotely
In the following example, we create a distributed map. Our first function is invoked remotely using.remote(), and it sets the value a key in our map. The second function is invoked locally using .local(), and it sets another value. Finally, we print the result of our third, remotely invoked function, which retrieves the values we just set.
python app.py. The output will be: