AQute Inside OSGi By Peter Kriens CEO aQute OSGi Technology Officer and OSGi Fellow.
Analysis & Design Method for OSGi-based Development
-
Upload
harisfazillah-jamel -
Category
Technology
-
view
2.642 -
download
0
description
Transcript of Analysis & Design Method for OSGi-based Development
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
Azrinsyah Mirza Asfian, Engineer at MIMOS Berhad
Analysis and Design Method for OSGi-based Development
• Introduction• Service-Oriented Programming and OSGi• Object-Oriented Analysis and Design Method• The Proposed Method
– Analysis and Design Method– Example– Applying the Analysis and Design Method to the Case Study
• Conclusions and Discussions
Agenda
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• OSGi – Open Services Gateway Initiative – technology defined and promoted by the OSGi Alliance– open specifications for network delivery of managed services to
local networks and devices.• Service-orientation and component-orientation
– requirements of having a new analysis and design approach– existing OOAD methodologies e.g. Booch, OMT and UML could
not be applied directly• Proposes an analysis and design method for OSGi-based
development
Introduction
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Utilizes services as fundamental elements• In OO, objects are building blocks while in SO, services
are its foundation blocks• A service embedded in some component
– accepts one or more requests and returns one or more responses
• Different from traditional methods, e.g. OO or structural• Remarkable traits
– Dynamism– Substitutability
• Discover and substitute at run-time• Focuses on how services are described and organized of
appropriate services at run-time
Service-Oriented Programming
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
Service-Oriented Interaction Pattern
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• OOP– problems can be modeled in terms of objects in the problem
domain• SOP
– problems can be modeled in terms of services which can be implemented and provided by any other components, based solely on the contract
• SOA– can discover, substitute and co-ordinate service
implementations at run-time – because components publish and use services in a P2P manner
Service-Oriented Programming (cont.)
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Fosters code reuse • Rapid and dynamic system construction• System upgrade without restarting and • Independence from platforms, protocols and deployment
environments
Contributions of Service-Oriented Programming
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Follows concept of SOP • OSGi spec defines the service framework
– minimal component model – management service for the components– service registry– Initially used for service gateways– now, mainstream software devt e.g. Eclipse subproject called
Equinox• Services (i.e., Java interfaces)
– packaged along with implementations and associated resources into bundles
– conforms to SO interaction pattern– deployed into the OSGi framework via WANs i.e., the Internet or
other means e.g. GSM or memory cards.
OSGi Concepts
© 2008 MIMOS Berhad. All Rights Reserved.
• Bundle is a Java JAR file that contains– physical unit of deployment– can be modified and updated without requiring system to be
restarted– some combination of Java class files – native code– associated resources– manifest - meta-data describing, Java packages that the bundle
requires or provides• Other competing SO architectures are NetBeans module
and Java Plugin Framework
OSGi Concepts
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Steps available in both Booch and OMT:1. Develop a problem statement2. Identify the classes and objects3. Identify the semantics (or attributes) of these classes and
objects4. Identify the relationships among these classes and objects5. Specify the interface and then the implementation of these
classes and objects
General Object-Oriented Analysis and Design (OOAD) Method
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• An improvement over existing OOAD methods. • Additional steps added:
– Extract or reuse existing OSGi services and components (or bundles) based on their versions
– Determine dependencies between services– Depict dynamic view of the system using service dependencies
diagram
The Proposed Method
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• The resulting steps:1. Develop a problem statement2. Identify the services based on their intended responsibilities3. Identify relationships between services during runtime.4. Identify bundles that encapsulate a service (or services)5. Identify classes and objects that make up a particular service
and bundle6. Identify the semantics (or attributes) of these classes and
objects7. Identify the relationships among these classes and objects8. Specify the interface and then the implementation of these
classes and objects
Analysis and Design Method
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Illustrate how to translate software requirements into design using OSGi
• The requirements associated with this software:– System must be able to display all users available– When a user is selected, system must open a screen that
displays details of the user.– All user information must be stored inside a centralized
database.– System resides on a client computer which is remote from server
that stores all the user information.
Example
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
Applying the Analysis and Design Method – Overall System Architectural Diagram
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Step 2 of the method is applied to the requirement specifications
• Services identified:– Profile Persistence Service: Responsible in making used of Java
persistence classes to perform Read operation on profile of users residing in centralized database
– User Detail Screen Service: Provides a screen to open detail of a selected user
– Main Screen Service: Shows the screen of main application– Table Screen Service: Provides table screen service
Applying the Analysis and Design Method – Step 2
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
Applying the Analysis and Design Method – Step 3, Service Dependencies Diagram
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Applying step 4 – results in each of the services to be in their respective bundles – need not to depict this– in complex systems where a bundle can provide more than one
services, it is necessary to have a diagram on its own• Step 5 onwards will not be discussed here
– same steps likewise OOAD methods– design patterns can be applied to further promote reusability
within a bundle
Applying the Analysis and Design Method – Step 4 and Step 5
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Suggested approach or step-by-step guidelines to build software systems utilizing OSGi
• Weaknesses of this method are:– No formal notation defined to depict relationships between
services during runtime– System architectural diagram must be depicted upfront– Identification and decompositions of services largely depends on
skills and experience• A trend moving towards MDA and MDD is currently
underway by OMG • In the future, this method can be improved to follow
such a trend
Conclusions and Discussions
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
THANK YOU
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• In 1990s OO paradigm became popular– OO languages have been the preferred programming language– OO paradigm has introduced attributes which solve issues in
structured paradigm• OOAD method
– invented, likewise the structured analysis and design method is for structured paradigm
– step-by-step guidelines for architects and developers on designing and developing their applications
– popular methods e.g. Booch, Object Modeling Technique (OMT) and the Unified Modeling Language (UML)
Object-Oriented Analysis and Design (OOAD) Method
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Analysis and design of OO systems only• Resulting design is usually monolithic• Invented in 1990s where service-oriented and
component-oriented paradigm was not common• An improved version of OOAD method is required• Do not cater for dynamism
– service required or depended on by another service becomes unavailable
– all components must be made available for the dependent components to be able to run or use
– in SO, requires handling of unavailable service to be clearly specified during analysis and design phase
OOAD Issues
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• UML does not provide formal notations to depict services• Structural view
– bundle diagram that shows relationships and dependencies against other bundles
– class diagram can still be used to illustrate classes within a package in a bundle
• Dynamic view – OSGi bundle together with services that it offers to other
services residing in other bundles– ensure that system being designed has all required services to
be resolved and available during runtime
OOAD Issues (cont.)
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• OSGi attributes– possibility that different versions of same package providing a
service to be made available– different versions of this package might be providing same
service with different behaviours– Different parts of system might be using different versions of
same package• Dynamic view of entire system is depicted by service
dependencies diagram• Version of a service must be specified so that dependent
services can be connected• Reactive approach in system development do exists
OOAD Issues (cont.)
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.
• Booch and OMT clearly specify the steps required to be taken when converting system requirements into a software design
• UML– does not specify the exact method– only specify the notations and type of diagrams available to
provide different architectural views of a software system– designed to be compatible with those methods– methods have been recast to take advantage of the new
notations available
OOAD Method (cont.)
www.mimos.my © 2008 MIMOS Berhad. All Rights Reserved.