JXSE and Equinox Tutorial, Part 2

JXSE and Equinox Tutorial, Part 2


NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.Many of the features covered here are implemented by default.

Abstract

In the first post of this series, we covered the quickest way to get JXSE 2.7x working in Equinox and, with some considerations, probably other OSGI frameworks as well. The approach aimed to get the same functionality as you would get by using the jar file in a regular JAVA setting, but as I demonstrated, Equinox does have the benefit of allowing multiple JXSE instances to run simultaneously, which is a great benefit when developing JXSE applications.

In this second tutorial, we will cover some ways of improving the functionality by severing the dependency on the 4.2x version of Jetty (which has just released it's 9.0 version!) and we will introduce some basic tools to visualize the properties and functions of JXSE. This will improve the development cycle of JXSE applications even more.

JXSE and Equinox Tutorial, Part 1

Abstract

NOTE: As of January 2015, you can integrate JXTA in OSGI through an update site. The WIKI  At chaupal.org  gives detailed instructions on how to use the new 2.8.x JXSE bundles for OSGI.

This extended series of tutorials will cover the various ways that the JAVA P2P framework JXSE (formerly popularly known as JXTA, and currently the most up-to-date JAVA implementation of the JXTA specifications) can be made to work with Equinox (the engine on which Eclipse runs). It would be tempting to replace Equinox with OSGI, and indeed many of the issues covered here will work fine with alternative OSGI implementations such as Apache Felix or Knopflerfish, but I will concentrate on Equinox because it will allow us to do a few things with JXSE that requires a bit more handwork on other OSGI platforms. Besides this, I have tested the code on Equinox alone, so I don't want to get ahead of myself. This tutorial is work in progress, so the document will be re-edited a few times.

This tutorial not meant to cover the principles behind P2P in general, and JXTA/JXSE in particular. If you are interested in this, I'd recommend the (free) book Practical Jxta II by Jérôme Verstrynge, or to go through the online manuals for JXTA 2.5, JXSE 2.6 and 2.7. This first tutorial is aimed to get you started with JXSE 2.7x in an Equinox environment. The reader is expected to have a good understanding on developing plugins with the Eclipse IDE. If you are new to Eclipse I would advise you to read the excellent articles on developing plugins by Lars Vogel and brush up on OSGI and Equinox while you're at it.

Apache Aries: Helping Enterprise Developers Build OSGi Apps

the approval of the  blueprint container specification  by the osgi alliance enterprise expert group (eeg) inspired members of the eeg to start an open source project centered around implementing the blueprint spec and other technologies for osgi applications.  in september the  apache aries  project was born in the apache incubator.  the purpose of the apache aries incubator is to create a new community of people interested in building enterprise osgi technology geared toward the application programming model.  for an introduction to the history and the purpose of the aries project, dzone interviewed ian robinson, a distinguished websphere engineer and a member of the osgi eeg.  robinson is at the frontrunner for the apache aries project and has begun using its technology for ibm's websphere application server.

dzone asked robinson about the factors inspired the aries project.  robinson said, "from a standards direction, the work of the osgi alliance eeg was to define a set of specifications that would form part of an enterprise profile for osgi."  he says the eeg has approved several specs for technologies that allow osgi applications to consume existing java ee technologies like jta, jpa, jndi, etc.  "the purpose of the eeg was not to try and define competing specifications but to take what exists already in the java enterprise space and define how those technologies become consumable for applications running in an osgi framework," robinson said.

Data Streaming in OSGi R7 applications With OSGi R7 Push Stream and Server Sent Events

Providing users of your application with feedback regarding long running operations used to require utilizing pull based solutions such as polling. In modern web applications, however, utilizing push based data streaming solutions to provide such feedback is the norm. But what options do we have if we’re building modern cloud native OSGi applications and we wish to implement such monitoring solutions?

In this article, I will show you how implementations of some of the latest OSGi specifications — i.e. OSGI R7 Push Stream, OSGi R7 HTTP Whiteboard, and OSGi R7 JAX-RS Whiteboard  can be applied, along with Server Sent Events, to implement such push based data streaming solutions. So, instead of having a background JavaScript worker slamming the server with requests for status every few seconds, we’ll have the server push data updates and have them displayed onto our GUI.