We will extend EX1 to support:
- Saving the counter on the cloud
- Broadcasting the new counter value using SignalR
We recommend watching the tutorial video and reviewing the slides on Moodle. We have provided a demo demonstrating the app's functionality.
Below, we provide useful links to assist you in the implementation.
Use Azure Tables to store our counter in the cloud. The following links may be helpful:
- An overview of Azure Tables can be found here.
- The Azure Tables client can be used to access Azure Storage or Cosmos accounts. The SDK is supported in multiple languages, including Python, C#, and JavaScript.
- Create a new table with a single entity representing our counter (see here).
- Edit your Azure Functions, such as Increase/Decrease counter, to directly manipulate the counter in Azure.
- In our implementation, we also added a new function that reads the counter value. We use this to initialize the counter value on the client side upon startup.
We will use the SignalR service to broadcast updates to all connected clients whenever there is a change in the counter value. Review the tutorial slides to understand the process. Here are some related links to help you understand how SignalR works:
- We recommend following the guidelines provided in class. However, feel free to explore the documentation and references here:
- Here is an example of a serverless app using SignalR. References to Python, C#, and JavaScript languages are also available.
- Examples using SignalR can be found in this repository. The code in the repo is not React Native-based and is more relevant for web apps, but it might be useful for understanding how SignalR works.