15
SelfCon Foil no 1 Dynamic component systems 1

SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

Embed Size (px)

Citation preview

Page 1: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 1

Dynamic component systems 1

Page 2: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 2

Pre-structured systems vs. dynamic component systems

• Pre-structured – emphasis on content constraints defining the part structure and the part types: compositional adaptation bounded by the structure

• Dynamic component systems – emphasis on context constraints that govern how components may be composed (without prescribing a particular structure): compositional adaptation bounded by the components

• Pre-structured – emphasis on content constraints defining the part structure and the part types: compositional adaptation bounded by the structure

• Dynamic component systems – emphasis on context constraints that govern how components may be composed (without prescribing a particular structure): compositional adaptation bounded by the components

Context constraints (interface definitions)

are key to dynamic component systems,

Page 3: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 3

Foundation 1: Components with well defined interfaces

• Components bind to other components having complementary interfaces, sometimes called services - how to find and bind?

• Different components may have the same interface (service) – how to distinguish?

• Interfaces can be static and dynamic (with behaviour) – how to define?

• Components bind to other components having complementary interfaces, sometimes called services - how to find and bind?

• Different components may have the same interface (service) – how to distinguish?

• Interfaces can be static and dynamic (with behaviour) – how to define?

C1C1

s3s3

C2C2s4s4

C3C3

s1s1

s1s1

s2s2

s2s2

s4s4

Page 4: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 4

Foundation 2: Registry for find-bind

• Registry has known address

• Registry has known interface

• Registry matches services (interfaces) offered and service requests

• How to represent components and services (interfaces)?

• What to find-bind: particular instances, any instance, ...?

• Registry has known address

• Registry has known interface

• Registry matches services (interfaces) offered and service requests

• How to represent components and services (interfaces)?

• What to find-bind: particular instances, any instance, ...?

C1C1

s3s3

C2C2s4s4

C3C3

s1s1

s1s1

s2s2

s2s2

s4s4

RegReg

C1: s1; s2; s3;C1: s1; s2; s3;

C2: s4;C2: s4;

C3: s3;s2;s4C3: s3;s2;s4

regreg regreg

regreg

Page 5: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 5

Foundation 3: communication

and Life cycle support

C1C1

s3s3

C2C2s4s4

C3C3

s1s1

s1s1

s2s2s2s2

s4s4

RegReg

C1: s1; s2; s3;C1: s1; s2; s3;

C2: s4;C2: s4;

C3: s3;s2;s4C3: s3;s2;s4

regreg regreg

regreg

Communication: addressing; routingCommunication: addressing; routing

Life cycle support: Install, uninstall, start, stop, update, ....Life cycle support: Install, uninstall, start, stop, update, ....

lcslcs

comcom

comcomcomcom

lcslcs

lcslcs

Page 6: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 6

Foundation 4: component model

• Application services

• Support services

• Some support services may be provided as components

• Application services

• Support services

• Some support services may be provided as components

C3 supportC3 support

s1s1

s2s2

s4s4regreg

comcomlcslcs

C3 appC3 app

Page 7: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 7

Support Scopes• Global

Internet technologies: SOA, UPnP, SLP, ...Local area networks technologies: Havi, Bluetooth, Zigbee, ...

• Local (PC): Operating system: Plug and Play for applications and devices: iOS, Windows, ...Java VM: OSGi

• Global Internet technologies: SOA, UPnP, SLP, ...Local area networks technologies: Havi, Bluetooth, Zigbee, ...

• Local (PC): Operating system: Plug and Play for applications and devices: iOS, Windows, ...Java VM: OSGi

C3 globalC3 global

s1s1

s2s2

s4s4globalregglobalreg

localcomlocalcomlcslcs

C3 appC3 app

C3 localC3 localglobalcomglobalcom

localreglocalreg

Page 8: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 8

Global case: Service Oriented Architecture

• SOA is an architectural style that encourages the creation of loosely coupled business services. Loosely coupled services that are interoperable and technology-agnostic enable business flexibility

• A SOA solution consists of a composite set of business services that realize an end-to-end business process

• Each service provides an interface-based service description to support flexible and dynamically re-configurable processes

[John Reynolds],

• see:

http://weblogs.java.net/blog/johnreynolds/archive/2005/01/the_soa_elevato.html

http://en.wikipedia.org/wiki/Service-oriented_architecture

• SOA is an architectural style that encourages the creation of loosely coupled business services. Loosely coupled services that are interoperable and technology-agnostic enable business flexibility

• A SOA solution consists of a composite set of business services that realize an end-to-end business process

• Each service provides an interface-based service description to support flexible and dynamically re-configurable processes

[John Reynolds],

• see:

http://weblogs.java.net/blog/johnreynolds/archive/2005/01/the_soa_elevato.html

http://en.wikipedia.org/wiki/Service-oriented_architecture

Page 9: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 9

SOA – Registration, find, bind of service providers

• The Service Provider makes the service available with its Service Contract and advertise it on the Service Broker

• The Service Consumer find the compatible Service and its Service Contract using the Service Broker:

Find providers for given service

• The Service Consumer and the Service Provider interact.

• The Service Provider makes the service available with its Service Contract and advertise it on the Service Broker

• The Service Consumer find the compatible Service and its Service Contract using the Service Broker:

Find providers for given service

• The Service Consumer and the Service Provider interact.

Give some SOA examples

Page 10: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 10

SOA points

•SOA isn’t really new, but there are now some standard technologies (such as Web Services) that make it much easier to implement

•The “Services” in SOA are business services… updating a loan application is a business service, updating a record in a database isn’t

•Services are linked together to implement business processes... Business Process Engines make it easier to combine services into business processes, and BPEL is an emerging standard language for this purpose

•Business partners can use your company's services within their own business processes and your company can use services provided by business partners within your own business processes.

•SOA solutions favor flexibility over efficiency... machine cycles and network traffic are less important than being able to quickly implement and change business processes

•SOA isn’t really new, but there are now some standard technologies (such as Web Services) that make it much easier to implement

•The “Services” in SOA are business services… updating a loan application is a business service, updating a record in a database isn’t

•Services are linked together to implement business processes... Business Process Engines make it easier to combine services into business processes, and BPEL is an emerging standard language for this purpose

•Business partners can use your company's services within their own business processes and your company can use services provided by business partners within your own business processes.

•SOA solutions favor flexibility over efficiency... machine cycles and network traffic are less important than being able to quickly implement and change business processes

Page 11: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 11

Local case: OSGi

See: http://www.osgi.org/Technology/HomePage

• Bundles - Bundles are the OSGi components made by the developers.

• Services - The services layer connects bundles in a dynamic way by offering a publish-find-bind model for plain old Java objects.

• Life-Cycle - The API to install, start, stop, update, and uninstall bundles.

• Modules - The layer that defines how a bundle can import and export code.

• Security - The layer that handles the security aspects.

• Execution Environment - Defines what methods and classes are available in a specific platform.

See: http://www.osgi.org/Technology/HomePage

• Bundles - Bundles are the OSGi components made by the developers.

• Services - The services layer connects bundles in a dynamic way by offering a publish-find-bind model for plain old Java objects.

• Life-Cycle - The API to install, start, stop, update, and uninstall bundles.

• Modules - The layer that defines how a bundle can import and export code.

• Security - The layer that handles the security aspects.

• Execution Environment - Defines what methods and classes are available in a specific platform.

Page 12: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 12

OSGi Services

• Services are the component (bundle) interfaces

• There are several types of service: Blueprint, Declarative, POJO, ...

• There is a registry for lookup and binding

• Services are the component (bundle) interfaces

• There are several types of service: Blueprint, Declarative, POJO, ...

• There is a registry for lookup and binding

Bundle states:

Page 13: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 13

Find-bind sequence for Declarative Services

Page 14: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 14

• Fire and burglar alarms

• Climate control: heating and cooling

• Power control: minimize power costs

• Smart metering (AMS)

• Access control

• Assisted living (well-fare technology)

• Entertainment

• Cooking

• Lighting

• Etc.

• Fire and burglar alarms

• Climate control: heating and cooling

• Power control: minimize power costs

• Smart metering (AMS)

• Access control

• Assisted living (well-fare technology)

• Entertainment

• Cooking

• Lighting

• Etc.

Now let us look at the HNS system again

Page 15: SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content

SelfConFoil no 15

We want as much self adaptation

as possible – how?• Every device is networked!

• We want to plug in and out devices: heaters, alarm sensors, panels, power meters, appliances, weather stations, ...

• We want to connect devices with service providing applications

• We want to (buy and) install applications

• We want to access external resources and to have remote access

• Every device is networked!

• We want to plug in and out devices: heaters, alarm sensors, panels, power meters, appliances, weather stations, ...

• We want to connect devices with service providing applications

• We want to (buy and) install applications

• We want to access external resources and to have remote access