• No results found

SERVICE ORIENTED ARCHITECTURE AND SERVICE COMPOSITION

In document ESTABLISHING A SERVICE COMPOSITION (Page 48-54)

Literature review

2.4 SERVICE ORIENTED ARCHITECTURE AND SERVICE COMPOSITION

33

grows bigger when the context dissemination and discovery is over a distributed system. Therefore ensuring quality in the acquired and reasoned out context is an absolute required feature of context management.

Context-aware systems manage context on different levels of abstraction.

Contextual information can be represented by a single scalar value such as

“body temperature is 101.6 degrees Fahrenheit” which represents the raw output of a sensor. Contextual information can also be a higher-level semantic description of a situation such as “Patient is having fever”.

Therefore, a context-aware system should be capable of interpreting from a raw sensor data meaningful information abstracted appropriately. There should be a transformation of low-level sensing to high-level context provision Baker (2009).

2.4 SERVICE ORIENTED ARCHITECTURE AND SERVICE

involving planning. It highlighted the need for rules evaluation especially when multiple services satisfy post-condition. From the literature survey we can understand that there are some immense and fundamental challenges for the supporting infrastructure for scenarios of this type

 These are pervasive adaptive systems that respond to things around them with no centralised authority.

 Services provided are more dynamic requiring discovery, ad-hoc composition, and orchestration.

 It is a more knowledge-based infrastructure that attempts to recognise situations and reason about the environment.

From the above literature review, it can be concluded that–

 A context-aware system by definition is able to sense, adapt and respond.

 Representing, learning and reasoning about situations and circumstances of the real world is the key fit any context-aware system.

 Context-aware systems need to monitor people and devices to sense and react to changes.

Lifecycle of Web services

There are 5 steps included in lifecycle of Web services

1. Advertisement: The service provider publishes its description and endpoints of the web service in the directory called service registry.

35

2. Discovery: The service consumer or the service requestor locates all the Web services and its description to check if it matches their functional requirements.

3. Selection: The service requestor selects the most suitable web service out of all the web services in the service registry based on application dependent metrics.

4. Composition: After selecting the suitable web services the service requestor integrates all the web services into a complex process.

5. Invocation: In this final step the web services or complex process is invoked and set for execution by providing all the inputs.

2.4.1 SERVICE AUTOMATA

Service automata have been suggested to be used for service discovery and composition problem in context-aware systems Gay, et al. (2011); Zhichao, et al. (2012). In this technique a context space comprising the context, situation, services and user preference are unified and dealt. The desired goal situation is predicted by the user preference and the situation faced by the user. A service composition is achieved by emphasizing the relationship between context and services and by formalizing semantic web services as automata. Further by using a composite service automaton, services are composed to achieve the goal situation.

Service automata are defined as a tuple: <C,∑, Q, δ, I, F, V> where:

 C=<CPre, CEff> is a pair which represents the Context Attributes (CA) of Context Space (CSP) related to the service. CPre and CEff represent CAs related to precondition and effect of the service respectively. CEff denotes the CAs that the service can change.

 ∑= AI ⋃ AO ⋃ AH is a finite set of actions. AI represents input action; AO represents output action and AH represents service’s inner actions.

 Q is a finite set of states of the automata (Q ≠∅) which represents the Context State (CS) of C.

 δ is the transition function, that is, Q× ∑

 I am a finite set of initial states and

 F is finite set of final states and

 V is an assignment function, e.g. V: (value range of the corresponding CAs in CSP)

The transition function (δ) in service automata is defined as ak

(δ) = qiqj ak = set of actions

qi = state: immediate predecessor

qj = state: immediate successor of the action ‘a’

2.4.2 TIMED AUTOMATA

Timed automata takes into consideration explicit timing constraints present in real-life situations and always the time considered is finite because they are measurable quantities Bengtsson and Yi, (2004); Patricia (2005);

Béatrice (2013). In Finite automata terms, the node must have a reachable property. Time domain is considered here as the set of all positive real numbers. A timed word is a set of alphabets from the given alphabet * time values provided. Also ‘r’, a finite set of variables called clock values is considered.

37

There is always a mapping between clock and time domain values. Usually, clock value which is bounded can have values between –k and +k (k- bounded clock). The final state is reached from the initial state using ‘n’

edges which are the path of the automata in a finite amount of time taking into consideration clock constraints. The time constraint need not be single value it can be a range of values. The only difference of timed automata from the normal finite automata is the clock function. Deadlines are present to complete each task while acceptance is reached. Figure 2.1 illustrate the design of timed automata, in which, we use a threshold value as the limiter for each state transition. If the value is greater than threshold then the transition to next state doesn’t occur and the machine/automata must again perform the set of operations to reach the next state from the beginning. If the value of the time duration less than or equal to threshold then there is a transition to next state. The main advantage of using a clock function here enables the user to perform the set of operations and reach the final state in a finite amount of time in all situations. Each service is completed in a finite amount of time. All these finite values added up also gives a finite value hence the transition from the start state to final state is also finite.

Figure 2.1 A Timed Automaton

A timed automaton is defined as a tuple TA=<∑, Q, T, I, F, X> where:

 ∑= AI⋃AO⋃AH is a finite set of actions. AI represents input action;

AOrepresents output action; AHrepresents service’s inner actions.

 Q is a finite set of states of the automata (Q≠∅) which represents the CS of C.

 T is the transition function, that is, Q×

 I am a finite set of initial states and

 F is finite set of final states and

 X is a clock

The transition function (T) in timed automata is defined as g, a, Y

qiqj

g = clock constraints a = set of actions Y = subset of clocks

qi= state: immediate predecessor

qj= state: immediate successor of the action ‘a’

2.4.3 SERVICE COMPOSITION

The web service composition techniques by industry standards are two varieties namely Syntactic Web Service composition and Semantic Web Service composition. The Syntactic Web Service composition is an XML- based approach which is further divided into Web Service Orchestration and Web Service Choreography. WS Orchestration – Combines available WSs by adding a central coordinator (the orchestrator) which invokes and combines the single sub-activities. WS Choreography - Overall activity is

39

achieved by the composition of peer-to-peer interactions among the collaborating WSs. Semantic WS Composition (ontology-based) describe various aspects of WSs by using explicit, machine-understandable semantics, and as such automate all stages of the WS lifecycle Beeket,et al.

(2013); McIlraith, et al. (2001).

By Formal methods, the Web Service composition problem can be approached by using Petri nets, Process Algebras, and Automata. Petri nets is a framework to model concurrent systems Baker, (2009). Their main attraction is the natural way of identifying basic aspects of concurrent systems, both mathematically and conceptually. Process Algebras comes with a rich theory to establish whether two processes have equivalent behaviours Gay, et al. (2011). Automata uses Timed Automata Zhichao, et al. (2012); Bengtsson and Yi, (2004); Patricia (2005); Béatrice (2013) and Service Automata.

In document ESTABLISHING A SERVICE COMPOSITION (Page 48-54)