Adding State
From GCube System
Contents
Adding State
In the first part of this tutorial we have created a stateless service for simplicity. However, the most common patterns used when developing gCube services are the ones that allow to create stateful service. In this part of the tutorial we see how to add a state to the SampleService.
Multi Port-Type service
To add a state we need firstly to add two new Port-Types to the SampleService:
- one is dedicated to create a new stateful resource, the so-called Factory Port-Type
- the other one is dedicated to access and manage the state, the so-called Service Port-Type
For both, we need to perform the same steps done for the Stateless Port-Type: