Outline - PowerPoint PPT Presentation

About This Presentation
Title:

Outline

Description:

Trading supports locating servers based on service functionality and quality ... in Preference pref, in PolicySeq policies, in SpecifiedProps desired_props, ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 35
Provided by: shangp
Learn more at: http://www.cs.iit.edu
Category:
Tags: outline | pref

less

Transcript and Presenter's Notes

Title: Outline


1
Trading Service
  • Outline
  • What is trading service
  • How to use trading service
  • Printer Example

2
Motivation
  • Locating objects in location transparent way
  • Naming simple but may not be suitable when
  • clients do not know server
  • there are multiple servers to choose from
  • Trading supports locating servers based on
    service functionality and quality
  • Naming White pages
  • Trading Yellow Pages

3
Trading Characteristics
  • Trader operates as broker between client and
    server.
  • Enables client to change perspective from who?
    to what?

Trader
1export
2 Query
3 invoke
Exporter
Importer
  • Similar ideas in
  • mortgage broker
  • insurance broker
  • stock brokerage

4
Trading Characteristics
  • Common language between client and server
  • Service types
  • Qualities of service
  • Server registers service with trader.
  • Server defines assured quality of service
  • Static QoS definition
  • Dynamic QoS definition.

5
Trading Characteristics
  • Clients ask trader for
  • a service of a certain type
  • at a certain level of quality
  • Trader supports
  • service matching
  • service shopping

6
Example
  • Hongkong Telecom video-on-demand server

Server
Video-on- demand provider
MGM
User
Warner
Trader
Independent
7
CORBA Trading Service

Server
Client Application
objectImpl
proxy
export() modify() withdraw()
Query()
CORBA Trading Service
lookup
register
link
proxy
Admin
8
The Trading Process
  • Example Video-on-demand server

Client
Trader
MGMVoDS
WarnerVoDS
export( )
export( )
Query( )
modify( )
download( )
9
Trading Service Interface
  • Service type repository
  • Trader components
  • Iterators
  • Dynamic properties
  • Lookup importers make queries
  • Register exporters advertise new service offers
  • Link admins federate traders
  • Admin admins set policies
  • Proxy legacy mechanisms for advertising services

10
Service Type Definition
  • Service types define
  • Functionality provided by a service and
  • Qualities of Service (QoS) provision.
  • Functionality defined by object type
  • QoS defined based on properties, i.e.
  • property name
  • property type
  • property value
  • property mode
  • mandatory/optional
  • readonly/modifiable

11
Service Type Example
  • typedef enum VGA,SVGA,XGA Resolution
  • service video_on_demand
  • interface VideoServer
  • readonly mandatory property float fee
  • readonly mandatory property Resolution res
  • modifiable optional property float bandwidth

12
Service Type Hierarchy
  • An object type might have several implementations
    with different QoS.
  • Same object type might be used in different
    service types.
  • Service type S is subtype of service S iff
  • object type of S is identical or subtype of
    object type of S
  • S has at least all properties defined for S
  • Subtype relationship can be exploited by trader
    for service matching purposes

13
Constraint Definition
  • Importer defines the desired qualities of service
    as part of the query
  • Example
  • feelt10 AND res gtSGA AND bandwidthgt256
  • In a query, trader matches only those offers that
    meet the constraint

14
Trading Policies
  • Depending on constraint and available services, a
    large set of offer might be returned by a query.
  • Trading policies are used to restrict the size of
    the matched offers
  • Specification of an upper limit
  • Restriction on service replacements
  • Restriction on modifiable properties (these might
    change between match making and service requests)

15
Federated Traders
  • Scalability demands federation of traders
  • A trader participating in a federation
  • offers the services it knows about to other
    traders
  • forwards queries it cannot satisfy to other
    traders
  • Problems
  • Non-termination of import
  • Duplication of matched offers

16
Trading Graph
query.hop_count4
T1
def_follow_policyalways
max_hop_count5
max_hop_count1
T2
T3
query.hop_count0
Service Offer
T4
Trader Attribute
Link
17
CORBA Trading Service
Application Objects
CORBA facilities
Domain Interfaces
Object Request Broker
Object Trader
CORBAservices
18
CORBA Trading Interfaces
Admin
list_offers()

TraderComponents
Support Attributes
ImportAttributes
LinkAttributes
Register
Link
Lookup
export()
add_link()
query()
withdraw()
remove_link()
modify()
describe_link()
modify_link()
19
Defining Quality of Service
  • typedef Istring PropertyName
  • typedef sequenceltPropertyNamegt PropertyNameSeq
  • typedef any PropertyValue
  • struct Property
  • PropertyName name
  • PropertyValue value
  • typedef sequenceltPropertygt PropertySeq
  • enum HowManyProps none, some, all
  • union SpecifiedProps switch (HowManyProps)
  • case some PropertyNameSeq prop_names

20
Trader Interface for Exporters
  • interface Register
  • OfferId export(in Object reference,
  • in ServiceTypeName type,
  • in PropertySeq properties)
  • raises(...)
  • OfferId withdraw(in OfferId id)
  • raises(...)
  • void modify(in OfferId id,
  • in PropertyNameSeq del_list,
  • in PropertySeq modify_list)
  • raises (...)

21
Trader Interface for Importers
  • interface Lookup
  • void query(in ServiceTypeName type,
  • in Constraint const,
  • in Preference pref,
  • in PolicySeq policies,
  • in SpecifiedProps desired_props,
  • in unsigned long how_many,
  • out OfferSeq offers,
  • out OfferIterator offer_itr,
  • out PolicyNameSeq Limits_applied)
  • raises (...)

22
Service Type Repository
  • Service type
  • Name
  • Interfact type
  • Set of properties
  • Name
  • Typecode
  • Read-only/modifiable
  • Mandatory/optional

23
Service Type Repository
  • Substitutability of service types
  • The interface type of a derived service type may
    be a subtype of the interface type in the base
    service type
  • The property set may be extended in a derived
    service type with new property name (and their
    associated type and mode specification)
  • Inherited properties may be strengthened
  • Optional ? mandatory
  • Modifiable ? read-only

24
Service Type Repository
  • creating service type

// operation signatures IncarnationNumber
add_type ( in CosTradingServiceTypeName
name, in Identifier if_name, in
PropStructSeq props, in ServiceTypeNameSeq
super_types ) raises ( CosTradingIllegalSer
viceType, ServiceTypeExists, InterfaceTypeMi
smatch, CosTradingIllegalPropertyName, Cos
TradingDuplicatePropertyName, ValueTypeRedefi
nition, CosTradingUnknownServiceType, Dupl
icateServiceTypeName )
25
Service Type Repository
  • Removing service type

void remove_type ( in CosTradingServiceTypeName
name ) raises ( CosTradingIllegalServiceType
, CosTradingUnknownServiceType, HasSubTypes
)
26
Service Type Repository
  • Obtaining service type info

ServiceTypeNameSeq list_types ( in
SpecifiedServiceTypes which_types ) TypeStruct
describe_type ( in CosTradingServiceTypeName
name ) raises ( CosTradingIllegalServiceType,
CosTradingUnknownServiceType ) TypeStruct
fully_describe_type ( in CosTradingServiceTyp
eName name ) raises ( CosTradingIllegalServic
eType, CosTradingUnknownServiceType )
27
Service Type Repository
  • Masking/unmasking types

void mask_type ( in CosTradingServiceTypeName
name ) raises ( CosTradingIllegalServiceType
, CosTradingUnknownServiceType, AlreadyMaske
d ) void unmask_type ( in
CosTradingServiceTypeName name ) raises
( CosTradingIllegalServiceType, CosTrading
UnknownServiceType, NotMasked )
28
Service Type Repository
  • properties

interface ServiceTypeRepository enum
PropertyMode PROP_NORMAL, PROP_READONLY, PROP_
MANDATORY, PROP_MANDATORY_READONLY struct
PropStruct CosTradingPropertyName
name CORBATypeCode value_type PropertyMode
mode
29
Printer Example
  • Printer

interface Printer typedef string
filename exception PrinterOffLine
short code void print_file(in
filename fn) raises(PrinterOffLine)
short queue_length()
raises(PrinterOffLine) interface
TradingPrinter Printer,
CosTradingDynamicDynamicPropEval
30
Printer Example
  • Printer property
  • Building A Block, A Block A Block
  • Floor 2, 3, 7
  • Language PostScript, PostScript, PostScript
  • Resolution 300, 600, 600
  • Color black, black, 256color
  • Queue_len -? PrinterObjectRef-gtqueue_length()
  • Name 12ps, monster, rib

31
Printer Example
  • Implementing the Printer Interface
  • void print_file(string fn)
  • Short queue_length()
  • Any evalDP(string name, TypeCode returned_type,
    Any extra_info)

32
Printer Example
  • Implementing the Printer Server
  • ORB initialization
  • Get trader reference
  • Find service type repository
  • Check for service type existence, if not exist,
    create it
  • Create a prop struct ist with the property name
    for a printer service type
  • Add the new service type
  • Create service offer property seq to use for
    export
  • Create printers (use command-line arguments) and
    making them available to ORB
  • Update the template service offer to advertise
    them

33
Printer Example
  • Implementing the Printer Client
  • Arguments
  • Name of the file to print
  • Constraint expression for searching criteria
  • Preference expression to order the printer
    service offers returned
  • Implementation
  • Check for arguments
  • Find Lookup object
  • Process the commend-line arguments
  • Establish basic policies for a trader query
  • Make the query
  • The returned Printer object are tried in order
    until the file is successfully printed

34
Key Points
  • Distributed objects can be located by naming and
    trading
  • Naming binds externally known names to an object
    reference and supports name resolution to reveal
    the object reference
  • Trading supports locating objects based on the
    functionality that they offer and the quality of
    service that they guarantee
Write a Comment
User Comments (0)
About PowerShow.com