# Structured Data REST Protocol for End to End Data Mashup
## Structured Data Rest Protocol
### One Time Configuration (OTC) Algorithm  
After determining the right MSP/DSP, DSC is required to get Mashup Configuration Attributes (MCA) by calling mashup configuration service identifier of those MSPs/DSPs. The MCA is the set of attributes required to configure DSC so as to perform the data mashup later on, as and when needed. This is the one time process and can be performed manually or through the pre-defined algorithm. MSP/DSP provides structured data through cloud computing feature like Structured Data as a Service(SDaaS). Thus, MCA is nothing but the container of data and service attributes and can be identified by Mashup Configuration Service Id i.e., MCS#Id. In order to get mashup configuration attributes, DSC should know MCS#Id of the service provided by MSP/DSP. The mashup configuration service of MSP/DSP will return MCA as a response to DSC. It should also be noted that SDMB should be created and associated with DMD before configuring DSC client. Table 3 shows mashup configuration service and their attributes published by various MSPs/DSPs.  
Thus, Mashup Configuration Service (MCS) can be defined as:  
\[\text{MCS}=(\text{Msp#Id}/\text{Dsp#Id},\text{Mcs#Id},\text{MCAttributes})\]  
For example, MCS = (www.p.com, Mcs#1, (p1, p2, p3, p4,..., pa)) where Mcs#1 = www.p.com/mcs1.  
The Algorithm 1 is based on one time mashup configuration which would be performed by DSC to send the request to MSP/DSP to get mashup configuration attributes to configure its SDMB so that data can be fetched, transformed and populated into it.  
It is clear from the Algorithm 1 that data service consumer selects one or more MSPs/DSPs as per its need and configures SDMB using Mashup Configuration Attributes (MCAttributes) after receiving it from Mashup Configuration Service Identifier (MCSI) calls. The method selectMCAtibute (z, w) will return one of MCAttribute h which will be semantically matched with DMDAttribute z from the list of MCAttributes w. Structured Data eXchange (SDX) would be created at DSC's end as a result of the mashup configuration and identified by SDX#Id. Thus, SDXMapping is the pair of DMDAttribute and MCAttribute which is semantically equal to each other. Table 4 describes DSC's mashup configuration done after receiving MCAttributes and is the one time process performed by data service consumer at its end. In order to perform one time configuration for private data mashup, mashup key is also provided through mashup configuration attributes by private mashup configuration service identifier. It can be noticed here that private mashup configuration service identifier is accessible to authorized data service consumer after proper authentication. In Table 4, Mds#1 and Mds#2 are providing public data mashup and Mds#3 is providing private data mashup through MKey#3 mashup key. The data service consumer can access private mashup data service identifier only after sending this mashup key to MSP/DSP while requesting through the Any Time Access (ATA) model.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Msp\#Id/Dsp\#Id** & **Mcs\#Id** & **MCAttributes** \\ \hline www.p.com & Mcs\#1 & (p1, p2, p3, p4... pa) \\ www.q.com & Mcs\#2 & (q1, q2, q3, q4... qb) \\ www.r.com & Mcs\#3 & (r1, r2, r3, r4... rc) \\ \hline \hline \end{tabular}
\end{table}
Table 3: MSP’s/DSP’s Mashup Configuration Service Publication.  
Let us understand the attributes, which are required to configure DSC in the following section.