Sunday, December 29, 2013

Running Vaadin on Virgo the Maven way

Today I tried to run Vaadin on Virgo :

I created a web bundle using the felix maven plugin, added the virgo tooling bundle nature and was able to deploy it using virgo tooling.


I still do wonder what would be the best practices to collect all dependencies of a larger project and get them deployed. How do you solve this for your production machines?


Friday, November 15, 2013

Scale out Jackrabbit JCR with Infinispan

Whilst at my daytime job I recently use jackrabbit a lot alongside with Magnolia CMS. As I learned a little how jackrabbit works, I always thought that the way its persisting content serialized to relational databases is not what I would like to have found. Quite a while ago I tried to implement a persistence manager for orientdb, but I found out that the graph capabilities of orientdb that would otherwise perfectly match the jcr content structure are quite useless because of the way persistence is implemented as a key-value store for single nodes in jackrabbit. So when it's a key-value paradigm so why shloud I then use a relational db? That was the idea that came to me yesterday and I today started implementing a little proof of concept that runs on infinispan. One could think of may things with this. Infinispan can persist and serialize on its own, it scales perfectly, and you could even connect multiple jackrabbit instances to a single cluster.

I am keen to hear what you think about this approach. And if you look at the implementation, it is really simple, you could use any key-value store.





Sunday, June 16, 2013

Moving from Hibernate to EclipseLink - some first impressions

Generally spoken, it has been some work to remove all the non JPA Hibernate stuff from the code before I could even compile with eclipselink. Typically these have been Cache Annotations (Which I will now need from Eclipselink, standard is poor in this area). And I had some usages of ScollableResult that I had to remove. Hibernate seemed to apply some more defaults than EclipseLink does. I had to add @Temporal to my Date fields, when Hibernate was happy with a plain Date. For the queries I had to touch almost all of them adding aliases, where hibernate was happy without. (select from Class c where c.name vs. select from Class where name) All in all it took me about a day for a project with around 100 Queries and 50 Domain Objects. Now I am investigating the Mutlti-Tenancy features of eclipselink, think I will give some feedback when I got feedback on my bugzillas :)

Monday, May 20, 2013

Building a custom RAP Widget based on Select2

This weekend a started to play aorund with new new RAP API introduced in 2.0. It really looks promising.

I started off with the CKEditor Example and created a combo-replacement based on Select2.js. By the way I had more a fight with the select2 api (that I didn't know) than with the rap api thats quite straightforward. I could answer nearly all of my questions from the source.

It supports markup and (what I always miss on the standard combo) it has "clear selection". When you create it with SWT.MULTI it supports the cute Multiselect feature of select2.

Here's the example for those who want to try:

https://github.com/eiswind/xino.org/tree/master/de.eiswind.mango.widgets.select2

Sunday, April 14, 2013

Consuming emf bundles from p2 with maven : b3

Some of the eclipse libraries are not so thightly bound to OSGi and lately I wanted to use EMF in a grails project. It came to me that there are no current maven artifacts available for EMF, so I had to roll my own.

Asking stackoverflow, I first tried to re-jar the bundles with tycho, but that gave me all the OSGI-deps in one jar, what wasn't what I was looking for. After reding through some discussions around maven and p2 in the eclipse bugzilla, I noticed that b3 has the capability to mirror a p2 repository in a maven compliant layout.

As I wanted to use the xsd to ecore converter I created a aggregation for the xsd sdk
notice the maven config at the end of the aggregator tag.

https://gist.github.com/eiswind/5381710

Then I uploaded it to google drive, so that I can consume the repo from heroku build. One major drawback is, that the source bundles are not maven conformant, so that attaching them automagically won't work.

Sunday, March 3, 2013

building a tree: my first three weekends with javascript

I guess I have been writing java code for quite a while now, and it still makes my living. But for the last twelve months I have been working in the agency business and I finally wanted to havy some control of whats going on in the browser.

I set myself a simple, but non trivial goal: I wanted a lazy loading tree backed by orient db only using commercial-friendly licenses.

  • Dojo
Being used to the big java-frameworks, dojo looked promising. But the dojo tree is outdated, needs api adapters to work with the current store backend. making the rest store lazy load and adapt the orient db objects still didn't work after two days of code investigation. So I dropped it as a #fail.

  • jQuery/jsTree
I got jsTree with jQuery working quickly. Adapting the json from orient to json for jsTree was simple.
But: unlike dojo jsTree has no concept of a model. So the thought of propagating changes back in to the tree model looks like #pain and made me drop that too.
  • homegrown/angular
Finally I gave myself a kick and grew my own tree with angular (using a recursive template and some css magic). And although I'm a javascript beginner and had little to no idea about angular concepts I got a working tree in less than two hours. I wrapped angulars resource in a service that wraps the orient objects with stuff needed for the tree and rendered the tree with a template recursion. It was so simple.

Conclusion
I didn't look too deep into backbone. Dojo seems a little over-engineered and not consistent in its development state. jQuery is nice sugar, but its not a serious programming framework. I think I fell in love with angular. 

Tuesday, January 29, 2013

A human-readable jackrabbit persistence manager prototype for orientdb

After working with jackrabbit for a while, I still and always wondered about the database persistence managers that jackrabbit provides. Storing the node serialized in a blob always seemed like a little perversion when using he concepts of a database.

Some while ago I just thought wether I could do that in a more "database" way. The idea was to use orientdb, as it stores documents (nodes) as well as a graph (the jcr tree). Jut to see if I can do it, I wrote a functional, test-passing prototype that stores the node in a human readable orientdb document, and persists the child relations as edges in the graph.

This has some limitations, as jackrabbit will still access only one node at a time, being able to traverse the graph at the storage level is simply not intended by the whole api. But it works, it's readable, can be modified at the db level easily.

You can grab the code at https://github.com/eiswind/jackrabbit-orient

Jupyter Kernel for Java9