network services

28
Access Grid Workshop – APAC ‘05 Network Services Susanne Lefvert [email protected] University of Chicago

Upload: senwe

Post on 13-Jan-2016

29 views

Category:

Documents


0 download

DESCRIPTION

Network Services. Susanne Lefvert [email protected] University of Chicago. Outline. Introduction Limitations of Current Architecture Enhanced Architecture Network Services Example: Debug Service Exercises. Introduction. Enable users to seamlessly participate in AG meetings. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Network Services

Access Grid Workshop – APAC ‘05

Network Services

Susanne Lefvert [email protected] of Chicago

Page 2: Network Services

Access Grid Workshop – APAC ‘05

Outline

• Introduction• Limitations of Current Architecture• Enhanced Architecture• Network Services• Example: Debug Service• Exercises

Page 3: Network Services

Access Grid Workshop – APAC ‘05

Introduction

Network

• Enable users to seamlessly participate in AG meetings.

• Middleware

• Stream processing

Page 4: Network Services

Access Grid Workshop – APAC ‘05

Heterogeneous Environment

• Devices – VIC, RAT, Quicktime, Realplayer, H.323

clients…

• Formats– Different encodings, sample rate …

• Network – Available multicast, bandwidth …

• Preferences– Surgery: Want high resolution video– Presentation: Want lower resolution video

Page 5: Network Services

Access Grid Workshop – APAC ‘05

Class Diagram

VenueClientVenueClient

AGNodeServiceAGNodeService

AGServiceManagerAGServiceManager

AGServiceAGServiceAGServiceAGServiceAGServiceAGService

AGServiceAGService

AGServiceManagerAGServiceManager

Page 6: Network Services

Access Grid Workshop – APAC ‘05

+matches()

-role-type

Capability

Capability

• Role– CONSUMER– PRODUCER

• Type– AUDIO– VIDEO– TEXT

Not Sufficient

Page 7: Network Services

Access Grid Workshop – APAC ‘05

Sequence Diagram

Mismatch can not

be resolved

Page 8: Network Services

Access Grid Workshop – APAC ‘05

Limitations of Current Architecture

1. Service capability description limited

2. User preferences do not exist

3. No resolution to capability mismatch

Page 9: Network Services

Access Grid Workshop – APAC ‘05

Enhanced Capabilities

• Schema including:1. Service capability

• Device (sample rate, sample size, sample format…)

• Encoding (name, quality, bit rate, size…)• RTP (payload type, profile…)

2. Node capability• Available bandwidth, multicast, firewall…

3. User preferences• Preferred quality, bandwidth…

Page 10: Network Services

Access Grid Workshop – APAC ‘05

VenueClientVenueClient

AGNodeServiceAGNodeService

AGServiceManagerAGServiceManager

AGServiceAGServiceAGServiceAGServiceAGServiceAGService

AGServiceAGService

AGServiceManagerAGServiceManager

CapabilityCapability

Service Capability

Node Capability

User Preferences

Page 11: Network Services

Access Grid Workshop – APAC ‘05

Sequence Diagram

NetworkServiceVenue NetworServicesManagerVenueClient

Enter

CapabilityMismatch

Matcher

FindServices(StreamDescription, myCapability)

[StreamDescription]

Transform(StreamDescription)

NegotiateCapabilities()

[NetworkServiceDescription]

Match(StreamDescription, myCapability, [NetworkServiceDescription])

[NetworkServiceDescription]

[StreamDescription]

Page 12: Network Services

Access Grid Workshop – APAC ‘05

Network Service

y = Transform(x)x y

x y

Page 13: Network Services

Access Grid Workshop – APAC ‘05

Matcher

Venue

Stream Capabilities

Node Capabilities

Mismatch

1.

Network Service

Node Capabilities

Stream Capabilities

MatchMatch

2.

Page 14: Network Services

Access Grid Workshop – APAC ‘05

Network Service

• Registers with a venue or a venue server

• Includes input and output capabilities

• Provides a Transform() method

• Has an interface for remote configuration

• Emits heartbeats

Page 15: Network Services

Access Grid Workshop – APAC ‘05

Example: Video Selector

GOAL: Reduce bandwidth

EXAMPLE: Connect from home

Page 16: Network Services

Access Grid Workshop – APAC ‘05

Multicast

Multicast

VideoSelector

Example: Video Selector

Page 17: Network Services

Access Grid Workshop – APAC ‘05

Example: Transcoder

GOAL: Enable more devices

EXAMPLE: H.323 client

Page 18: Network Services

Access Grid Workshop – APAC ‘05

Multicast

AudioTranscoder

Multicast

Linear16 pcmu

Example: Transcoder

Page 19: Network Services

Access Grid Workshop – APAC ‘05

Implementation Details

1. Add new capabilities (ServiceCapability) to your node services.

2. Create a network service matching the new capabilities of the node services.

3. Connect the network service to the venue

4. Connect your node services to the venue

Page 20: Network Services

Access Grid Workshop – APAC ‘05

Network Service Base Class

• Initiates the AG environment

• Hides SOAP details

• Includes logging

• Communicates with venues

• Includes the Transform() method

Page 21: Network Services

Access Grid Workshop – APAC ‘05

Service Capabilities

• Describe input and output

• Same as node service capabilities

• Used during capability negotiation and network service matching

Page 22: Network Services

Access Grid Workshop – APAC ‘05

Example: Video Selectorclass SelectorNetworkService(AGNetworkService): def __init__(self, name): AGNetworkService.__init__(self, name, 'Selector', '1.0')

# Create capabilities inconfig = {"Encoding":"H261"} inCap = ServiceCapability(name, 'consumer', 'video', inconfig)

outconfig = {"Encoding":"H261", "StreamSelection":"On"} outCap = ServiceCapability(name, 'producer', 'video', outconfig) self.inCapabilities = [inCap.ToXML()] self.outCapabilities = [outCap.ToXML()]

# Manage processes self.processManager = ProcessManager()

# Start the soap interface self.Start(self)

def StopTransform(self, streamList): # Stop video selector self.processManager.TerminateAllProcesses()

Page 23: Network Services

Access Grid Workshop – APAC ‘05

Example: Video Selectordef Transform(self, streamList): # Start video selector newStreams = []

for s in streamList: cap = s.capability cap.xml = self.outCapabilities[0]

# Create new stream description location = MulticastNetworkLocation("224.2.2.2", 8000) ns = StreamDescription("Video Selector Stream", location, cap) newStreams.append(ns)

# Create process arguments fromaddr = s.location.host fromport = s.location.port toaddr = ns.location.host toport = ns.location.port executable = os.path.join(os.getcwd(), "Selector.py") options = [executable, fromaddr, fromport, toaddr, toport, 1]

# Start process self.processManager.StartProcess(sys.executable, options)

return newStreams

Page 24: Network Services

Access Grid Workshop – APAC ‘05

Example: Video Selector Consumer Service

def __SetCapabilities(self): oldCap1 = Capability( Capability.CONSUMER, "video" ) # Create new capabilities to include in old capability format val = "Off" for c in self.configuration: if c.name == "video selection": val = c.value config = {"StreamSelection": val, "Encoding":"H261"}

nsc1 = ServiceCapability('Video Consumer Selector', oldCap1.role, oldCap1.type, config) oldCap1.xml = nsc1.ToXML() self.capabilities = [oldCap1]

Page 25: Network Services

Access Grid Workshop – APAC ‘05

Exercises

Exercise 6 – Network Services:

• Testing the video selector service

• Running a debug network service

• Creating a custom SOAP interface for configuration

• Creating a client for connecting to the custom SOAP interface

http://www.mcs.anl.gov/fl/research/accessgrid/documentation/tutorial/AGTk_2.4

Page 26: Network Services

Access Grid Workshop – APAC ‘05

Exercises 1: Video Selector

1. Install the modified node services with new capabilities.

2. Enter the venue the video selector is connected to

3. Switch between video selection on and off

Page 27: Network Services

Access Grid Workshop – APAC ‘05

Exercises 2: Debug Service

1. Install the two modified node serviceswith new service capabilities

2. Modify the Debug Network Service

3. Connect the network service to a venue and enter with the two node services to trigger matching.

Page 28: Network Services

Access Grid Workshop – APAC ‘05

Exercises 3: SOAP Interface

1. Add a SOAP interface to the debug service

2. Create a client that can communicate remotely with the debug network service SOAP interface.