Introduction to OSGi +ActorFrame Surya Bahadur Kathayat

Slides:



Advertisements
Similar presentations
When Applications can Roam Freely OSGi Service Platform R4 Peter Kriens Technical Director OSGi
Advertisements

Universal Middleware Peter Kriens Technical Director OSGi
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 1 OSGi Service Platform Tokyo August 28, 2003 Peter Kriens CEO aQute, OSGi Fellow
AQute Eclipse Environment By Peter Kriens CEO aQute OSGi Director of Technology and OSGi Fellow.
SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content.
OSGi Technology Hsin-Han Yang, Cheng-Yi Chien, Po-Cheng Huang.
Introduce OSGi BlueDavy
CPSC 875 John D. McGregor Architecture evolution.
Component Models and Technologies Case Study: OSGI.
OSGi Remote Services with SCA using Apache Tuscany Raymond Feng
OSGi as a Framework for Building a Product Line: Experience and Best Practices Ruwan Linton & Afkham Azeez
Apache Axis2 - OSGi Integration in WSO2 Carbon Platform
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Eclipse Architecture Dwight Deugo Nesa Matic
OSGi: Open Services Gateway Initiative Richard Chapman 5 Sept
Plug-in Development Dwight Deugo Nesa Matic
Views Dwight Deugo Nesa Matic
1 Plug-in Development Environment (PDE) Guide. 2 Introduction to PDE l What is PDE: »a tool designed to help you develop platform plug-ins while working.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Io package as Java’s basic I/O system continue’d.
OSGi.
1/151/15 ENT Metamodel Implementation & Applications ENT metamodel, prototype implementation Component substitutability checking, ENT based component comparison.
Introduction to the Atlas Platform Mobile & Pervasive Computing Laboratory Department of Computer and Information Sciences and Engineering University of.
Choon Oh Lee OSGi Service Platform. About OSGi Service Platform What it is, Where it is used, What features it provides are Today’s Content.
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics NPRG044: OSGi framework Michal Malohlava & Pavel Parízek
TDDD05 EJB Lab (Part of slides reused from Mikhail’s) Lu Li
CS 584 Lecture 18 l Assignment » Glenda assignment extended to the Java RMI Deadline » No Java RMI Assignment l Test » Friday, Saturday, Monday.
OSGi & UPnP Technology 2009 Summer Ya-Lin Huang. 2 Outline What is OSGi Technology Introduction Alliance Specifications Key Benefits OSGi Framework Service.
Review: OSGi – a component framework for Java Bundle OSGi Framework Bundle Java Runtime Environment (JRE) Operating System (OS) Hardware “Dynamic Modules.
Android for Java Developers Denver Java Users Group Jan 11, Mike
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
CIS 644 Aug. 25, 1999 tour of Java. First … about the media lectures… we are experimenting with the media format please give feedback.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
OSGi Enablement for Tuscany Raymond Feng. Overview.
CPSC 875 John D. McGregor What do you do first?/ Architecture evolution.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
OSGi in action BlueDavy
In Pieces Breaking down monolithic applications with Spring-DM and OSGi.
Migrating Desktop The graphical framework for running grid applications Bartek Palak Poznan Supercomputing and Networking Center The.
OSGi Service Platform Open Service Gateway initiative.
Webservice versioning using osgi Allard Buijze, Jettro Coenradie.
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
IBM TSpaces Lab 1 Introduction. Summary TSpaces Overview Basic Definitions Basic primitive operations Reading/writing tuples in tuplespace HelloWorld.
Sameera Jayasoma 18 th July, 2009 Senior Software Engineer Introduction to OSGi The Dynamic Module System for Java.
© 2002, Youngjoon Choi, RESL, Inha University Page : 1 Open Services Gateway initiative OSGi Open Services Gateway Initiative Youngjoon Choi © Realtime.
ICT Strategy Intelligent Highways: Endpoint Adapters.
Components Components are specialized self contained Software entities that can be replicated, Customized and inserted into applications. Components come.
CPSC 875 John D. McGregor Architecture evolution.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Slide 1 ApacheCon 2011 > Doreen Seider> Using OSGi to Build Better Software > Using OSGi to Build Better Software Lessons from a Telemedicine.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
Maven, Eclipse and OSGi working together Carlos Sanchez March 17, 2008.
Jan Hatje, DESY CSS GSI Feb. 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
CPSC 875 John D. McGregor C22 - Architecture evolution.
Intro to the Atlas Platform Raja Bose Dr. Abdelsalam (Sumi) Helal January 23, 2007.
ECLIPSE RICH CLIENT PLATFORM Part 1 Introduction.
From “Hello World” to Real World : Building web apps with Spring OSGi Craig Walls The Spring Experience 2007 December 12, 2007.
OSGi: The Lifecycle Layer. The Extender Pattern
Overall Architecture and Component Model
Application Development using Atlas Platform Sensor Network
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Presentation transcript:

Introduction to OSGi +ActorFrame Surya Bahadur Kathayat

Presentation includes What is the OSGi service platform? Why the OSGi service platform? ActorFrame and OSGi Some hands on exercise

What is the OSGi service platform? Java based service platform that can be remotely managed Applications and components (coming in the form of bundles for deployment) can be remotely installed, started, stopped, updated and uninstalled without requiring a reboot

OSGi Framework 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. Ref:

Why the OSGi service platform? Components are smaller  Easier to make Components are not coupled to other components  Gives reusability Excellent model for the myriad of customizations and variation that are required of today’s devices Collaborative model  Allows reuse of other components for most problems More on -

ActorFrame and OSGi Core component is the ActorRouter bundle  contains forward table – info about in which bundle (visible) actor is running  carries messages between the actors running on different java containers  actors send actor messages to each other

Hands on.. OSGi Bundle  How to create simple service OSGi bundle?  How to create OSGi bundle with Ramses?  You will need Java, ActorFrame, Ramses, Eclipse, Knopflerfish OSGi

Creating and testing simple OSGi bundle Install Ramses plugin for eclipse 3.4 (classical version)  Update site: Import org.isisproject.actorframeosgi project in eclipse: New|Other|Examples|Import ActorFrrame OSGi Libraries from Tellu Create java project – lets name it ExampleBundle Add org.isisproject.actorframeosgi project in the Build path of ExampleBundle project (or alternatively add framework.jar in the build path) Create src/META-INF/MANIFEST.MF file in the ExampleBundle project Create Activator.java, and test java class say HelloWorld.java in the src/ folder Export the src as a java jar in eclipse chosing created manifest file Thats all.....test it dragging it to the knopflerfish OSGi console More on

Java Files package no.ntnu.item.examplebundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Activator implements BundleActivator { public static BundleContext bc = null; private HelloWorld thread = null; public void start(BundleContext bc) throws Exception { System.out.println("SimpleBundle starting..."); Activator.bc = bc; this.thread = new HelloWorld(); this.thread.start(); } public void stop(BundleContext bc) throws Exception { System.out.println("SimpleBundle stopping..."); this.thread.stopThread(); this.thread.join(); Activator.bc = null; } } package no.ntnu.item.examplebundle; public class HelloWorld extends Thread { private boolean running = true; public HelloWorld() { } public void run() { while (running) { System.out.println("Hello World!"); try { Thread.sleep(5000); } catch (InterruptedException e) { System.out.println("HelloWorld ERROR: " + e); } public void stopThread() { this.running = false; } No services/application implemented yet Threading just for some debugging

Manifest File Manifest-Version: 1.0 Bundle-Description: Bundle-Name: Example Bundle-Classpath:. Bundle-Activator: no.ntnu.item.examplebundle.A ctivator Import-Package: org.osgi.framework Bundle-ManifestVersion: 2 Bundle-Vendor: NTNU Bundle-SymbolicName: MyExampleBundle Bundle-Version: 1.0.1

Lets see..

Creating a simple Service Create service interface and service implementation Register the service from the start method in Activator class Add service package to Export-Package property in the MANIFEST file, in order to make your service accessible to other services Export as a java jar bundle and deploy

Lets see..

Creating a simple Service client Get the service reference from the start method in Activator class Add service package to Import-Package property in the MANIFEST file, in order to declare that your service need to have access ot this package Export as a java jar bundle and deploy

Lets see..

OSGi Bundles with ActorFrame/Ramses Create Java Project and extend it to Ramses Project type Design your services/actors – UML model Generate code and create OSGi bundle – just with one click