Thursday, October 15, 2015

Is there a place for another IoT device?

It was brought to my attention recently that Mozilla has preparing to launch a new IoT named CHIRIMEN:
CHIRIMEN (source : http://mozopenhard.mozillafactory.org)
Chirimen is controlled by Firefox OS, which means that application are webpages (consisting of html/css/javascript) and hardware bindings are exposed via javascript binding through the gecko engine. The board above is controlled by this code (copied from http://mozopenhard.mozillafactory.org/):
<!doctype html> <html lang="en" dir="ltr"> <head> <title>CHIRIMEN example - Led</title> <script type="text/javascript" src="gpio.js"></script> <script type="text/javascript"> var v = 0; GPIO.getPort(196).then( function(port) { setInterval(toggleLight, 1000, port); } ); function toggleLight(port){ v = v ? 0 : 1; port.write(v); } </script> </head> <body> </body> </html>

Such an approach has some advantages - f.e. it is deadly easy to write an application for such a thing if you are a web developer or full stack developer, and you do not need to be familiar with Linux/Android nor electronics. The entry barrier seems to be incredibly low.

I do not know whether Chirimen will be successful, but I still find it to be a very good project for the Mozilla Foundation. Actually, one of the best bets for future.

You may be not following this, but the Firefox browser is in a decline:
Firefox marketshare decline by Daniel Cardenas (Wikipedia)
This is a big problem, because Mozilla is commited to openness and privacy protection, and therefore it cannot monetize user data. Oh, and it does not have a big company behind it earning money elsewhere.

What is more, competitive browsers are installed on handheld devices because those browser owners successfully promoted mobile operating systems. Firefox cannot innovate fast enough to win user base (all innovations can be easily copied) by Chrome/Safari/Edge.

If this trend continues, Mozilla will cease to exist in 2020.

So Mozilla needs to find a new market. Desktop is lost, mobile is lost (Firefox OS was too late to the market).

But IoT looks attractive. It still has not reached mass production (because it is still to expensive). The breakthrough will happen when someone will be able to deliver to the market devices so cheap it will be possible to put them everywhere (I think it is < 1$ price point).

Nobody can tell when it will happen exactly (as innovation is unpredictable). But it may happen relatively soon (before 2020). IoT in every home, in every piece of clothing or even pens. Gazillions of devices.

Now imagine that Mozilla earns 5% of market right now. Or even 1%.  1% of gazillion is still a huge potential. This is the true reason why I find this device to be a good move. Mozilla needs to do three things:
  • work on this product with users and improve it constantly
  • survive 5 years and build know how
  • when < 1$ IoT device enters the market, attack it with full speed.
I would be very careful with saying that the IoT market is full. Chirimen may have a lot more sense that it appears to.

Disclaimer: It is a strong opinion, weakly held. I'd love to be at Mozilla right now and have my analysis verified.

Monday, April 27, 2015

Call 4 papers - where is an open source app?

I was recently submitting a number of conference proposal related to my current area of interest, and one thing that struck me was the lack of a rock-solid, easy to use call-4-paper application.

Each time I wanted to propose a talk to a conference I had to create a profile, confirm e-mail address, provide a lot of details and only then I was allowed to fill actual talk details.

"Don't reinvent the wheel!" they say.

So, why, WHY each conference organizers decide to write their OWN c4p application? That makes no sense.

The internet proposal submission is no longer a feature that will distinguish your conference.

That's why I am starting my new, open source application for accepting conference talks. It will not be fancy, but it will work.

Clone it, run it, modify it, USE it.

Contribute if you wish.






Saturday, August 23, 2014

How to render image serverside using OpenShift Node.js?

Hey everyone,

Leaving a developer world in favor of non-coding job has certain advantages.
And one big disadvantage - no more coding. That is a big problem and I lasted about 6 months before I started created something after hours - just for my pleasure.

Things have changed significantly since I was studying. Back then it was a big problem (especially for a poor student) to rent a server and static IP address. And today, with the presence of Weebly and Openshift (a really great Platform As A Service) you can get up your small portal (like mine) in less than a couple of hourse and 100$.

Openshift provides a great array of technologies - I have chosen Node.js + MongoDB as it offers the quickest route to a working app.

One big problem I had was that I wanted to render images server side. This is not trivial as there is no javascript libraries that could do that. One can rely only on native software, but if you consider semi-automated PaaS and customer server-side solution, you will feel the pain.

So I'm sharing with you my setup, as I got it working - it renders images using node.js canvas module, that uses underlying Cairo library.

Installing Cairo on OpenShift gear is not so simple - it is necessary to build cairo manually:

export PATH=/sbin:$PATH
export LD_LIBRARY_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib:/opt/rh/nodejs010/root/usr/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib/pkgconfig

cd $OPENSHIFT_DATA_DIR
curl -L http://sourceforge.net/projects/libpng/files/libpng15/1.5.18/libpng-1.5.18.tar.xz/download -o libpng.tar.xz
tar -Jxf libpng.tar.xz && cd libpng-1.5.18/
./configure --prefix=$OPENSHIFT_DATA_DIR/usr/local
make 
make install

cd $OPENSHIFT_DATA_DIR
curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz -o jpegsrc.tar.gz
tar -zxf jpegsrc.tar.gz && cd jpeg-8d/
./configure --disable-dependency-tracking --prefix=$OPENSHIFT_DATA_DIR/usr/local  
make
make install

cd $OPENSHIFT_DATA_DIR
curl http://www.cairographics.org/releases/pixman-0.28.2.tar.gz -o pixman.tar.gz  
tar -zxf pixman.tar.gz && cd pixman-0.28.2/  
./configure --prefix=$OPENSHIFT_DATA_DIR/usr/local   
make 
make install

cd $OPENSHIFT_DATA_DIR
curl http://public.p-knowledge.co.jp/Savannah-nongnu-mirror//freetype/freetype-2.4.11.tar.gz -o freetype.tar.gz
tar -zxf freetype.tar.gz && cd freetype-2.4.11/  
./configure --prefix=$OPENSHIFT_DATA_DIR/usr/local   
make 
make install 

cd $OPENSHIFT_DATA_DIR
curl http://cairographics.org/releases/cairo-1.12.14.tar.xz -o cairo.tar.xz  
tar -xJf cairo.tar.xz && cd cairo-1.12.14/  
./configure --disable-dependency-tracking --without-x --prefix=$OPENSHIFT_DATA_DIR/usr/local 
make 
make install

After that it is necessary to hack package.json file - it cannot contain canvas in it, as paths are wrong, and canvas will never discover cairo in non-standard location. Canvas has to be installed using build hook:

export PATH=/sbin:$PATH
export LD_LIBRARY_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib:/opt/rh/nodejs010/root/usr/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$OPENSHIFT_DATA_DIR/usr/local/lib/pkgconfig

cd $OPENSHIFT_REPO_DIR
scl enable nodejs010 v8314 'npm install canvas'    

And a really dirty hack. OpenShift tends to cache installed modules, which is a bit of a problem, because when scripts are restored, they know nothing about where the cairo is installed. This simple pre_build hook is reverse engineered from the OpenShift code - I remove cached modules, and therefore force canvas installation by my script.

rm -rf "${OPENSHIFT_NODEJS_DIR}/tmp/saved.node_modules"

I hope this will help someone trying to run canvas module in OpenShift - it took a couple of long hours to figure out what is going on.

Wednesday, December 18, 2013

P2 - retrospection

My work towards getting P2-RPM integration is leaning towards an end.  Patches are in gerrit, here and here. While Eclipse with the patches is being built, I have plenty of time to think.

I've been with P2 since it was announced at EclipseCon 2008 in Santa Clara. It's hard to remember how crowded was the room, but I remember my sheer enthusiasm to the idea of solving the satisfiability problem, and runnig the optimal set of bundles.

Little had I know how much influence it will have on me. But P2, and especially dropins, were supposed to be my daily bread for the next couple of years.

Then I changed the job, hoping for something new, but P2 did not let me to forget. Fedora turned out to rely on dropins (because there was *no* alternative). I tried to change Fedora, but was confronted with 20+ years of Linux releng, and got really convinced that P2 could have been quite different.

So, how the P2 could have look like now?
The core P2 functionality, responsible for installing things, should *not* be running in JVM. Java itself is not granted on every computer, and it has plenty of dependencies (at least on Linux), which makes it very unwanted member of the installer stack. Not to mention that it adds size to the installer, which is really important in the case of corporate setups and people using modems. Another problem is that P2 running in JVM cannot update that JVM because of locking. Not to mention the lack of elevated privileges support.

I can easily imagine P2 being a native, embeddable processing library that would rather work take the state of a system, the request, and respond with steps leading to another state, but without really touching anything, but just letting the installer to deal with file operations.

I'd be the first to work on it to integrate it fully into RPM and make it responsible for the whole Linux installation - not just Eclipse.

Disclaimer: Don't be afraid. Those are only my thougths, which (un)luckily I'm not able to materialize without making many people upset.


Friday, October 25, 2013

Google Talk plugin presence breaks Eclipse in Fedora 20.

This is the kind of news I really hate to announce, and at the same time, this is the reason why I'm addicted to open source. With open-source I could report it. Investigate it, or even workaround it. But the only thing I can do with a binary plugin is to remove it.

Symptoms:
Eclipse 4.3.1 in Fedora 20 crashes shortly after content assist or javadoc is shown. ABRT discovers a crash.

Reason:
Both content assist and javadoc are browser-based. Google Talk plugin interferes with webkit/SWT, and in the end JVM crashes.

Workaround:
Remove Google Talk plugin.
yum -y remove google-talkplugin 

Thursday, October 24, 2013

Enabling Tycho tests for P2 - lessons learned

Today's morning, after turning on Eclipse, I got this notification:


I find it to be a big step forward (at least to me), because from now on, all P2 patches pushed to gerrit will be automatically verified in a quite reasonable time - more or less 2 hours - yes, that's the time that is necessary to run the build and execute all P2 tests.

However, the road to the green build was a rather bumpy one - here is the list of issues that may impact more people doing the migration:

Issue #1 - Error code 23.

First reported as Bug 415489 - tycho-surefire occasionally fails with unexpected return code 23. Then after investigation - duplicate opened by me:
Bug 417430 - tycho-eclipserun may interfere with tycho-surefire OSGi runtime.

Symptoms:
Tycho builds stops with an unexpected error code 23. The build is not failed, it just exits.

Cause:
Tycho occasionally assembles and spins Equinox instances, if it is necessary to run OSGi-based tooling during the build. But in one place, Equinox was refusing to start, and was returning error code 23, demanding to be restarted. The sequence that lead to this was pretty simple:
  • Tycho assembled and run Equinox instance based on Kepler versions to generate API description
  • a bit later, tycho assembled and run another Equinox instance based on Luna-Nightly to run tests, but the configuration directory was not cleaned, so Equinox thought an update was happening, and demanded a restart.
Solutions:
  • Update to Tycho 0.19.0 - the issue has been fixed there
  • Change tycho surefire configuration area to avoid collision with api builder:
    <work>${project.build.directory}/surefireconf</work>

Issue #2 - Different naming schemas.

One of the tests was failing all the time, returning doubled number of artifacts in a generated P2 repository (expected:3, was:6). What happened was that P2 was copying bundles from a running application, and this Surefire application was using different naming scheme: Regular Eclipse apps use following convention: bundleId_version.qualifier.jar, but Tycho Surefire uses bundleId-version.qualifier.jar. Of course, P2 processed those files properly, and generated valid repo, just the test input was wrong.

Issue #3 - Circular dependencies.

P2 Tests, to run properly, require platform specific filesystem bundles. The only way to add those bundles to Surefire is to add parent feature - and since we are building P2, parent feature (org.eclipse.platform) would be resolved from an update site. Well, almost. The parent feature happened to include one bundle from the reactor (org.eclipse.update.configurator I think). So, almost everything was resolved from the update site, except this one bundle, which came from the reactor, and didn't satisfy feature requirements due to the changed version.

The workaround was to use java.io.File api (luckily this is all about test case preparation).

Some discussion concerning this issue seems to be happening in Bug 419201 - "mvn clean verify -Pbuild-individual-bundles" fails for Platform Compare.

Side note:
There is an ongoing effort to enable running tests during the build for particular components, under the umbrella  Bug 416904 - Allow to run tests with tycho-surefire-plugin. "In order to lower entry barrier and execution of unit tests [...]".

Best regards,

Monday, October 21, 2013

Rediscovering Mylyn (Builds)

I always have a mixed feelings when I try to write anything about Mylyn. It's just impossible to cover all its greatness it in one blogpost, and the fact that it is written as an Eclipse add-on is not helping much in promoting it amongst my linux readers (it's all because of this joke:
But let's try. First of all, Mylyn is an excellent tool to keep all your bugs in one place, which is very useful for me, as I very often jump between projects and need to switch between different areas quite fast:

Mylyn Task list - bugs from different sources in one place
But that's just a tip of the ice berg.  The true power of Mylyn is 'context' management. What is a context? Well, it's a set of files you are working with, and Mylyn's ability to track which files are important for certain bug is hard to overestimate when you get a comment like:
Can you include a "description.txt" file (or similar) that describes how to rebuild them, in case it is required in the future?

The context is just one click-away - the only thing you need is to activate your task by clicking the ball next to it:

An active task, a task without context, and an inactive task with recorded context.
So now we go to the main Mylyn functionality, that really let's the entire Eclipse shine - just compare the next two screenshots:



Have you noticed which files are presented in the 'Package Explorer' view? Yes, that's those I really need! No clutter, no list scrolling! One click and you're back to task that you've left a week ago!

But even that's not all. If you have Continuous Integration running on Jenkins/Hudson, you may connect your Eclipse to it, and get this lovely view of your jobs:
Builds view. Notifications included. No more page refreshing.
Can you see the small JUnit action? Guess what does it do :). Yes, you are right - it opens tests in a JUnit view:

Jenkins/Hudson build test result loaded into Eclipse.
And now - once you double click the stack trace - Eclipse will open a file for you - no grepping, finding, searching - everything loaded into your really Integrated Development Environment!

Of course - this is just a small part of Mylyn functionality, this is just what appeals to me most in my daily work. But managers will be happy, too, with all the project-tracking functionality, integrated via OSLC, and really powerful tools (out of scope for this blog).

Quick instructions how to install Mylyn in Fedora (packaged by me):
sudo yum install eclipse-mylyn
Pretty simple - and really worth to try out!

Thursday, August 1, 2013

Why it is worth to build open source software.

Sometimes people ask me why I always want to build everything from source, and my answer is always that I have to do it because of the  Fedora policy, which states two reasons:
  • Security: Pre-packaged program binaries and program libraries not built from the source code could contain parts that are malicious, dangerous, or just broken. Also, these are functionally impossible to patch.
  • Compiler Flags: Pre-packaged program binaries and program libraries not built from the source code were probably not compiled with standard Fedora compiler flags for security and optimization.
 But it is not all. Open Source definition is a very broad definition, and some software packages may not be usable at all without proprietary, closed and well-controlled companions. In that light, building from source is the ultimate indicator whether a software creator really gives you the right to build (and, what's more important, to patch) his/her code.

This post was inspired by this answer on fedora-java.



Friday, June 28, 2013

Kepler retrospection - was CBI a net loss?

While I was reading Kepler retrospective notes, I found this statement:
CBI was a net loss for us so far. It was a very large volume of work just to get our build back to its old state. There is benefit for others in the community to make it easier for them to run builds independently. For committers it hasn't delivered value yet.
and started immediately wondering who was the "us", and why it was "a net loss".

Fedora had it's own Eclipse build system, which was 8 x faster than current CBI build (15 minutes vs 2 hours on non-SSD drive). I've spent a lot of time getting Eclipse built with Fedora and switched to CBI before the Foundation did.

All that was (and still is) a cost, but was it really "a loss"?

I find it rather as a first step towards a really necessary move - Eclipse Foundation taking responsibility on development. The build system is first, then maybe we will get vendor-neutral architects or UX designers.

Another point is that once it is possible to easily rebuild Eclipse, we can see even right now internal Eclipse teams appearing here and there, which tend to become really valuable contributors.

Not to mention that after Kim left, it took about a month to get builds running again (at the Eclipse Foundation, we had them running in Fedora). Is it ok to have so much power depending on one person (because that is what happens if you have a large ant-based build)?

I'm sorry but I can't agree with a "net loss". It was a necessary cost. Good for the Eclipse Foundation. Good for the Eclipse.

BTW. I really hope some day UX designers or architects will be hired by Eclipse Foundation.

Monday, June 24, 2013

Cascaded builds - solution or a problem?

Fedora 19 consists out of approx 14000 of packages. Could you imagine a situation, where a security fix for one basic package (let's say kernel) would cause a need for the 14000 packages rebuild*?

It sounds strange.

On the other hand, it is perfectly normal in the Eclipse world. Let's imagine that I want to put a new EMF into my Eclipse platform. So I need to build EMF, and put it into Eclipse (a.k.a. rebuild platform with proper update sites). The whole process takes quite some time, but that's not that important.

If EMF had any dependencies, I'd have to rebuild them first.

So I've started investigating how to automate those tasks. And this is an answer I've received:
[...] From my point of view, these Java module frameworks refuse to acknowledge that  there is extensive experience with distro-level release engineering. (Basically, exact dependencies and multiple versions of the same code might be convenient now, but will seriously hurt you down the road.) [...].
Florian Weimer.
Full text in the fedora-devel.

The part about strict dependency check struck me as being "just right". Eclipse definitely needs a very strict checking at the build time and during changing the installation.

But it does not, and should not be very strict about components being changed at runtime.

And yes, rebuilding the entire Eclipse to get a minor security update in one of it's dependencies is a waste of time.

So I've put up a small wiki page in which I described how I'd like to see installation handled.

The link to the wiki page.

Any comments welcome.

* such situations happen, although very rarely, especially when there are big changes done in compilers, but this happens only when a distro was not released yet.

EDIT: corrected typo and link to fedora-devel.

Wednesday, June 12, 2013

A nasty bug in dropins - read it if you use them

The nature of dropins is that they were supposed to be a transitional mechanism between old update manager and P2. Dropins have more advantages that they were supposed to have, and one of them is truly easy management - just copy a plugin, and it will work (in most cases).

This time, however, a really nasty issue managed to get into Kepler. It was discovered about two weeks ago, when some of our Fedora packages started disappearing after updates.

We often get similar issues before final build of Fedora is released, so it did not looked seriously. But after a couple of days of checking our build process and testing I've found that:

If you deploy into dropins a plugin that is already installed using P2 director, your Eclipse goes bananas, especially if this plugin is a platform dependency.
The dropins mechanism will try to uninstall it, and then, depending on your configuration, will stop working, or will break your Eclipse.

The bug was reported in the Eclipse bugzilla, but it will most likely be shipped due to the bad timing in which it was discovered.

So beware of what you put into dropins - unless you want spend the same amount of time that I did trying to understand what's going on.

Monday, June 10, 2013

EclipseCon France - Wrap up

I had a pleasure to take part in the EclipseCon held for the first time in France. Here are is my main observation:
Java has more in common with javascript than continental breakfast with breakfast.

Also, for the first time, there was a true coming out of people adjusting and packaging inhouse flavour of Eclipse. A few of my live-recorded tweets:


So, it's all about having a few people in an organization that know tools, and prepare tools for others. It just looks like the idea of "bring your own device" policy was wrong. A corporation needs standards. Period. And it's much better to have a team designated only to free software management than allow your employees to invent the wheel again and again.

I wish all those eclipse builders contributed back!

What's more, I believe that the future belongs to those small, single-purposed IDEs, and kind of natural consequence will be equally precise a IDE in the browser, where you rather point&click required solution rather than spending a couple of days figuring out how to set up certain tools to build a server app and then a mobile app. Ideally I'd like to be able to say "yes" to this tweet:


That's said, Eclipse was included into the Red Hat Developer Toolset. The Developer Toolset is a set of tools that work together, and are decoupled from the underlying base, so you will be able to use a stable work environment and up-to-date development tools, without configuring things by yourself!

Wednesday, May 29, 2013

The most significant feature of Kepler Eclipse on Fedora

Yeah, I know I'm kind of repeating myself, but look what happens after you update Eclipse in Fedora 19:

Eclipse after update in F19

P2 discovers that you're system installation had been changed, finds what you have installed as a regular user, and then asks you to install those things again, providing you a nice wizard:

Features reinstallation wizard page
This is a big step forward since previous Fedora releases, where Eclipse package update caused a loss of user installed features, or even totally broke the installation.

Of course, not only Linux will benefit from this approach, but all setups, where users have only read-only access to a master installation administered centrally.

Edit: Things never go as smoothly as one would wish. The problem that I was having with this dialog was that when I had multiple Eclipse installed, from time to time, the dialog was trying to reinstall things from "wrong" Eclipse installation.

It turned out to be a feature, not a bug. Eclipse, when shared install is run for the very first time, tries to find previous installation on the best-can-do basis. This scenario is a bug for Fedora, because Fedora Eclipse has only one location that does not change, and therefore if there is no local configuration for that location, it means that nothing should be reinstalled. I think a solution is as easy as setting this property to the Fedora installation:

-Declipse.p2.skipMovedInstallDetection=true


Thursday, May 9, 2013

Eclipse Mylyn - quite interesting feature

Did you know that Eclipse Mylyn integrates with a History view?

Exemplary history displayed in the History view.
Unfortunately, it works this way for Red Hat bugzilla, but not for the Eclipse one :-(.

Tuesday, May 7, 2013

Eclipse Marketplace Client just got updated in Fedora 19+

Short introduction for my Fedora audience:

Eclipse Marketplace is, well, a market for Eclipse plugins.  Eclipse Marketplace Client is a tool that allows for browsing and installing plugins from within your IDE. The analogy to other application stores is quite obvious. You can install the client by invoking:

sudo yum install eclipse-mpc

Main content:

Fedora 19 release date is approaching us fast. Since the Fedora release and Eclipse release are very close to each other, and there is a freeze between the RC (Beta) and the final release, I'm updating now the Eclipse stack to the Milestone 7 - the last milestone between the final release of Eclipse.

Going from one project to another I stumbled upon Eclipse Marketplace Client. It has no new release scheduled on it's website, but the log has revealed quite interesting features, so I've decided to include those updates.

Here is a screenshot of a new Marketplace Client:


Note new attributes that are now displayed - the number of installs and favourites stars. This will definitely help to assess which solutions are well tested in the field :-).

It also looks like there will be a newsletter in the marketplace client :-)


The market place is interesting also from another point of view.  I have written a small utility mojo that transforms a p2 repository/update site into a runnable form that could be put in dropins. So the part of rpm responsible for installing the client looks like:

mvn-rpmbuild org.fedora:feclipse-maven-plugin:install  \
 -DsourceRepo=org.eclipse.epp.mpc.site/target/site -DtargetLocation=%{buildroot}%{install_loc}/eclipse

Which is a great progress from manually unzipping features into destination :-).

Yes, yes, I'm aware that dropins mechanism is not really the best solution, but that's the only solution that we managed to get work together with rpm.

Monday, April 29, 2013

Is running Eclipse on Raspberry Pi possible?

During the weekend I stumbled upon Bug 406749 Create native launcher and product export option for Raspberry Pi, which prodded me to do the long postponed task of contributing patches that has been used in Fedora to built Eclipse for arm.

My patches provide generic arm bundles. It is a part of the work. According to Fedora documentation, Arm processors exist in two versions -  software and hardware floating points. I guess that Eclipse built on one of them might not work on the other one, and it will be necessary to split each arm fragment in two.

It's also worth to consider if Eclipse on arm without FPU is really something we want - it will be unbelievably slow.

But straight to the point - I tested various amounts of memory assigned to maven for the purpose of Eclipse build - and it started succeeding only if maven was granted 900MB. That eliminates Raspberry Pi forever. Sorry for sad news :-(.

However, if you are interested in building Eclipse on various mobile devices, and you'd like to try out those patches, I'd be happy to hear the results!

And a small poll for the end (results can be found here, but please do the poll first!):


 

Wednesday, April 24, 2013

On the evilness of split packages in the OSGi

OSGi allows for having packages split across multiple bundles. This, together with a dropins mechanism, is a true mine field.


So, what's wrong with those split packages? They are split! OSGi, in some magic way, merges them during runtime, but does not see explicit dependency between bundles providing those packages.

The P2 reconciler app, using some Equinox service, refreshes all packages that have dependency changed. So, for example, if you install a bundle providing javax.xml into dropins, you'll have almost all plugins refreshed (depending on the dependency tree).

But, since bundles with split packages are not dependent on each other, you may end up in a not so much theoretical situation, were a bundle with one split package is refreshed, and the other is not. If they do depend on each other (f.e. one has an implementation, the other an interface) you will get a nice ClassCastExceptions or other, similar runtime errors.

Real Eclipse bug can be found in the Eclipse bugzilla.


Monday, April 22, 2013

DevCrowd'13 – share knowledge, share passion - impressions

I had a pleasure of participation in a conference called DevCrowd this weekend in Szczecin. And I must admit - I underestimated it, and got very, very surprised.

First of all, the conference, held at the Szczecin University of Technology was developer community organized, meaning there was no single, leading technology, solution, nor vendor.  This resulted in a really mind-blowing mix of speakers that touched problems on the border of many spaces (technical, human and legal one) and made many people to think about what they do.

Let me mention two really noteworthy presentation fragments:
  • Adam Dudczak, "6 things that you were not taught during studies" discussed, amongst other things, the problem of choosing 3rd party dependencies for use in your project. This was a very right call in the era of social coding, and clearly outlined the need for IP management for communities that want to share their code.
  • There were two talks by JarosÅ‚aw Ratajski and Grzegorz Godlewski, related to web programming. Those talks resonated in my mind because they were about Java developers finding themselves in the JavaScript world, and giving a really strong message, that despite Web is somewhat inferior to desktop, it needs superior developers. I guess Netscape was wrong by targeting JavaScript "to nonprofessional programmers". 

 I realized apparently not so secret plan of OSGi and Fedora conquering the Java world and performed a brief introduction to it, and quite unexpectedly, found people who were really interested in migrating their applications.

I got totally convinced to small conferences, and I look forward next edition!


Thursday, April 11, 2013

Maven groupId:artifactId and OSGi Bundle-SymbolicName - how they relate to each other?

OSGi massively coming to the maven world is a new trend, and is causing quite a big disturbance (at least to me).

First of all, as you already know, Fedora policies don't allow me to use binaries. Therefore Eclipse Orbit, a project that contains 3rd party Eclipse dependencies in the form of jars, is banned for me.

I witness that more and more open source jars support OSGi by default, but sometimes not exactly in the way I'd love to - especially if it comes to the naming schemes.

Let's look at the example of JDT core - the most widely used Eclipse jar. It was used as a maven dependency long before it received its official pom. As a result, it is available in Fedora with following aliases:
  • org.eclipse:jdt.core
  • org.eclipse.tycho:org.eclipse.jdt.core
  • org.eclipse.jetty.orbit:org.eclipse.jdt.core
  • org.eclipse.jdt:org.eclipse.jdt.core
The question is, which is the right one? Well, the OSGi Bundle-SymbolicName wiki page says that:
A BSN often takes the form of a reverse domain name. If automatically generated via Maven Bundle Plugin, takes the form ${pom.groupId}.${pom.artifactId}, or ${pom.artifactId} if it already starts with ${pom.groupId}.
So, in that case, we need to go the Maven Guide to Naming, and find out that:
groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules, what means that has to be at least as a domain name you control, and you can create as many subgroups as you want. Look at More information about package names.
and
artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed.

The artifactId for Eclipse should be a jar name, which in turn should follow Eclipse Naming conventions. The groupId should be a reverse domain name of the project, so in case of JDT, we would get org.eclipse.jdt, thus the final and proper groupId:artifactId of JDT core is org.eclipse.jdt:org.eclipse.jdt.core.



The real problem will appear if the project does not obey Maven guidelines, and has groupId:artifactId commons-logging:commons-logging or junit:junit. In that case applying OSGI guidelines will cause invalid Bundle-SymoblicNames: commons-logging and junit, which are against OSGi guidelines, although based on them.

In this situation it would be good to reconsider group and jar name changes to reflect the organization domain:
  • org.apache.commons:logging (logging.jar shipped)
  • org.junit:org.junit (org.junit.jar shipped).
Happy renaming!




Wednesday, March 13, 2013

All roads lead to Rome

I'm a Fedora Packager. I (amongst others) take care about Eclipse in the Linux world. And one symptom of that care is prodding everyone else to update or drop dependencies. So, if your project suddenly gets a number of bugs open:
  • 398103: adopt latest jsoup
  • 402882: relax requirement on lucene
  • 398102: adopt latest jdom
  • 398100: adopt latest org.apache.commons.lang
  • and so on and so on...
you may be sure it's me. Let's just say that I believe that broad cooperation between open source projects is a must, and staying too long with an outdated dependency is harmful for both, consumer and producer.


Today, I tried to address a bug opened not that long ago:
  • 398084: Adopt rome 1.0
"ROME is a set of RSS and Atom Utilities for Java that is open source under the Apache 2.0 license." to quote their webpage and explain a bit what is this library for.

The said news is that ROME is effectively dead. The last comment from the project author is more than one year old. Project webpage offers 'Related searches'. The source repository does not contain a single tag. Their mailing lists contains spam traffic.

In a normal situation I'd just look for a replacement, but this case is different. There is NO replacement. It looks like a technology shift killed it. There's no need for a new version of RSS or Atom, so project matured and died.

Unmaintained library is a pain. It's a security hole. And will, sooner or later, damage the consumer.  But what to do, if there is no alternative? Hope for the best?