Node Services Development

19
Node Services Development Thomas D. Uram [email protected] Argonne National Laboratory

description

Node Services Development. Thomas D. Uram [email protected] Argonne National Laboratory. Access Grid Architecture. VenueServer. VenueServer Server component for Venues Venue Virtual representation of a meeting room VenueClient User software for entering a Venue Node - PowerPoint PPT Presentation

Transcript of Node Services Development

Page 1: Node Services Development

Node ServicesDevelopment

Thomas D. [email protected]

Argonne National Laboratory

Page 2: Node Services Development

Access Grid ArchitectureVenueServerVenueServer

VenueVenueVenueVenueVenueVenue

VenueClientVenueClient

NodeNode

• VenueServer– Server component for

Venues

• Venue– Virtual representation of a

meeting room

• VenueClient– User software for entering

a Venue

• Node– Aggregation of hardware

and software for participating in a meeting

Page 3: Node Services Development

NodeNode

Node Architecture

NodeServiceNodeService

ServiceManagerServiceManager

AGServiceAGService

• NodeService– Aggregates ServiceManagers– Manages node configurations

• ServiceManager– Exposes available machine

resources– Manages AGServices

• AGService– Interface for controlling access

to machine resources– Exposes service configuration

interface

Page 4: Node Services Development

Overview

• Expose machine resources– Describe available resources (e.g. video card)

• Provide configuration layer– Describe available configuration parameters

(e.g. video quality level)– Accept configuration of those parameters

• Provide service abstraction– Services are controlled over SOAP interface, so

could be written in any language with an interoperable SOAP implementation

Page 5: Node Services Development

Operation

• Resources– Resources represent something the machine

can make available (e.g. video capture device)

– When a service is added, it may have a resource assigned to it

Page 6: Node Services Development

Operation

• Service Capabilities– The capabilities of the node

are collected and passed to the venue

– Capabilities are currently defined with the following attributes:

• role (e.g. producer, consumer)• type (video)• codec (h261, dv)• rate• channels

NodeNode

Venue ClientVenue Client

VenueVenue

Cap

ab

ilit

ies

(ag

gre

gate

dfr

om

serv

ices)

Cap

ab

ilit

ies

Page 7: Node Services Development

Operation

• Capabilities Negotiation– The capabilities of the node are

collected and passed to the venue– The venue allocates a stream

(multicast group) for each producer capability of a yet non-existent type

– The venue returns a stream (multicast group) for each existing consumer capability type

– The returned streams are passed down to the services

NodeNode

Venue ClientVenue Client

VenueVenue

Str

eam

Descri

pti

on

s

Cap

ab

ilit

ies

(ag

gre

gate

dfr

om

serv

ices)

Cap

ab

ilit

ies

Page 8: Node Services Development

Operation

• Stream Descriptions– The venue returns a stream

description (multicast group) for each existing consumer capability type

– The returned stream descriptions are passed down to the services

– Service configure for the given streams (typically passing the contained multicast groups to media tools)

NodeNode

Venue ClientVenue Client

VenueVenue

Str

eam

Descri

pti

on

s

Cap

ab

ilit

ies

(ag

gre

gate

dfr

om

serv

ices)

Update AGServices

Str

eam

Descri

pti

on

s

Cap

ab

ilit

ies

Page 9: Node Services Development

Configuration

• Services may have a set of configurable parameters that control their operation– For example: video quality level, audio input

gain• Configuration parameters are defined in

terms of types from AGParameter.py– ValueParameter– TextParameter– OptionSetParameter– RangeParameter

• Basic handling of parameters is performed in AGService

Page 10: Node Services Development

Configuration

• The Node Management user interface includes code to represent parameters for editing

TextParameter

OptionSetParameter

RangeParameter}}

Page 11: Node Services Development

Configuration

• Parameter values can be used when the service is started

• Configuration data is persisted in saved node configuration files– ConfigParser format– Stored in AccessGrid/nodeConfig

Page 12: Node Services Development

Other

• Logging– Services derived from AGService

automatically create a logfile in AccessGrid3/Logs, based on Service class name

Page 13: Node Services Development

Packaging

• A service is delivered in a service package, a zip-file containing the Python implementation, a service description file, and any supporting implementation files

• A service description file (.svc) contains information presented to the user before adding the service

• Service packages are installed using agpm (similar to shared applications):– runag3.py agpm3.py -z ServicePackage.zip

• Service packages are extracted to a temporary directory, subject to their version

Page 14: Node Services Development

Packaging

• Sample service description file[ServiceDescription]name = DebugServicedescription = Example Debug Servicecapabilities = Capability1 Capability2 Capability3executable = DebugService.pyplatform = neutralversion = 1.0

[Capability1]role = consumertype = audio

[Capability2]role = consumertype = video

[Capability3]role = producertype = debug

Page 15: Node Services Development

AGService API

Page 16: Node Services Development

Calls from Toolkit

• On Enter– GetCapabilities()

• Called during aggregation of capabilities from AGServices– ConfigureStream(StreamDescription)

• Called to set the stream the AGService should use• Ignores trivial stream changes

• On Exit– Stop()

• Called to stop the AGService

• Other– Start()

• Not called explicitly• Typically called from ConfigureStream

Page 17: Node Services Development

Example: DebugService

• Basic service that – logs messages in response to various

calls to it– defines debug parameter which can be

set through configuration interface

• Review log file (DebugService.log) for proper operation

Page 18: Node Services Development

Exercise: ClientAnnouncerService

• Service to announce presence• Sends user’s name over a multicast

group• Watch for your name to appear on

the ClientViewer

Page 19: Node Services Development

Exercise: ClientAnnouncerService

• Retrieve Venue URL from VenueClient

• Send Venue URL with name• Use fixed multicast address, to share

presence data across Venues