# SCM-IoT: An Approach for Internet of Things Services Integration and Coordination
## 3 Methodology
### Platform Dependent Computacional Model
#### 3.3.1 Storage Medium  
The storage medium, represented by a collection of tables in the conceptual model and as multisets of tuples in the platform-independent computational model, is represented  
Figure 4: Subscription for collection service behavior. In (**a**), transition C is enabled by the marking. In (**b**), a notification for each subscriber found in place U has been deposited in place HC. as a collection of XML documents in the platform-dependent computational model. The XML elements representing pages, notification, subscription, and editing notebooks are described in Listing 1 using the XML schema language. ```
Line & Code
```
1 <xs:element name = \"PageType\" minOccurs = \"1\" maxOccurs = \"unbounded\">
2 <xs:complexType>
3 <xs:sequence>
4 <xs:element name = \"id\" type = \"xs:string\" use = \"required\"/>
5 <xs:element name = \"topic-1\" type = \"Topic-1 Type\" use = \"required\">
6 <xs:ComplexType>
7 <xs:attribute name = \"time\" type = \"xs:int\" use = \"optional\"/>
8 <xs:ComplexType>
9 </xs:element>
10 <xs:element name = \"topic-2\" type = \"Topic-2 Type\" use = \"required\">......
11 </xs:sequence>
12 </xs:complexType>
13 </xs:element>
14 <xs:element name = \"NotebookType\">
15 <xs:complexType>
16 <xs:sequence>
17 <xs:element name = \"page\" type = \"PageType\"/>
18 </xs:sequence>
19 </xs:complexType>
20 </xs:element>
21 <xs:element name = \"UpdateType\" minOccurs = \"1\" maxOccurs = \"unbounded\">
22 <xs:complexType>
23 <xs:sequence>
24 <xs:element name = \"page-id\" type = \"xs:string\" use = \"required\"/>
25 <xs:element name = \"topic\" type = \"xs:string\" use = \"required\"/>
26 <xs:element name = \"value\" type = \"TopicType\" use = \"required\"/>
27 </xs:sequence>
28 </xs:complexType>
29 </xs:element>
30 <xs:element name = \"SubscriptionType\" minOccurs = \"1\" maxOccurs = \"unbounded\">
31 <xs:complexType>
32 <xs:sequence>
33 <xs:element name = \"subscriber-id\" type = \"xs:string\" use = \"required\"/>
34 <xs:element name = \"page-id\" type = \"xs:string\" use = \"required\"/>
35 <xs:element name = \"topic\" type = \"xs:string\" use = \"required\"/>
36 <xs:element name = \"notified\" type = \"xs:boolean\" use = \"required\"/>
37 </xs:sequence>
38 </xs:complexType>
39 </xs:element> ```
**Listing 1** Definition of element types for page, notebook, notification, and subscription. The notebook's page structure, described by the \"PageType\" type, contains the field structure. In the \"PageType\", the \"page\" field has a unique value that identifies the page. All other fields are required, have a simple type and an optional \"time\" attribute. The \"time\" attribute serves to record the most recent updates of the field, as described later. The \"NotebookType\" type is defined as a non-empty sequence of \"PageType\" elements. The service request types, \"UpdateType\", \"SubscriptionType\", and \"NotificationType\", define the structure of updates, subscriptions, and notifications, respectively. The editor offers access, storage, and generation of new data through the services announced in the description \"EditorServicesPT\" of its port type, as indicated in Listing 2. In order to shorten and simplify the presentation, in Listing 3 all the pieces of information needed to describe the behavior of the editor attending the requested services are available through BPEL variables with global scope. ```
Line
```
Code
```
1 <bpel:variables>
2 <bpel:variable name = \"editing\" type = \"xsd:boolean\"/>
3 <bpel:variable name = \"notebook\" element = \"NotebookType\"/>
4 <bpel:variable name = \"note\" element = \"NotificationType\"/>
5 <bpel:variable name = \"subscription\" element =
6 </bpel:variables>
```
**Listing 2**Description \"EditorServicesPT\" of a port type. The global scope variable \"editing\" synchronizes exclusive access to the notebook when relevant data has emerged for a group of subscribers. When the editor checks the notebook's content, no client can be considered for service.