Upload
homer-cunningham
View
219
Download
0
Embed Size (px)
Citation preview
www.objectweb.org
DreamA Fractal-based communication framework
ObjectWeb Architecture Meeting
July, 8th 2004
M. Leclercq, V. Quéma, J.-B. Stefani
Sardes Project, INRIA-LSR-IMAG
www.objectweb.org Architecture Meeting - D2 - 07/08/2004
Outline
Motivations
Dream
Experiments
Future work
www.objectweb.org Architecture Meeting - D3 - 07/08/2004
Motivations
Existing communication middleware (CM)Provide a fixed communication model
RPC (CORBA, RMI, SOAP, …)JMS (JORAM, WebSphere MQ, iBus, …)Ad-Hoc (BEA MessageQ, Gryphon, SIENA, …)
But… share a lot of architectural components
Provide several non-functional properties
Are not extensively (re)configurableFixed monolithic architecture with few parameters to configure
The application developer is constrained to fixed abstractions
www.objectweb.org Architecture Meeting - D4 - 07/08/2004
What do we need?
(re)configurable CMsFunctionally
Build various communication paradigms–RPC, Message passing, event/reaction, publish/subscribe
Non functionallyProvide various non-functional properties
–Security, transactions, persistency, ordering, …
ArchitecturallyAdapt to various kind of execution environments
–PC, PDA, cell phones, …
www.objectweb.org Architecture Meeting - D5 - 07/08/2004
What is Dream?
A framework for building CMsCore
Abstractions and tools for resource management–Messages–Activities
ADL for the configuration and deployment of CMsA component library
Components commonly found in CMs
Used to build several personalitiesJMS, Probabilistic broadcast, Internet services, …
Integrated in LeWYS
www.objectweb.org Architecture Meeting - D6 - 07/08/2004
Outline
Motivations
DreamCoreADLComponent library
Experiments
Future work
www.objectweb.org Architecture Meeting - D7 - 07/08/2004
Dream core
Define abstractions and tools to manage resources
Messages Activities
105 classes (12054 lines)dream-core.jar = 113k
www.objectweb.org Architecture Meeting - D8 - 07/08/2004
Messages
Messages are fractal composites encapsulatingChunks
Unit of data allocationImplement a Fractal server interface
Sub messages
Two interfacesMessage
Methods to retrieve chunks and sub messages
ExtensibleMessage extends MessageMethods to add/remove chunks and sub messages
www.objectweb.org Architecture Meeting - D9 - 07/08/2004
Message managers
Shared components that manage messages and chunks
Implement the MessageManager interfaceMethods to create, delete, duplicate chunks and messages
Pool messages and chunks for efficiency
Generic versus specific implementations
Future work: dynamic generation of messages using ASM
www.objectweb.org Architecture Meeting - D10 - 07/08/2004
Inputs/outputs
Fractal interfaces that allow message exchanges between components
push(message, ctxt) ;
void push(Message m, Map ctxt){ // Processing of message m}
Push connection
Message m = pull(ctxt);// Processing of // message m
Message pull (Map ctxt){// Returns a message}
Pull connection
Component A
Component B
Input
Output
Principle
www.objectweb.org Architecture Meeting - D11 - 07/08/2004
Activities
Components can be active or passive
Active components define tasks to be executed
For a task to be executed, it must be registered to one activity manager component
www.objectweb.org Architecture Meeting - D12 - 07/08/2004
Activity managers
Shared components that encapsulates tasks and schedulers
Activity manager
Task(thread)
FIFO Scheduler
Task A1 Task A2 Task B
Component A
Third party
Component B
taskManager
schedulerManager
taskController
Task(thread)
schedule
executeregister(A1)
www.objectweb.org Architecture Meeting - D13 - 07/08/2004
Schedulers and tasks
Schedulers are responsible for mapping higher level tasks onto lower-level tasks
Schedule server interfaceExecute client interfaceImplement a scheduling policy
FIFO, round-robin, with priority, ...
TasksExecute server interfaceSchedule client interfaceThree kinds of tasks
Higher-level tasks = applicative tasksLowest-level tasks = threads (Execute = Runnable)Middle-level tasks = allow inter-schedulers scheduling
Note: shares a lot of similarities with P. Merle’s orchestration framework… should be merged soon !
www.objectweb.org Architecture Meeting - D14 - 07/08/2004
Outline
Motivations
DreamCoreADLComponent library
Experiments
Future work
www.objectweb.org Architecture Meeting - D15 - 07/08/2004
ADL
Use Fractal ADLAll this work is not Dream specific
Added modulesDescription of legacy componentsClass loading management (uses OSCAR’s module
loader)
Future workExtend (re)configuration capabilitiesSupport for distributed asynchronous deployment
www.objectweb.org Architecture Meeting - D16 - 07/08/2004
Outline
Motivations
DreamCoreADLComponent library
Experiments
Future work
www.objectweb.org Architecture Meeting - D17 - 07/08/2004
Component library (1)
Components commonly found in CMsFine grain components
Ease reuseImprove configurability
76 classes (9025 lines)dream-lib.jar = 116k
www.objectweb.org Architecture Meeting - D18 - 07/08/2004
Component library (2)
Message queueOrdering (FIFO, causal, …) Behavior in the different states (empty, full)
RouterRouting policy (round-robin, chunk name, …)
AggregatorAggregate messages received on the input(s)Deliver a message on its output
PumpPeriodically pull a message on its input and then push it
ChannelAllow message exchanges between different address spaces (TCP socket, …)
Protocol components, Transformers, Filters …
www.objectweb.org Architecture Meeting - D19 - 07/08/2004
Outline
Motivations
Dream
Experiments
Future work
www.objectweb.org Architecture Meeting - D20 - 07/08/2004
Experiments
GoalsCheck that
Various personalities can be builtThere is a gain in configurabilityPerformances for functionally equivalent CMs are comparablePerformances can be better when CMs are adequately configured
ExperimentsJoram, an open-source implementation of the JMS APILightweight Probabilistic Broadcast (LPBCast)Staged Event-Driven Architecture (SEDA)
www.objectweb.org Architecture Meeting - D21 - 07/08/2004
Joram
Router
Atomic Reactor
Agent Factory
Agent Repository
MessageT
oNotif
NotifT
oMessage
ConduitRouter
Causal Sorter
DestinationResolver
ChannelOut ChannelIn
DestinationResolver
ChannelOut ChannelIn
AtomicityProtocol
Engine
Repository
Network 1 Network 2
www.objectweb.org Architecture Meeting - D22 - 07/08/2004
Performances (1)
Compare performance of the same application running on Joram agent server and its Dream based implementation
Four Agent serversEach server hosts an agentAgents are organized in a virtual ringA message is forwarded by each agent around the ringMeasure
Number of rounds made by the message per secondMemory footprint
www.objectweb.org Architecture Meeting - D23 - 07/08/2004
Performances (2)
Nb of Rounds / sec Memory footprint
(KB)0 kB 1 kB
Joram 325 255 4 x 1447
Dream (non-reconf) 329 260 4 x 1580
Dream (reconf) 318 250 4 x 1587Dream non-reconf
Optimized bindingInterface object bypassed
No lifecycle interceptorNon stoppable application
Julia has no execution cost and low memory cost
www.objectweb.org Architecture Meeting - D24 - 07/08/2004
Configurability assessment (1)
Allow changing non functional propertiesCausal orderingAtomic reaction
Allow changing the architecture
Allow changing the concurrency model
Allow building an architecture for mobile devices
www.objectweb.org Architecture Meeting - D25 - 07/08/2004
Configurability assessment (2)
An Agent Server for mobile devices
Router
Atomic Reactor
Agent Factory
Agent Repository
MessageT
oNotif
NotifT
oMessage
TCPChannelIn(Pull)
TCPChannelOut(Push)
RepositoryAtomicityProtocol
Engine
ChannelOut(Pull)
TCPChannelIn
(Push)
Conduit
Network (details not shown)
RemoteRepresentative
Towards other agent servers
Mobile device Proxy
www.objectweb.org Architecture Meeting - D26 - 07/08/2004
SEDA (Staged Event-Driven Architecture)
UC Berkeley project (SOSP 2001, USITS 2003)
Dedicated to the construction of highly concurrent Internet services
Service = network of event-driven stages
StageEvent queue (incoming events)Event handlerThread pool
www.objectweb.org Architecture Meeting - D27 - 07/08/2004
SEDA architecture
Event Handler
Thread Pool
Controller
Event Queue
Outgoing Events
www.objectweb.org Architecture Meeting - D28 - 07/08/2004
SEDA-Dream architecture
PumpEvent
Queue EventHandler
Stage
Activity manager
Task(thread)
taskManager
threadManager
taskControllerFunctional interfaces
batchingAttribute
ActivityManager
Stage
StagePumpTask
Task(thread)
Task(thread)
Scheduler
www.objectweb.org Architecture Meeting - D29 - 07/08/2004
Configurability assessment
Event handlers have direct control over threadsAllows avoiding the use of locks, …
Activity managers can be shared between several stages
Common scheduling policy for accessing shared state
Every architectural element is a componentReconfigurationOrdered queues
Allows changing the concurrency model
www.objectweb.org Architecture Meeting - D30 - 07/08/2004
Outline
Motivations
Dream
Experiments
Future work
www.objectweb.org Architecture Meeting - D31 - 07/08/2004
Future work
Improving DreamPersistency, transactionsImproving resource management
Integrating Dream with other projects (CLIF, LeWYS)
Binding factory for Julia
Building other personalitiesSynchronous middleware (requires Jonathan concepts)Group communication library (with JGroups as a basis)Implementing various publish/subscribe middleware
www.objectweb.org Architecture Meeting - D32 - 07/08/2004
Questions?