Trifork Blog

Posts by Jettro Coenradie

Introducing a Query tool as an Elasticsearch plugin (part 1)

March 12th, 2013 by
(http://blog.trifork.com/2013/03/12/introducing-a-query-tool-as-an-elasticsearch-plugin-part-1/)

Es

In the past few weeks I have been working with Elasticsearch. I was missing a plugin to look at the data, create queries and evaluate different facets. That was when I decided to start working on a plugin that enables you to do just this.

I have been working on AngularJS together with Twitter Bootstrap, therefore the choice as to which technology to use was not a difficult one. I also used some additional libraries, but I’ll tell you more on this later on.

Why did I put the part 1 in the title? I am going to split this information into two parts. This part deals with the setup of the plugin, the libraries I used and the functionality I implemented. Then the next part deals with providing more details about interacting with Elasticsearch; how I use the facets, create the queries, etc. I will also write down some lessons learned with respect to AngularJS in a later blog post.

Now let’s move on and have a look at the features:

Read the rest of this entry »

Basic Axon Framework sample using vert.x and angular.js

November 27th, 2012 by
(http://blog.trifork.com/2012/11/27/basic-axon-framework-sample-using-vert-x-and-angular-js/)

Some people on the Axon Framework mailing list were asking for more basic samples, preferably using something like vert.x. Since I am familiar with Axon as well as vert.x I thought I could help out. Therefore I have created a very basic application based on vert.x using the Axon Framework. The application is all about maintaining a list of TODO items. These items are shared between all connected web browsers. You have to be able to create a new TODO item and you have to be able to mark them as completed.

During my visit of Devoxx I learned about a front-end framework called AngularJS. This is a very nice addition to the vert.x technology stack. Since I always use Bootstrap for my front-end work, the front-end should look familiar to a lot of you. The following images shows the end result of the application. If you want to know how I created the sample, read on.

ScreenShotAxonTodoList Read the rest of this entry »

And that was Devoxx 2012, partnering with 10gen and a lot of knowledge gaining

November 17th, 2012 by
(http://blog.trifork.com/2012/11/17/and-that-was-devoxx-2012-partnering-with-10gen-and-a-lot-of-knowledge-gaining/)

Last week a couple of my colleagues and I were in Antwerp visiting the Devoxx conference. In this blog post we try to give you an idea about what we did & learned:

The sessions

I attended a lot of sessions, if you want to know more I urge you to read on. I briefly discuss the following talks:

  • Keynote: Geek leaks
  • New features in Java 8
  • Security and http headers
  • Developer tools in google chrome
  • OAuth2
  • Skaling software with akka
  • Last but not least: AngularJS

Read the rest of this entry »

Authenticate against a hippo repository using spring security

July 17th, 2012 by
(http://blog.trifork.com/2012/07/17/authenticate-against-a-hippo-repository-using-spring-security/)

Within a number of my projects we use Hippo to create a website. Hippo contains a JackRabbit repository that has capabilities for authenticating and authorizing users. Hippo builds on this functionality for its own security model. In most of these projects we create an integration component to store content in the repository from other systems and retrieve content from the repository to be useful in other applications. The integration component contains a web interface created using spring-mvc. We use spring-security to secure the web application. Since we do not want to maintain a separate list of users for the integration application we want to authenticate against the hippo repository. In my current project we have a lot of users that do not need access to the integration web application. We want to reuse the security domains functionality of Hippo to authorize the users.

In this blog post I am going to explain the different parts of the solution in such a way that you can use the solution in your own project.

Read the rest of this entry »

Getting inspired by GOTO Amsterdam

May 30th, 2012 by
(http://blog.trifork.com/2012/05/30/getting-inspired-by-goto-amsterdam/)

GOTO amsterdam 2012 960x175

Last Thursday and Friday I went to GOTO Amsterdam. This event was co-organized by Orange11 just like last year. One of the best parts about going to conferences is that they are not only interesting but inspiring too. I personally like the talks with good speakers, of course the best talks are the ones with good speakers and great content. So how do you develop great content?

For me, the best content is based upon a little insight to make you think about the context even further for yourself. Content that inspires you to have a look at a new language, a new framework or new concepts. That is what this blog post is all about. I am not going to share my thoughts on the conference itself (I’ll leave this to Bram!), I’m going to share the things that inspired me from a content perspective.

Read the rest of this entry »

Basic Health check library for your application

April 19th, 2012 by
(http://blog.trifork.com/2012/04/19/basic-health-check-library-for-your-application/)

For a few years now I have been running multiple Hippo projects. All the projects use multiple servers and services. The biggest one has over 15 servers in production. A standard hippo solution consists of site servers and cms servers. We also had some other servers for things like rss and integration. The complete landscape consists of apache/tomcat combinations, proxy servers and load balancers. All the servers are monitored using a special tool. In the beginning we made the load balancer call the a webpage. Later on we created pingers. Calling the pinger was easy for a load balancer and the proxy servers. By using a generic interface for a pinger we could also implement pingers to check ftp connections or external systems. Using the generic interface made it easy to create a custom monitor that just showed all the results of the pingers.

For new projects we wanted to have a similar solution. Therefore I decided to make a library available to create and interact with these pingers. The library consists of a generic interface and some default implementations.

Another part of the library is a version servlet that reads a manifest file to show you information about the actual artifact that is deployed.

In this blogpost I am going to explain the library and show you how to use it.

Read the rest of this entry »

Using the spring-data project and the mongodb adapter specifically

March 29th, 2012 by
(http://blog.trifork.com/2012/03/29/using-the-spring-data-project-and-the-mongodb-adapter-specifically/)

In this blog post I want to share some of my experiences with the spring-data project. At Orange11 we have been working on a sample for the Axon Framework. We have created the Axon Trader. For the trader we use the MongoDB based event store. Therefore I also wanted to store the data for the query side in Mongodb. I was looking for the easiest way to store and retrieve documents from a mongodb instance. I decided to pick the spring-data mongodb library and I must admit that I do not regret that choice.

Read the rest of this entry »

Running Hippo CMS from Intellij

February 3rd, 2012 by
(http://blog.trifork.com/2012/02/03/running-hippo-from-intellij/)

For a number of years we are doing hippo development using our beloved tool “Intellij”. We can import the project using the pom. Deploying from within Intellij was done using the maven provided jetty integration to run the cms. Then we would run the site in another tomcat or as well from maven with jetty. Not very fast, but it works. In release 7.6 (I think) hippo changed the deployment model. They have provided a mechanism to use cargo from maven to start the cms as well as the site within one tomcat instance.

If you want to give the default mechanism a spin, create a new project using the hippo maven archetype and use the cargo integration to run the new project. Steps on how to do this and some links will be presented later on.

Not all developers are the same, maybe some of them still want to use cargo and others want to pick up the challenge and use a tool like eclipse to do the job. Therefore we want to have a mechanism that supports most of the developers out there.

In this blogpost I am going to show you how you can create a structure supporting all these different deployment options. Of course the demonstration that it works is done with Intellij.

Read the rest of this entry »

Embedding RSS in Hippo using the pipelines feature

December 13th, 2011 by
(http://blog.trifork.com/2011/12/13/embedding-rss-in-hippo-using-the-pipelines-feature/)

Onehippologo

For one of the biggest Hippo projects I have been working on, we have created a custom rss solution. When we started the project, Hippo did not have an rss solution and we had some requirements for caching and reusability that we could not implement with standard hippo. A few years have passed and hippo is not what it used to be. Nowadays it has a lot more features and a lot less NullPointers (sorry guys, could not resist). About a week a go Jeroen Reijn told me about the Pipeline feature in Hippo. This feels like the right time to start thinking about a new solution for rss.

With this blog post I am going to show you a better way to create rss feeds with Hippo using the provided features of Hippo. I know there are plugins available for rss, still I think mine is better :-). The solution is based on the Rome project and, as mentioned, the hippo pipelines.Romelogo small

Read the rest of this entry »

Gather content for Lucene from WordPress using Groovy

August 16th, 2011 by
(http://blog.trifork.com/2011/08/16/gather-content-for-lucene-from-wordpress-using-groovy/)

I am learning about the capabilities of Lucene. Here at JTeam we have a few people that are specialized in Search using technology like Lucene and Solr. Therefore I want to have a higher level of knowledge of Lucene than I have now. So I started reading the Lucene in Action book. As I read a book I want to create some samples. When learning about Lucene you need to have content. I decided to gather content from my own website and use it for my Lucene learning.

First challenge, how to get the content from my website and give the content meaning? That is what this blog post is about. I take you on my journey from one end of the groovy spectrum (using the XMLSlurper) to the other end using the XMLRPCServerProxy. During this journey I will also explain some of the basics of the XMLRPC api of wordpress.

Read the rest of this entry »