OSGi Web Development in Action
-
Upload
christian-baranowski -
Category
Technology
-
view
1.139 -
download
3
Transcript of OSGi Web Development in Action
OSGi Web Development in ActionChristian Baranowski, SEITENBAU Gmbh
Event 2014
Welcome• Christian Baranowski • Software Developer @ SEITENBAU
• Software Engineering • Custom Software Solutions • E-Government Solutions • Identity Management and SSO Solutions • www.seitenbau.de
BndtoolsEasy, powerful and productive way to develop OSGi applications. Based on bnd and Eclipse.
http://bndtools.org/
enRoute Blog
• OSGi demo project by Peter Kriens https://github.com/osgi/osgi.enroute.blog/
• Step by step tutorial from Peter Kriens https://github.com/osgi/osgi.enroute.blog/blob/master/OSGi-enRoute-blog.pdf?raw=true
• Last OSGi Code Camp was based on this tutorial
Simple Web App
aQute!webserver
HTTPService
Apache Felix HTTP osgi.simple.webapp
Extender����������� ������������������ static/*
aQute!Configurer
Apache Felix!Config Admin
Configuration����������� ������������������ Admin
Extender����������� ������������������ configuration/configuration.json����������� ������������������
X-Rays for OSGiSimple way to debug Services and Dynamic.
http://softwaresimplexity.blogspot.de/2012/05/x-rays-for-osgi.html
Static Web Bundles
aQute!webserver
osgi.simple.webapp
Extender����������� ������������������ static/*
com.google.angularjs
com.twitter.bootstrap
REST Todo Resource (Client)var todoApp = angular.module( 'todoApp', ['ngResource']);
!todoApp.factory( 'todoResource', ['$resource', function($resource) {
return $resource( '/rest/todos/:todoId', { todoId: '@todoId' }, {
archive: {
url: '/rest/archive',
method: 'DELETE',
params: {todoIds: '@todoIds'}
}
});
}]);
http://angularjs.org
REST Todo Resource
osgi.simple.webapp
ResourceManagerHTTPService
Apache Felix HTTP
aQute!rest.srv
Whiteboard����������� ������������������ Pattern
REST Todo Resource (Server)
More Bundles
ResourceManagerHTTPService
Apache Felix HTTP
aQute!rest.srv
Whiteboard����������� ������������������ Pattern
osgi.simple.webapp.staticaQute!webserver
Extender����������� ������������������ static/*
osgi.simple.webapp.domain
osgi.simple.webapp.rest
Bnd Command Line• bnd package web app.bndrun
• bnd run webapp.bndrun
• …
Deploy into Servlet Container
Servlet Container (e.g. Jetty or Tomcat)
8080
HTTP
simple.war
OSGi Framework (e.g. Felix)
http.bridge
ResourceManager
HTTPService
aQute!rest.srv
ProxyServlet
osgi.simple.webapp
More…
• More about simple OSGi based Web development see Peter Kriens enRoute Blog https://github.com/osgi/osgi.enroute.blog/
Testing OSGi Services
JPA and OSGi Web Apps
…
Feedback@tux2323