virtual osgi framework and telecommunications sam supakkul yotta networks digital pockets, llc...

29
Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas [email protected] Lawrence Chung Dept. of Computer Science Univ. of Texas at Dallas [email protected]

Upload: joleen-tucker

Post on 12-Jan-2016

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual OSGi Framework and Telecommunications

Sam SupakkulYotta Networks

Digital Pockets, LLCDallas, Texas

[email protected]

Lawrence ChungDept. of Computer

ScienceUniv. of Texas at Dallas

[email protected]

Page 2: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Can Your Cell Phone Do This?

• Phone calls• Emails• Calendar

Page 3: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

…And All This Too?

• Phone calls• Emails• Calendar• Watch movie• Program VCR• Open garage

Page 4: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Why Not? What’s the Problem?

Infrastructure: low speed transmission

Solution: high speed 3G wireless Application hosting environment:

1. Static: fixed pre-installed applications2. Small memory: can’t fit all applicationsSolution: dynamic application framework

such as OSGi Framework

Page 5: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Open Services Gateway initiative (OSGi) Framework

Features Component-based

run-time framework for Java applications (bundles)

Java API for managing bundle life-cycle

Bundles installed or uninstalled on-demand from the network

HT

TP

Lo

gg

ing

SN

MP

Sec

uri

ty

Cal

end

ar

OSGi Framework

JVM (J2ME/PersonalJava)

Embedded/Real-time OS

Network

Embedded Device

Page 6: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

OSGi Cell Phone

Benefits No obsolete apps. Unlimited apps.

Limitations No. of concurrent

apps. limited by physical memory

More apps possible by explicitly uninstalling and installing apps.Constraints

Low: Cost, Size, WeightHigh: Performance, Practicality

Page 7: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Introduction to NFR Framework Softgoal Interdependency Graph (SIG)

Responsiveness[Embedded Device]

Usability[Embedded Device]

-- ++

Swap Entire ApplicationSwap Memory Page

Type [Topic1, Topic2, ...]Non-functional Req.

Design Component

Negative Contribution (Hurt)

Positive Contribution (Help)

Network latency makesswapping apps. unresponsive

Claim

Page 8: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

SIG for the Existing OSGi FrameworkMultiple Services[EmbeddedDevices]

Static MultipleServices [EmbeddedDevices, NetworkedConnected]

Dynamic MultipleServices [EmbeddedDevices, Networked]

Platform-independentDynamic MultipleServices [EmbeddedDevices, Networked]

Application HostingServices [EmbeddedDevices, Networked](G1)

Services Installed On-Demand [EmbeddedDevices, Networked]

Multiple Services[Embedded Devices,Networked]

Multiple Services[EmbeddedDevices,Standalone]

Dynamic MultipleServices [EmbeddedDevices, Networked,Large Memory]

Dynamic MultipleServices [EmbeddedDevices, Networked,Small Memory] (G2)

OSGiFramework

Platform-independentBinary Code

DynamicServicesLoad/Update

Multi-tasking

J2ME/Personal JavaPlatform (G11)

Work withSmallDevices

!

+

++

++

+

++

++

Page 9: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Problems with Existing OSGi Framework

Benefits No obsolete apps. Unlimited apps.

Limitations No. of concurrent

apps. limited by physical memory

More apps possible by explicitly uninstalling and installing apps.Constraints

Low: Cost, Size, WeightHigh: Performance, Practicality

Page 10: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Conclusion from SIG Virtual memory Remote server for

swapped memory Application level

swapping

thus the term:Virtual OSGi

Framework

SIG for the Virtual OSGi FrameworkMultiple Services[EmbeddedDevices]

Static MultipleServices [EmbeddedDevices, NetworkedConnected]

Dynamic MultipleServices [EmbeddedDevices, Networked]

Platform-independentDynamic MultipleServices [EmbeddedDevices, Networked]

Application HostingServices [EmbeddedDevices, Networked](G1)

Services Installed On-Demand [EmbeddedDevices, Networked]

Multiple Services[Embedded Devices,Networked]

Multiple Services[EmbeddedDevices,Standalone]

Dynamic MultipleServices [EmbeddedDevices, Networked,Large Memory]

Dynamic MultipleServices [EmbeddedDevices, Networked,Small Memory] (G2)

Practicality[EmbeddedDevices]

Usability[EmbeddedDevices]

Ease ofUpgrade[EmbeddedDervices](G3)

Responsiveness[EmbeddedDevices] (G4)

OSGiFramework

Platform-independentBinary Code

DynamicServicesLoad/Update

Multi-tasking

J2ME/Personal JavaPlatform (G11)

Work withSmallDevices

VirtualOSGiFramework

-

Swap EntireApplicationat a Time(G10) -

Swap MemoryPage at aTime (G9)

Add PhysicalMemory (G5)

VFM-to-AdminBundleInterface

-

Use VirtualMemory(G6)

-

Swap toRemoteServer(G8)

-

Swap toLocal Hard-disk (G7)

!

Remote MemoryManager (VirtualFrameworkManager/VFM)

VFM-to-ServiceProviderInterface

+

++

++

+++

+

--

--

++

--+

++

AdminBundle

+++

+++

++

++

++

++

Page 11: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual OSGi Framework General Concept

OSGi Framew ork

Fixed system bundles

...

A p p lica tion rep o sitoryon rem ote server

A ctive ap p lica tion s ru n n in gon th e S erv ice G atew ay

Page 12: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Bundle Deployment Workflow

HT

TP

Lo

gg

ing

SN

MP

Sec

uri

ty

Cal

end

ar

OSGi Framework

JVM (J2ME/PersonalJava)

Embedded/Real-time OS

Network

OSGi Embedded Device

Virtual Framework Provider

1.1 Register bundlewith QoS

BundleRepository

1.2. Schedule bundlebased on QoS

1.3. Deploy bundle

2.1. Unregister bundle

2.2. Uninstall bundle

Service Provider

Page 13: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual OSGi Framework UML Use Case Model

Page 14: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Bundle QoS

Type Description Delay Threshold

Critical Safety/health related 2 seconds

Interactive Apps w/ user interaction

4 seconds

High Priority Background

User expecting indirect feedback. Ex. Furnace control

Minutes

Low Priority Background

User not expecting feedback. Ex. Billing Mngt

Hours

Bundle has a flag: Interruptible?

Page 15: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual OSGi Framework Architecture

registeration,state change notification

deploy/terminate,state change notification

Database

Service Provider

Virtual Framework Manager

registeration,state change notification

deploy/terminate,state change notification

bundle image,VFM data

bundle image

bundle image

Web Server

Services Gateway

I1

I2

Provider InterfaceHandler

I3

I4

Bundle Manager

I5

I6

Gateway InterfaceHandler

I7

I8

AdminBundle

OSGi Framework

Page 16: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual Framework Manager UML Class Diagram

10..*GatewayBundle 0..* 1

0..*

0..1

1

0..*

1

0..*

service dependency

0..*

0..*

BundleGateway DeploymentPolicy

Schedule

ServiceProvider

Service

Page 17: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

GatewayBundle UML State Chart

Preemption Criteria:• Interruptible?• Bundle QoS

Deployed

Installed StoppedStarted Uninstalled

Terminated Sleeping

Scheduled

unregister

stop

uninstall

start

terminate[preempted]terminate[complete, no schedule]

unregister

deploy

unregister

terminate[complete, has schedule] deploy

schedule

Page 18: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Bundle UML State Chart

Page 19: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

OSGi Framework in Consumer Devices

Page 20: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

OSGi Framework in Smart Home Application

Page 21: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Virtual OSGi Framework Walk-through using Mary’s Smart Home Scenario

1. Mary requests to see the movie guide.2. Mary selects a pay-per-view on “Sleepless

in Seattle”3. While watching the movie, she receives an

IP phone call from her mother.4. Mary pauses the movie and accepts the

call.5. Mary talks to her mother for a while.6. After Mary is finished with the call, she

resumes the movie.7. Mary is happily enjoying the happy ending

of the movie…

Page 22: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Mary’s Residential Gateway Application Profile

OSGi Framew ork

100 KB

1000 KB

fixed system bundles applications

Legend

N on-in terruptib le Bundle

Interruptib le Bundle

Page 23: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Initial OSGi Gateway Active Bundles

OSGi Framew ork

Fixed system bundles

Page 24: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Mary requests to see the Movie Guide.

OSGi Framew ork

Fixed system bundles

Virtual Framew orkManager

downloadedforced term inated(swapped out)

Page 25: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Mary selects a pay-per-view on “Sleepless in Seattle”

OSGi Framew ork

Fixed system bundles

Virtual Framew orkManager force term inated

(swapped out)downloaded

term inates

Page 26: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

The movie is paid for by Mary’s Digital Wallet/eCash

OSGi Framew ork

Fixed system bundles

Virtual Framew orkManager force term inated

(swapped out)downloaded

term inates

Page 27: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Mary receives an IP phone call from her mother. She accepts the call.

OSGi Framew ork

Fixed system bundles

Virtual Framew orkManager

force term inated(swapped out)downloaded

term inates

Page 28: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

After Mary is finished with the call, she resumes the movie and enjoys the ending…

OSGi Framew ork

Fixed system bundles

Virtual Framew orkManager

self term inated

restarted

Page 29: Virtual OSGi Framework and Telecommunications Sam Supakkul Yotta Networks Digital Pockets, LLC Dallas, Texas ssupakkul@computer.org Lawrence Chung Dept

Conclusion

Contribution A solution to run more apps. on

limited memory devices A demonstration of a software process

using NFR Framework and RUP/UML

Future Work More advanced scheduling algorithms Fault tolerant for handling network

link failure