Tuscany Example: Modified Calculator - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Tuscany Example: Modified Calculator

Description:

Tuscany Example: Modified Calculator. Cristian Fiorentino. cristian. ... rmi:binding.rmi host='localhost' port='9999' serviceName='rmiCalculator'/ /reference ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 18
Provided by: cristianf
Category:

less

Transcript and Presenter's Notes

Title: Tuscany Example: Modified Calculator


1
Tuscany Example Modified Calculator
  • Cristian Fiorentino
  • cristian.fiorentino_at_intel.com
  • March 9, 2007

2
Intention
  • Show Tuscany
  • multi-language support on writing services
  • different transport bindings
  • simplicity on changing among services
    implementations

3
Scenario
  • A client needs to access to simple calculator
    operations , -, , /
  • We have different implementations of the
    calculator
  • Java (local to client)
  • Ruby (local to client)
  • RMI invocation (remote)
  • WS (running remotely on Tomcat)
  • To distinguish among results, operations are
    performed in different ways for different
    languages
  • Java operation 2
  • Ruby operation 1
  • RMI operation 4
  • WS operation 3

4
All Changes Just into a SCDL Definition

SCDL1
Java
Component
5
All Changes Just into a SCDL Definition

SCDL2
Rubi
Component
6
All Changes Just into a SCDL Definition

Component
RMI
SCDL3
7
All Changes Just into a SCDL Definition

Component
WS
SCDL4
8
SCDL Definition (client)
  • ltcomponent name"CalculatorServiceComponent"gt
  • ltimplementation.java class"calculator.Calculat
    orServiceImpl"/gt
  • ltreference name"calculatorService"gt??lt/re
    ferencegt
  • lt/componentgt

Comp
_at_Reference CalculatorService calculatorService
lt!-- ltcomponent name"CalculatorComponent"
gt ltimplementation.java class"calculator.J
avaCalculator"/gt ltrbimplementation.rb
script"CalculatorImpl.rb" class"CalculatorImpl"/
gt lt/componentgt ltreference
name"CalculatorRmiService"gt
ltinterface.java interface"calculator.CalculatorSe
rvice"/gt ltrmibinding.rmi
host"localhost" port"9999" serviceName"rmiCalcu
lator"/gt lt/referencegt ltreference
name"CalculatorWSService"gt
ltinterface.wsdl xmlnswsdli"http//www.w3.org/200
6/01/wsdl-instance" interface"http//cal
culatorwsdl.interface(Calculator)"
wsdliwsdlLocation"http//calculator
wsdl/calculator.wsdl" /gt ltbinding.ws
endpoint"http//calculatorwsdl.endpoint
(CalculatorService/ CalculatorServiceSOAP11port)"
location"wsdl/calculator.wsdl" /gt
lt/referencegt --gt
9
1) Java Implementation
Calculator Service (interface ,-,,/)
Calculator Component
Client
Java Implementation
10
SCDL Definition for Java Implementation
  • ltcomponent name"CalculatorServiceComponent"gt
  • ltimplementation.java class"calculator.Calculat
    orServiceImpl"/gt
  • ltreference name"calculatorService"gt
    CalculatorComponent lt/referencegt
  • lt/componentgt
  • ltcomponent name"CalculatorComponent"gt
  • ltimplementation.java class"calculator.Jav
    aCalculator"/gt
  • lt!--rbimplementation.rb
    script"CalculatorImpl.rb" class"CalculatorImpl"/
    --gt
  • lt/componentgt
  • lt!--
  • ltreference name"CalculatorRmiService"gt
  • ltinterface.java interface"calculator.Calc
    ulatorService"/gt
  • ltrmibinding.rmi host"localhost"
    port"9999" serviceName"rmiCalculator"/gt
  • lt/referencegt
  • ltreference name"CalculatorWSService"gt
  • ltinterface.wsdl xmlnswsdli"http//www.w3
    .org/2006/01/wsdl-instance"

11
2) Ruby Implementation
Calculator Service (interface ,-,,/)
Calculator Component
Client
Ruby Implementation
12
SCDL Definition for Ruby Implementation
  • ltcomponent name"CalculatorServiceComponent"gt
  • ltimplementation.java class"calculator.Calculat
    orServiceImpl"/gt
  • ltreference name"calculatorService"gt
    CalculatorComponent lt/referencegt
  • lt/componentgt
  • ltcomponent name"CalculatorComponent"gt
  • lt!--implementation.java
    class"calculator.JavaCalculator"/--gt
  • ltrbimplementation.rb script"CalculatorIm
    pl.rb" class"CalculatorImpl"/gt
  • lt/componentgt
  • lt!--
  • ltreference name"CalculatorRmiService"gt
  • ltinterface.java interface"calculator.Calc
    ulatorService"/gt
  • ltrmibinding.rmi host"localhost"
    port"9999" serviceName"rmiCalculator"/gt
  • lt/referencegt
  • ltreference name"CalculatorWSService"gt
  • ltinterface.wsdl xmlnswsdli"http//www.w3
    .org/2006/01/wsdl-instance"

13
3) RMI Implementation
Calculator Service (interface ,-,,/)
Calculator
client
RMI binding
Reference
14
SCDL Definition for RMI
  • ltcomponent name"CalculatorServiceComponent"gt
  • ltimplementation.java class"calculator.Calculat
    orServiceImpl"/gt
  • ltreference name"calculatorService"gt
    CalculatorRmiService lt/referencegt
  • lt/componentgt
  • lt!--
  • ltcomponent name"CalculatorComponent"gt
  • ltimplementation.java class"calculator.Jav
    aCalculator"/gt
  • ltrbimplementation.rb script"CalculatorIm
    pl.rb" class"CalculatorImpl"/gt
  • lt/componentgt
  • --gt
  • ltreference name"CalculatorRmiService"gt
  • ltinterface.java interface"calculator.Calc
    ulatorService"/gt
  • ltrmibinding.rmi host"localhost"
    port"9999" serviceName"rmiCalculator"/gt
  • lt/referencegt
  • lt!--
  • ltreference name"CalculatorWSService"gt
  • ltinterface.wsdl xmlnswsdli"http//www.w3
    .org/2006/01/wsdl-instance"

15
4) WS Implementation
Calculator Service (interface ,-,,/)
Calculator
client
Web Services binding
WebAppruntime
WSDL
Reference
16
SCDL Definition for WS
  • ltcomponent name"CalculatorServiceComponent"gt
  • ltimplementation.java class"calculator.Calculat
    orServiceImpl"/gt
  • ltreference name"calculatorService"gtCalcul
    atorWSServicelt/referencegt
  • lt/componentgt
  • lt!--
  • ltcomponent name"CalculatorComponent"gt
  • ltimplementation.java class"calculator.Jav
    aCalculator"/gt
  • ltrbimplementation.rb script"CalculatorIm
    pl.rb" class"CalculatorImpl"/gt
  • lt/componentgt
  • ltreference name"CalculatorRmiService"gt
  • ltinterface.java interface"calculator.Calc
    ulatorService"/gt
  • ltrmibinding.rmi host"localhost"
    port"9999" serviceName"rmiCalculator"/gt
  • lt/referencegt
  • --gt
  • ltreference name"CalculatorWSService"gt

17
WS/RMI Calculator Implementation
Zoom In

Calculator
-

/
Calculator Service (interface ,-,,/)
Write a Comment
User Comments (0)
About PowerShow.com