27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

“Query Directory” place. With this token as well as the client<br />

ID of t he user in the “ClientID” place, the “ Init_Query”<br />

transition can fire, and its firing results in a DIRQUERY token<br />

to be placed in the “Query_Dir” output port.<br />

1`true<br />

[b=true]<br />

{clID = t}<br />

1`[]<br />

1<br />

1<br />

Query<br />

b<br />

Read<br />

Init_Query<br />

Query_Dir<br />

hr<br />

Directory<br />

Request<br />

Out<br />

BOOL<br />

t<br />

DIRQUERY<br />

[(#clID (#query q)) = t]<br />

RDREQLIST<br />

1`"Pat1"<br />

t<br />

q<br />

1`true<br />

1<br />

Extract<br />

Query_Resp<br />

Providers<br />

ClientID<br />

In<br />

hr<br />

#provlist q<br />

QUERYRESP<br />

1`[]<br />

STRING<br />

ins hr {clID= (#clID n),<br />

t<br />

Provider<br />

prID= List.nth((#prov n),0),<br />

recID= (#recID n)}<br />

t<br />

Locations<br />

Next_Read<br />

Construct<br />

1` ("P1.rec")<br />

h CLUST<br />

RDINFO n Read Req<br />

m<br />

1 Data to s<br />

Read<br />

[length(#prov n) > 0 ]<br />

Init_Read<br />

Read<br />

{recID=s, Informaion<br />

Data<br />

{recID=(#recID n), clID = (#clID n),<br />

clID = t,prov=h}<br />

STRING [(#success u) = true<br />

prov = (List.drop((#prov n),1))}<br />

t<br />

andalso (#clID u) = t]<br />

MEDRECORD<br />

RDRESP [length(#prov n) = 0]<br />

n<br />

File #mrec u Decrypt u<br />

Read_Ack<br />

Start_Read<br />

Store<br />

Data<br />

In<br />

MEDRECORD<br />

#mrec u<br />

1`false<br />

Combine<br />

Read<br />

u<br />

Data<br />

hr<br />

1<br />

Failure<br />

Restore<br />

[(#success u) = false<br />

m RDREQLIST<br />

1`true<br />

Out<br />

andalso (#clID u) = t]<br />

BOOL<br />

Out<br />

b<br />

Read_Req<br />

(NPROV-1)`m++1`m1<br />

Figure 4. CPN model for the patient client<br />

When a response from the direct ory is put int o the<br />

“Query_Resp” input port, the providers’ address information<br />

becomes available. T his enables the “ Extract Providers”<br />

transition, and the firing of the transition places a CLUST token<br />

in the “ Provider Locations” place. T he CLUST token type is<br />

defined as a list of providers as follows:<br />

colset CLUST = list STRING with 0..3;<br />

where the with clause specifies the minimum and maximum<br />

length of the list, and each item in the list contains the a ddress<br />

of a provider (represented by its provider ID as a string for<br />

simplicity) that can be used by the client t o communicate with<br />

the provider. To model a read operation, a token "P1.rec" is<br />

initialized in the “Data to Read” place, which is a record ID<br />

representing patient P1’s medical record. The firing of the<br />

“Init_Read” transition starts the read process, and places the<br />

record ID along with the provider information into the “Read<br />

Information” place. Note that in this model, we assume that<br />

there is only one record for each patient that can be matched<br />

with medical data stored on the providers. Now the “Construct<br />

Read Req” transition can fire once for each provider in the<br />

provider list, a nd creates a t oken of type RDREQLIST in the<br />

“Read Request” place, such t hat the multiple read requests in<br />

the list can be made concurrently to the cloud providers in the<br />

cloud cluster. This makes the associate d providers in place<br />

“Read Information” being removed and enables the “Start<br />

Read” transition. When it fi res, it t ransmits the RDREQLIST<br />

token to the “Read_Req” place, which is an input port to th e<br />

cloud cluster. After the requests have been processed by the<br />

cloud providers, multiple tokens of type RDRESP will be<br />

deposited in place “Read_Ack.” If a RDRESP token contains a<br />

success flag with a true value, it indi cates that the read<br />

request has been completed successfully by the corresponding<br />

cloud provider. In this case, the piece of medical record is<br />

extracted from the token and placed in the file store after bieng<br />

decrypted. Once all piece s of the medical record are<br />

successfully decrypted, the “ Combine Data” transition<br />

becomes enabled and can fire. The firing simulates the process<br />

of generating the original medical record by recombining the<br />

RAID data slices retrieved from the cloud providers. If one of<br />

the providers returns a token with the success flag set to<br />

false, a rea d failure occurs for the cl oud provider. In t his<br />

case, the “ Read Fail” transition becom es enabled. Once it<br />

fires, it changes the token i n place “Restore” from false to<br />

true, signifying the directory to initiate a “restore” operation.<br />

The CPN m odel for t he doctor client that replaces t he<br />

Doctor substitution transition of the hi gh-level model is<br />

similar to the one for t he patient client, but a doct or client<br />

should also have the privilege to write data into t he clouds.<br />

Due to page limits, we do not show such a CPN model here.<br />

D. Petri Net Model for the Cloud Component<br />

Finally, we refine the Cloud substitution transition of the<br />

high-level model into a CPN model as shown in Fig. 5, where<br />

the cloud providers are represented as colored toke ns of type<br />

PROV. The clouds can accept either “read” or “write” requests<br />

from the c lients, namely the patient and the doctor. Upon<br />

receiving the requests, cloud providers invoke corresponding<br />

cloud services by matching their IDs in the cloud cluster, and<br />

return responses to the clients. In a ddition, the cloud providers<br />

in a cloud clus ter are also res ponsible for providing their data<br />

to the service directory on demand in a cas e that a restora tion<br />

process is initiated when a read or write request fails due to the<br />

failure of a cloud provider in the cloud cluster.<br />

[(#recID r)=(#recID (#mrec g))<br />

3<br />

Cluster<br />

andalso (#prID r)=(#prID g) andalso (#ready g)=true]<br />

g<br />

Providers<br />

Out<br />

hr<br />

{prID=(#prID g),<br />

hr<br />

r<br />

PROV<br />

ready=false,<br />

Read_Req Read_Start Read_Start Read_File<br />

mrec=(#mrec g)}<br />

In<br />

RDREQ<br />

RDREQLIST<br />

r g<br />

e<br />

{prID = (#prID g),clID = (#clID r),<br />

[(#prID r) = (#prID g)<br />

mrec = (#mrec g),success=true}<br />

g<br />

andalso (#ready g) = false] Read_Fail<br />

{prID = #prID g,<br />

Read_Resp<br />

{prID = (#prID g),<br />

ready = #ready g,<br />

Read_Ack<br />

clID = (#clID r),<br />

mrec=(#mrec w)}<br />

1`u1++1`u2++1`u3<br />

Out<br />

mrec = null,success=false} RDRESP<br />

RDRESP<br />

output (y);<br />

1`e<br />

action(ReadOnly);<br />

1<br />

e<br />

[pd = SimEnabled<br />

Read_Resp<br />

andalso (#prID g)="Pr1"]<br />

RW_Control<br />

1`u1++1`u2++1`u3 g<br />

UNIT<br />

e<br />

[(#prID w) = (#prID g)<br />

Provider_Down<br />

andalso (#ready g) = true]<br />

hw<br />

hw<br />

w<br />

g<br />

Write_Req Write_Start Write_Start Write_File<br />

x y<br />

In<br />

WRREQ<br />

{prID=(#prID g),<br />

WRREQLIST<br />

In<br />

1<br />

req = w, success=true} Service<br />

w<br />

{prID = #prID g,<br />

Ready<br />

Write_Fail<br />

req = w, success=false}<br />

1`v1++1`v2++1`v3 e<br />

STATUS<br />

[(#prID w) = (#prID g)<br />

andalso (#ready g) = false]<br />

Write_Ack<br />

Write_Resp<br />

1`v1++1`v2++1`v3<br />

1`SimEnabled<br />

Out<br />

1<br />

WRRESP Provider<br />

Down<br />

pd<br />

1<br />

Provider<br />

Write_Resp<br />

Pool<br />

Providers<br />

Down<br />

Out<br />

In<br />

PROV<br />

PROV<br />

WRRESP<br />

SIMPROVDOWN<br />

Figure 5. CPN model for the cloud component<br />

In this model, the “Cluster Providers” place is shared with<br />

the directory, where the PROV tokens in the place represent the<br />

providers selected to constitu te the cloud cluster. In addition,<br />

the “Provider Pool,” “Down Providers,” and “Service Ready”<br />

places are als o shared places in the directory model. The<br />

“Provider Pool” acts as a hol ding place for available providers<br />

identified by the directory. The “ Down Providers” place<br />

contains the provide rs that are down and deem ed needing<br />

replacement. Finally, the “Service Ready” place acts as an input<br />

place to the cloud for simulation purposes only. In our current<br />

model, we only consider a m aximum of one cloud provider<br />

337

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!