Presenting OSGi to RiveriaJug
Saturday, May 29th, 2010I’ve been presenting yesterday to RivieriaJug some slides doing an OSGi overview. I’m sharing them here.
I’ve been presenting yesterday to RivieriaJug some slides doing an OSGi overview. I’m sharing them here.
Actually it does matter. It is just not always the right moment to optimize your code. There are several patterns applied properly at the start of most project helping you worrying about performance at a later stage. Obviously this won’t help if you need to do highly CPU demanding processing (neuronal network, nuclear bomb simulation, …).
First, some brief overview of the two technologies. OSGi is a framework aims to create an component/plug-in software. I’ve already mention OSGi in a previous post.
SCA stand for Service Component Architecture. Oracle, IBM and others came up with the conclusion than SOA is just a buzz word and without a plain framework, everyone can say they do SOA development but actually doing something else … They have created several specifications to help to produce a SOA software. Key features are separation of concern, component oriented, dynamic binding, aggregation/composition of services/components.
C++0x is the standard which describe the new C++ language specification. It’s still draft. The main focus of the C++ committee is the development of the core libraries. In the language itself, the committee will introduce lambda functions (like Clojure, scala, groovy, ruby, php, …), nullptr variable (interpreted as a pointer whereas today NULL is a defined integer most of the times, it depends on the compiler) and few other minor changes.
Both Visual Studio 2010 and gcc brings support C++0x with their latest versions. I’m very curious myself to test lambda functions. For those of you who want to try them, you will find here the 2 tables describing which features each of the compiler comply with.
Visual Studio 2010 : http://blogs.msdn.com/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx
Gcc 4.5 : http://gcc.gnu.org/gcc-4.5/cxx0x_status.html
It’s obviously too early to use it for production development, but worth spend some times to test these new “features”.
Java, as a mainstream programming language evolves to always trying to fit the latest needs. One big leap has been introduced in Java 5, with several language changes. One of them was the possibility to do some meta-programming. Big word isn’t it? Indeed, meta-programming.
In Object Oriented Language like Java, you will usually construct your software using object (cars, tires, engines …) and methods (move, turn, explode …) to describe your business into something computer will understand. Sound simple right?, in theory, this is pretty simple. Things become difficult when we need to save data, display things to a screen, connect to the network. Software engineer has invented APIs (Application Programming Interface) to help application developer to interact with 3rdParty libraries in general and display, network or system libraries in particular.
This is when our code start to be un-maintainable because we mix business code (cars, tires, engines) with technical plumbing (readfile, display, connect).
Obviously, this title is a little provocative and there is a lot of shortcut
. I am myself doing architecture and software development, and I have a recurrent rhetorical question tickling in my head; where should a
particular artifact be built.
Indeed, a common pattern in software development is too find the right boundaries, the right frontier, the right position, the right size:
Buzz word, we are all talking buzz word, SSO is one of them. What is Single Sign-On by the way?
A brief description would say that Single Sign-on is a solution to allow an end-user to use different applications using the same credentials. To give you an example, when I use modern web sites like Facebook, Dailymotion, yahoo I can use OpenID to connect to any of these applications. OpenID keeps my user information and I may connect to any of theses websites with my OpenID ID
.
Another incarnation of SSO in the enterprise world is described by OASIS using SAML. Security Assertion Markup Language is an XML based standard for exchanging authentication and authorization data between security domains, that is, between an identity provider (a producer of assertions) and a service provider (a consumer of assertions).
As you will probably discover, OSGI community is a very vibrant community. I will continue my articles around OSGi with some thought on the Spring flavor of OSGI as a plaform.
Spring DM Server is a product based on Spring OSGI open source project which have a goal (like always with Spring) to encapsulate OSGI plateform to let you focus on your business code.
Then, here an insight of what Spring brings to OSGI…
Typically, I had to do this to modify the DZone plug-in which had some ugly configuration to modify the post subpanel in the WordPress administration page.
Then, here the few things you need to do to create a beautiful meta-box within any WordPress post page
This code will works for any version of WordPress 2.x. Since wordpress 2.5, a new API has been defined to allow easily to add admin meta-box but if you want to create a plug-in compatible with older version of wordpress, here is the way…
Before talking about distribution, I will talk a little about OSGi.
This platform was primarily intended to work on mobile device. Therefore, it has been design to be light and focusing on the principal (KISS Principle).
Every developer who had used Java programming more than just some Hello World tests, will understand the Jar Hell and the fun with the Class-path.
OSGi has too primary goals, first its modular system which allow to manage module (they call it Bundle) life-cycle, module version management and module dependencies. It’s particularly important for applications who need to run with small memory to only load what is necessary.
The second important goal of the core of OSGi is its service registry, once again focus on the minimum and just allow a module to register its services on the registry in a really purely manner. (more…)