cbse in the context of real-time systemscs00pe/epl603/lectures/lect17_vaidasgiedrimas.pdfcbse in the...

Post on 18-Jan-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CBSE in the context of real-time systems

vaigie@mi.su.lt 1

Dr. Vaidas GIEDRIMAS Siauliai University

Lithuania

Outline

l The definition of component and CBSE

l Distributed component systems l Real-time component

systems

2

What is a software component ?

l  (It is) Component or not component? That is the question!

Hamlet

3

Components

l  Components provide a service without regard to where the component is executing or its programming language l  A component is an independent

executable entity that can be made up of one or more executable objects;

l  The component interface is published and all interactions are through the published interface;

I.Sommerville Software Engineering 2008 4

Component Replacement

l  Objects are only partially replaceable.

l  Components must implement interfaces. l  You can upgrade (add features) but don’t change l  Use versioning system or support old interfaces

l  When components only talk via interfaces, you can upgrade/enhance with lower risk.

http://www.howardism.org/geekin 5

Object Replacement

l  Replacing objects means editing all references

§  System Testing Critical •  Forgotten references

http://www.howardism.org/geekin 6

Component Replacement

l  Each component only talks to another unit via an interface.

l  Components can be safely replaced by unit testing the component’s interface

l  System testing is now less critical

http://www.howardism.org/geekin 7

8

The CBSE process

l Development of Components l Development of Component-based

systems

Development of Component-based systems

9

Outline

l  The definition of component and CBSE l Distributed component systems l Real-time

component systems

10

Outline

l  The definition of component and CBSE l Distributed component systems l Real-time

component systems

11

12

Types of Components-servers

Computer (-ers)

File

Internal server

The same The same

Local server

The same Separate (*.exe, *dll, ...)

Remote server

Separate Separate

Distributed systems

l Types of distributed systems l The role of middleware l Marshalling

13

Component framework/ Middleware

Middleware (e.g. ORB, .NET Framework,…)

Component-server Client

Imaginable server

Imaginable client

14

(Very old) Case-study: COM & DCOM

DCOM

15

Distributed systems

l Types of distributed systems l The role of middleware l Marshalling

16

Connection via sinks

Client Server

StackBuilderSink

Object on server

Formatter Sink

Custom Sinks Custom Sinks Custom Sinks

Transport Sink

Proxy

ClinetObject

Formatter Sink

Custom Sinks Custom Sinks Custom Sinks

Transport Sink

17

Marshaling

l Marshal by Value l Marshal by Reference

18

Marshal by Value

l  Objects are “packed” l The copy of object is sended to the

clinet l  Copy and original are not related and

exist independently each other.

19

Marshal by Reference

l  Object’s address is “packed” only. l  Only this address is sended to the

client l Client uses the same object as

server (but via Proxy)

20

How to save the state of object ?

l  Persistance l The ability to prolong object “lifetime”.

l Serialization l Object is packed and saved in the file,

memory etc. l Object is created and their state is

settet using package

21

.NET Serialization example

l By Default objects are not serializable l To make objects are not serializable you

should use Attribute: [Serializable] Public class MyClass { ... }

22

.NET Serialization example (2)

using System.Runtime.Serialization.Formatters.Binary;

Class1 o1 = new Class1(); Stream st; st= new FileStream(@”C:\tmp\file.dat”, FileMode.Create, FileAccess.Write);

IFormatter frm = new BinaryFormatter(); frm.Serialize(st, o1); st.close

23

.NET Serialization example (3) using System.Runtime.Serialization.Formatters.Binary;

Class1 o1; // new not used! Stream st; st= new FileStream(@”C:\tmp\failas.dat”, FileMode.Open, FileAccess.Read);

IFormatter frm = new BinaryFormatter(); o1 = (Class1)frm.Deserialize(st); st.close

24

Outline

l  The definition of component and CBSE l  Distributed component systems l Real-time component

systems

25

Real-time component-based systems

l What are the differences? l Examples l Main issues and problems

26

Singularities of the CBRT systems

l Many (but not all!) RT systems are embedded systems too.

l The device is too small to fit the full-featured middleware l  Some modifications of CORBA or J2ME are

used l  Particular middleware is designed

l The concept of component is different!

27

Levels of abstraction of Software components

l Component specification l Component implementation l Component deployment l Component object

l RT component sometimes is semi-hardware component!

28

Singularities of the CBRT systems (2)

l  In common cases only the reuse is possible only within particular enterprise. l  There is no wide market of RT components l  The generators of components are used.

l The question of component trust and quality is extremely important.

29

Real-time component-based systems

l What are the differences? l Examples l Main issues and problems

30

Examples of RTE component-based systems

l CoSMIC l MoDES

l  COMDES l UPPAAL PORT

31

CoSMIC

l Component Synthesis using Model Integrated Computing

l Generative approach to wrap legacy systems and to create new ones.

l CIAO™ (Component Integrated ACE ORB) middleware

l The Adaptive Communication Environment ACE™

Schmidt, D.C. et al. (2002). CoSMIC: an MDA Generative tool for Distributed Real-time and Embedded Component Middleware and Applications. 32

CoSMIC

http://www.cs.wustl.edu/~schmidt/PDF/MDA4DRE.pdf 33

CoSMIC

Schmidt, D.C. et al. (2002). CoSMIC: an MDA Generative tool for Distributed Real-time and Embedded Component Middleware and Applications. 34

MoDES

l Model driven development of Inteligent embedded systems

l The approach of the A.Ravn’s group

l Realted with: l  ARTIST (Advanced Real Time Systems) l  COMDES

35 http://modes.cs.aau.dk

MoDES

36 http://modes.cs.aau.dk

COMDES

l The goal of the system is the rapid modeling and validation of control software at a higher level of abstraction.

l  It defines formally various kinds of components to address the critical requirements of the targeted domain, taking into account the architectural and behavioral aspects of the system.

37 Xu Ke et al. (2007) COMDES-II: A Component-Based Framework for

Generative Development of Distributed Real-Time Control Systems

COMDES

l The goal of the system is the rapid modeling and validation of control software at a higher level of abstraction.

l  It defines formally various kinds of components to address the critical requirements of the targeted domain, taking into account the architectural and behavioral aspects of the system.

38 Xu Ke et al. (2007) COMDES-II: A Component-Based Framework for

Generative Development of Distributed Real-Time Control Systems

COMDES

39 Xu Ke et al. (2007) COMDES-II: A Component-Based Framework for

Generative Development of Distributed Real-Time Control Systems

ARTIST

This project is leading-edge research in embedded systems design issues in the Joint Programme of Research Activities (JPRA), and complementary activities around shared platforms and staff mobility in the Joint Programme of Integration Activities (JPIA).

40 http://www.artist-embedded.org/artist/Strategic-Objectives,188.html

UPPAAL

l  Integrated tool environment for modeling, validation and verification of real-time systems modeled as networks of timed automata, extended with data types

41 http://www.uppaal.org/

UPPAAL PORT

l The tool for component-based modelling, simulation, and verification of real-time and embedded systems modelled as real-time components.

l Can be used together with the particular Eclipse plugin –SAVE integrated Development Enviroment (IDE).

42 http://www.it.uu.se/research/group/darts/uppaal/port/

UPPAAL PORT

43 http://www.it.uu.se/research/group/darts/uppaal/port/

Why the CORBA/CCM ?

l  In many cases the implementations of CORBA/CCM are used: l  CIAO l  SaveCCM

l Why not .NET, J2ME or other?

44

Real-time component-based systems

l What are the differences? l Examples l Main issues and problems

45

CBSE problems: Interface incompatibility

l Parameter incompatibility l  operations have the same name but are of

different types. l Operation incompatibility

l  the names of operations in the composed interfaces are different.

l Operation incompleteness l  where the provided interface of one

component is a subset of the required interface of another.

I.Som

mer

ville

Sof

twar

e E

ngin

eerin

g 20

08

46

Component identification issues

l  Trust. l  You need to be able to trust the supplier of a

component. In the best case, an untrusted component may not operate as advertised; in the worst case it can breach your security.

l  Requirements. l  Different groups of components will satisfy different

requirements. l  Validation.

l  The component specification may not be detailed enough to allow comprehensive tests to be developed.

l  Components may have unwanted functionality. How can you test this will not interfere with your application?

I.Sommerville Software Engineering 2008 47

CBSE problems (2)

l Component trustworthiness l  how can a component with no available

source code be trusted? l QoS guarantees

l  who can give guarantees that component will finish on time? l  e.g United States Patent Application

20090262119

l Component certification l  who will certify the quality of components?

48

CBSE problems (3)

l Emergent property prediction l  how can the emergent properties of

component compositions be predicted? l Requirements trade-offs

l  how do we do trade-off analysis between the features of one component and another?

I.Sommerville Software Engineering 2008 49

Main references

l  I.Sommerville Software Engineering 2008

l G.T. Heineman, W.T. Council Component-based software enginering:putting the pieces together 2001

50

Main references (2)

l  C.Szyperski Component Software: Beyond Object-Oriented Programming (2nd Ed.) 2002

l  I. Crnkovic, M. Larsson Building Reliable Component-Based Software Systems 2002

51

Main references (3)

l J.Lowy Programming .NET components 2nd Ed. 2005

52

CBSE in the context of real-time systems

vaigie@mi.su.lt 53

Dr. Vaidas GIEDRIMAS Siauliai University

Lithuania

top related