Trifork Blog

AngularJS training

Posts by Jettro Coenradie

Evaluating elasticsearch and marvel on the raspberry pi

February 8th, 2014 by
(http://blog.trifork.com/2014/02/08/evaluating-elasticsearch-and-marvel-on-the-raspberry-pi/)

IMG 0208

The past years I have been working with search solutions, mostly elasticsearch. During this time a bought myself a raspberry pi and installed java and elasticsearch on it. Then I put it in the closet and it did not come out anymore. Than a few weeks a go the guys from elasticsearch released marvel. Marvel is a monitoring tool for your elasticsearch cluster. Suddenly I realized what the problem with the raspberry pi is. It is not fun to have just one. Therefore I decided to buy two more and create an elasticsearch cluster. With this cluster I can do experiments. The first experiment is evaluating marvel.

In this blog post I will show some of the concepts of marvel. To make this possible I will also explain the steps I had to take to install elasticsearch on my raspberry pi cluster.

Read the rest of this entry »

Use Kibana to analyze your images

November 28th, 2013 by
(http://blog.trifork.com/2013/11/28/use-kibana-to-analyze-your-images/)

If you are reading some technical blogs, maybe about search or data analysis, chances are big you have read about Kibana. You have seen stories about how easy it is    to use. Most of the blogging effort deals with getting data into kibana using logstash for instance. Maybe some of you have installed Kibana and are using it in combination with logstash. But what if you want to analyze other data. With the most recent release M4, Kibana is better than ever in analyzing other sort of data. In this blog I am going to show you how to create your own dashboard in Kibana. In order to do something useful with Kibana we have to have data. Peter Meijer had a very nice idea to index metadata from all of your images to learn about the type of photo's that you take. I decided to put this in practice. I used Node.js and the exiftool to obtain metadata from images and store it in elasticsearch.

Read the rest of this entry »

Improved search for Hippo CMS websites using ElasticSearch

July 30th, 2013 by
(http://blog.trifork.com/2013/07/30/improved-search-for-hippo-cms-websites-using-elasticsearch/)

We have done multiple big Hippo projects. A regular Hippo project consists of multiple components like the website, the content management system and a repository for the documents. In most of the projects we also introduce the integration component. This component is used to pull other data sources into Hippo, but we also use it to expose data to third parties.

By default, the Hippo Site Toolkit delegates searches to the Hippo Repository that in turn delegates the search to Jackrabbit. This is the repository that is used by Hippo to store the documents. JackRabbit has integrated Lucene which can be used for search. This is a domain specific Lucene implementation targeting to be compatible with the Java Content Repository specification. This however comes at a price, for example more expensive and less customizable searches than search engines like Solr or Elasticsearch provides. for typical Solr/Elasticsearch features like highlighting, suggestions, boosting, full control over indexing or searching external content, Hippo Repository search is limited.

This search problem can be overcome using a specialized search solution like Elasticsearch. For multiple customers we have realized this solution, some based on Solr and others on Elasticsearch.

In this blogpost I am describing the solution we have created. I'll discuss the requirements for creating (near) real time search using Hippo workflow events as well as the integration component that reads the documents from Hippo and pushes them to Elasticsearch.

Read the rest of this entry »

My impressions at GOTO Amsterdam 2013

July 11th, 2013 by
(http://blog.trifork.com/2013/07/11/my-impressions-at-goto-amsterdam-2013/)

A few weeks a go I attended the GOTO conference in Amsterdam. One of the reasons I like to go to conferences is to meet people I haven't seen for a while, talk about technology and other stuff. The other reason to go to conferences is to get inspired. After the conference I like to write down what I got inspired by. But it is always hard to capture the impressions I got in a blog entry...

goto_web_header_AMS_2013_960x175

For this conference I could have written about Linda Rising and her keynote talking about incentives. Why should you use them, or why not. Than I would have talked about managers that still think you are doing nothing as a programmer when you are not working on your computer. I probably would have told about the effect of giving rewards to people. That it is usually counter productive when people get rewards. People can think they need to be given a reward because they need to do something that is not fun to do. I probably also would have told you the story about a company that paid new hires 3000 dollar to leave after their initial 2 week training program.

If you do want to know what I will write about, read on.

Read the rest of this entry »

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

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

Es

In the first part of this series of blogs on Introducing a Query as an Elasticsearch plugin, I described the functionality of a query tool I also discussed the functionality of the tool as the structure of the project. In this part I want to take a deeper dive in interacting with Elasticsearch.

The post consists of four parts:

  • Getting information about the Elasticsearch instance,
  • Constructing the query using the JavaScript QueryDSL,
  • Executing the query,
  • Using the results.

If you need more background around AngularJS, which is used on the client side you can have a look at the following two posts:

  1. AngularJS lessons learned
  2. Basic Axon Framework sample using vert.x and angular.js

Read the rest of this entry »

AngularJS: Lessons learned

March 14th, 2013 by
(http://blog.trifork.com/2013/03/14/angularjs-lessons-learned/)

AngularJS largeAt Devoxx 2012 I attended the AngularJS presentation by Igor Minar and Misko Hevery. I was very enthusiastic about the capabilities of this front-end framework. Therefore I started experimenting with it. I created a sample for the Axon Framework, read more about it here. After my experiments I felt confident enough to start using it in real projects. One of them was adding management reporting using the HighCharts library.

The next step was a bigger project, writing an Elasticsearch plugin to query your Elasticsearch instance. This project has to integrate with a javascript library to interact with Elasticsearch. The layout and other front-end components were implemented using Twitter Bootstrap. Therefore I also used another AngularJS plugin to integrate with Bootstrap.

In this blog post I'll give you some lessons learned with respect to AngularJS.

Read the rest of this entry »

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 »