Component architecture

23
Cin/UFPE Component architecture Chapter Twenty by Vanilson Burégio

description

Component architecture. Chapter Twenty by Vanilson Burégio. Component Architecture. Basis of any large-scale and is of utmost importance for component based systems Defines: interaction between components and their environment roles of components - PowerPoint PPT Presentation

Transcript of Component architecture

Page 1: Component architecture

Cin/UFPE

Component architecture

Chapter Twentyby Vanilson Burégio

Page 2: Component architecture

CIn/UFPE

Component Architecture

Basis of any large-scale and is of utmost importance for component based systems Defines:

interaction between components and their environment roles of components

It is not clear what a component architecture should look like

The chapter presents na attempt at conceptualizing the component architecture establish order within chaos

Page 3: Component architecture

CIn/UFPE

The roles of an architecture

The basis for: Independence – enable multiple sources of solution parts Cooperation – essential when the whole is more than the sum of its

parts

Technically Defines overall invariants Include all policy decisions

Roles of components Enable interoperation across otherwise independent uses of the

mechanisms Prescribe proper frameworks

Limiting the degrees of freedom to curb variations and enable cooperation

Page 4: Component architecture

CIn/UFPE

The roles of an architecture

Principal considerations: Functionality Performance Reliability Security

Commonly, these aspects are ignored, emphasizing functionality. The consequences can be fatal!

Page 5: Component architecture

CIn/UFPE

Conceptualization – beyond objects?

Conceptual level Useful to introduce layers

To single out components Separate concerns

Challenge: granularities Distinguish relationships between objects

“has a” relationship - representative objects “uses a” relationship

can introduce cyclical dependencies

Relationship can be modeled as graphs

Page 6: Component architecture

CIn/UFPE

Definitions of key terms

Component system architecture: consists of a set of platform decisions, a set of component frameworks, and an interoperation design

Component framework: is a dedicated and focused architecture

Interoperation design: rules of interoperation among all the frameworks joined by the system architecture

Component: a set of simultaneously deployed atomic components

Module: a set of classes and possibly non-object-oriented constructs (procedures, functions, …)

Resource: a “frozen” collection of typed items externalized immutable objects

Page 7: Component architecture

CIn/UFPE

A tiered component architecture

Fundamental notion of traditional software architectureLayer Vs Tier

Component system

Component framework

Component

A multilayer architecture with 3 tiers- components,component frameworks, a component system

Page 8: Component architecture

CIn/UFPE

Components and middleware

Middleware:a set of software that sits between various operating systems and a higher, distributed programming platform Isolated middleware are slowly disappearing

message queuing systems, transactions processor monitors…

Emerging: specialized servers Application servers

Combine application management, data transaction, load balancing, and other functions

Integration servers Combine protocol conversion, data translation, routing, and

other functions All these server categories introduce their own component

framework usually build on top of one of the component platform

Page 9: Component architecture

CIn/UFPE

Components Vs generative programming

Generative programming Go beyond such traditional transformation (fixed

transformer: compilers, JIT compilers) Allows programmer to define new transformer One approach (Czarnecki and Eisenecker - 2000)

C++ templates

In a world of deployable components… Produce individual components

Useful for large components or to produce a large numbers of related components

Enhance composed systems Should not interfere with the unit of deployment characteristic

of components

Page 10: Component architecture

Cin/UFPE

Component Frameworks

Chapter Twenty-oneby Vanilson Burégio

Page 11: Component architecture

CIn/UFPE

Component Frameworks

Definition Software entity that support components conform to

certain standards and allows instances of these components to be “plugged”

Roles Establishes environmental conditions for the component

instances Regulates the interactions between components

Enforce polices

Have taken off in a particular area: Contextual composition

Page 12: Component architecture

CIn/UFPE

Contextual composition

Compositional reasoning (Szabo, 1969) Well-formed Context Elements declare their constraints (properties) on

acceptable context The application of composition operators successively

builds contexts Example:

C |- x:int C|-y:int ________________ C |- (x == y): bool

Higher-order component framework seem necessary and unavoidable

Page 13: Component architecture

CIn/UFPE

Contextual composition

For component software (at the level of component framewoks)

Elements composition: instances created by components composition operators: combines sets of such instances Context: collect sets of instances into domains of

comparable properties

Component Framework: mechanism that supports contextual composition of components

There are various academic roots to the approach of using contextual composition in software

The compositional reasoning can be applied to composition at all level of abstraction or granularity

Page 14: Component architecture

CIn/UFPE

Contextual component Frameworks Vs connectors

Architecture Description Language (ADL) Distinguish components and connectors State which connectors should support

interaction between which components Components

Provide functionality

Connectors Focus on connectivity Deal with aspects and system qualities Substantial complexity

Page 15: Component architecture

CIn/UFPE

Contextual component Frameworks Vs connectors

Pure connection-oriented approach Components are restricted to only interact with other

components if connected appropriately

Contextual component Framework Can then be used to reintroduce the intercepting behavior of

connectors Contexts themselves are not instances of components

Non-generic aspects are provided by parametrizing generic contexts with objects

ADLs Earlly ADLs were restricted to static connectivity Later ADLs added support for dynamic connectivity and

dynamic reconfiguration

Page 16: Component architecture

CIn/UFPE

COM+ contexts

COM Separate objects by threading model

MTS contexts Separate objects by transactional domain

COM + Unified these two notions and also a large

number of new context properties Two objects are in the same domain if they

share a compatible set of context properties

Page 17: Component architecture

CIn/UFPE

COM+ contexts

Example

V

U

W

X

C3

C2C1

Transaction domain

(TxID=42)Load-balancing domain

(RsrcID=7)

Page 18: Component architecture

CIn/UFPE

EJB containers

Provides containers for EJB instances

Allow a class to be attributed to request explicit transaction control Explicit control makes these classes much harder to

compose Enable a easier path when wrapping legacy transaction

Support persistent objects Session Entity

MDB

Page 19: Component architecture

CIn/UFPE

CCM containers

CORBA Component Model Builds on EJB concepts Adds support for process components to the session

and entity EJB components CCM session components => stateful session beans in EJB CCM Service components => stateless session beans in EJB Instances of a process component have persistent state

Page 20: Component architecture

CIn/UFPE

Tuple and object spaces

An approach of contextual composition Based on the concept of an omnipresent data space that can e

used to communicate without explicit addressing

Linda coordination language (1988) Introduced Tuple spaces

Spaces that hold atoms of data called tupes Three operations

Adding a tuple to a space Matching and reading (polling) a tuple in a space Matching and removing a tuple from a space

JavaSpaces java.sun.com/products/javaspaces

Page 21: Component architecture

CIn/UFPE

BlackBox component Framework

Part of the BlackBox component builder, a component-oriented programming environment (Oberon microsystems - 1997)

Focus Visual components

Components for compound-document-based client applications with rich graphical user interface

The framework Consists of a core set of layered modules and a open

set of subsystems

Page 22: Component architecture

CIn/UFPE

BlackBox component Framework

Based in the following patterns and approaches: Carrier-rider-mapper design pattern Directory objects Hierarchical model view separation (HMVC) Container modes Cascade message multicasting services …

Page 23: Component architecture

CIn/UFPE

Portos

A realtime operating system of components New components can be loaded ate runtime

PortosLoader Various configurations ar possible

At least the modules PortosKernel and PortosTasks are required PortosTasks is the central module of Portos JBed - a Java version of Portos Portos IDE

Cross-development environment for developing Portos applications Extension of the BlackBox component builder Adds functionality for transfer of code files and data to and from an

embedded system running Portos