Scenario on service composition

From wiki.gpii
Jump to: navigation, search

Scenario: John is a 71 years old male, beneficiary of Meals On Wheels organization. This organization delivers via volunteers meals to elderly or disabled people who are not capable to get their meals their selves. In order to participate in the Meals On Wheels initiative one has to be subscribed and obtain a MealsOnWheels ID and Password. There is also a web service called MealsOnWheels, running on the cloud that automatically informs a volunteer to deliver the meal to the beneficiary. In order to use the MealsOnWheels service one must be at his own home and order the meal from a restaurant.

John uses credit cards to perform online transactions. He has two credit card numbers. He prefers to use the one credit card when he is abroad and use the other credit card when he is in the UK.

As work on profiles is still in progress we will adopt for the sake of our scenario a profile schema proposed in Scenario with Conditional Items in a User Profile. This schema suggests that a user Profile consists of a Preference Name, a Condition, a Probability and a Preference Value. The schema also suggests a context and device Profile.

 


A part of John’s profile could be:

 

Name, Condition, Probability, Value

http://gpii.org/ns/up/CreditCardNr, value(‘http://gpii.org/ns/Location’)==’UK’, 1, ‘123456789’

http://gpii.org/ns/up/CreditCardNr, value(‘http://gpii.org/ns/Location’)!=’UK’, 1, ‘987654321’

http://gpii.org/ns/up/MealsOnWheelsID , , 1, ‘JohnGardiner’

http://gpii.org/ns/up/MealsOnWheelsPassword, , 1, ‘123’

 

A part of the Context Profile when John is at his home could be:

 

Name, Value

http://gpii.org/ns/Location, ‘Home’

http://gpii.org/ns/Address, ‘Green Street 52, London UK’

http://gpii.org/ns/Country, ‘UK’


 

Location, Address and Country are context related variables and they appear in the context Profile. The CreditCardNr can be seen as a need to perform online purchases, and the MealOnWheelsID and MealOnWheelsPassword can be seen as a Need to use the Meals On Wheels initiative. CreditCardNr, MealOnWheels ID and Password are settings of some web services, thus they appear in the user profile as preferences.

For the CerditCard preference there is a condition declaring that if John is abroad then all online purchases will be performed by using the one credit card and if he is in the UK all online purchases will be performed by using the other credit card.

So when John enters in the cloud4All system the “Cloud based and downloadable Solutions Reporter” (component 8.1 in the architecture’s Program Flow http://wiki.gpii.net/index.php/Program_Flow) reports to the matchmaker all available web services. The matchmaker considering the user profile and the device and context information infers the most relevant web services that fulfill the needs and preferences of the user. The selection of web services can be accomplished by matching the Inputs and Preconditions parameters of web services against the entries of user-, context- and device - profile. The Input and Precondition parameters of services can be seen as settings of services. After selection of relevant services, automatic composition is performed. Thus new composite services will be created for the user to consume.

 

Back to our scenario: the “Cloud based and downloadable Solutions Reporter” returns all available services. The selection phase returns services that are relevant to the user profile and context, and the composition procedure will try to combine atomic services to complex ones. In our example the composition procedure, has automatically combined the 3 services presented in Table 1.

 

Service-Name

Service-Input

Service-Output

Service-Precondition

Service-Result

Description

FindNearestRestaurant

Address

Restaurant

 

 

Find a restaurant near the Address of the consumer

OrderMenu

·      Restaurant

·      Menu

·      CreditCardNr

RestaurantLocation

CreditcardNuber= “valid”

Orders a manu and charges the Creditcard

If a valid credit card, a menu and a restaurant is entered, a meal is ordered.

MealsOnWheels

·      RestaurantLocation

·      MealOnWheelID

·      MealOnWheelPass

 

Location=”home”

 

If the consumer is at home, has credentials for the MealsOnWheels service and a all ready ordered menu from a restaurant, a volunteer is informed to deliver the meal to the consumer.

Table 1The services that will be composed. The Inputs, Outputs Preconditions and Results (IOPR) are presented in the columns.

 

The first web service “FindNearestReasturant” has as Input the Address of the user and returns the nearest restaurant to that address.

The second web service “OrderMenu” takes as Input a restaurant, a menu and a valid credit card number, orders a meal, charges the credit card and returns the location of the restaurant by witch the meal was ordered.

The third web service “MealOnWheels” takes as Input a restaurant’s location, the MealOnWheels credentials and informs a volunteer to deliver the meal to the appropriate beneficiary. This service can only be consumed if the user is at home.

 

The Service Discovery and Composition procedure, shown in Figure 1, synthesize the three services as shown in figure 3. Figure 1 presents the service Discovery and Composition procedure according to the program Flow in Figure 2. The numbering remains intact in both Figures.

 

In Figure 3 web services are depicted by a rectangle, execution order is depicted by black arrows, data are represented by red fonts and data flow is shown by dashed arrows. The preconditions are depicted by a decision shape; in witch the precondition to be fulfilled is present.

 

After the matching and web composition procedures John can consume the composite/complex service that is delivered automatically by the matchmaker.

 Service matchmaking3.jpg

Figure 1 Matchmaker’s architecture for services Discovery and Composition based on the Program Flow depicted in Figure 3.

 ProgramFlow-login.jpg

 Figure 2 The Program Flow of cloud4All (http://wiki.gpii.net/index.php/Program_Flow)

 Service matchmaking2ab.jpg


Figure 3 Service Composition