150 likes | 271 Views
Dynamic component systems 1. 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
E N D
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 Context constraints (interface definitions) are key to dynamic component systems,
Foundation 1: Components with well defined interfaces • Components bind to other components having complementaryinterfaces, 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? s1 s2 C3 C1 s2 s1 s3 s4 C2 s4
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, ...? Reg s1 s2 C3 reg C1 s2 reg C1: s1; s2; s3; s1 s3 s4 C2: s4; C2 s4 reg C3: s3;s2;s4
Foundation 3: communication and Life cycle support Life cycle support: Install, uninstall, start, stop, update, .... lcs lcs Reg s1 s2 C3 C1 reg s2 reg C1: s1; s2; s3; s1 s3 lcs com com s4 C2: s4; C2 s4 reg C3: s3;s2;s4 com Communication: addressing; routing
Foundation 4: component model • Application services • Support services • Some support services may be provided as components s2 C3 app s1 s4 C3 support reg lcs com
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 s2 C3 app s1 globalreg s4 C3 global globalcom C3 local localcom lcs localreg
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 – 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. Give some SOA examples
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
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.
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 Bundle states:
Now let us look at the HNS system again • 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.
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