Trifork Blog

Posts Tagged ‘nodejs’

Setting up Maven to use Grunt/NodeJS

October 7th, 2014 by
(http://blog.trifork.com/2014/10/07/setting-up-maven-to-use-gruntnodejs/)

grunt-logo For one of our projects we wanted to automate javascript concatenation/minification/tests and incorporate it into our maven build. While there are a number of maven plugins for those tasks, I’ve found that depending on another technology offered so much more and basically ended up integrating Grunt into our maven build. Grunt is a task runner which runs in node.js and it along with its plugins (tasks) are distributed with NPM. One could compare it with Maven + Ant with one big advantage for frontenders, it’s all javascript driven. This advantage means there’s a wider scenery of tooling catered specifically (but not exclusively) for frontend development and makes it quite delightful to find and use tools. It will feel weird to integrate a dependency manager and task runner into another dependency manager and task runner, but it actually makes sense from a polyglot point of view. Don’t worry though, we will be using Maven to add Grunt to the build.
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 »

Combining java and node.js

July 28th, 2011 by
(http://blog.trifork.com/2011/07/28/combining-java-and-node-js/)

I just wrote a new blogpost about a sample application I have created. The sample is combining a node.js front-end application with a axonframework java based backend. The following image gives you a good idea.

NodejsAxonRedisBlogpost

The front end contains a node.js application that uses the http library to obtain and send data a rest based application. Next to that it receives messages using the redis pub/sub mechanism from the the java backend. Using the now.js library these events are pushed by the server to all connected clients. The java backend is build using the springmvc rest capabilities. Commands are send to the Axonframework based business logic. Listeners for the events are registered and messages based on these events are published to the redis pub/sub mechanism.

If this got you interested, head over to my blog post.

http://www.gridshore.nl/2011/07/28/combining-java-and-node-js-through-redis-pubsub-and-a-json-remote-interface/

Learning Node.js

April 18th, 2011 by
(http://blog.trifork.com/2011/04/18/learning-node-js/)

For projects and for some experiments I want to get a better way to do server push. With the new HTML 5 becoming the standard and therefore WebSockets becoming available in all mayor browsers, it seems that WebSockets is the way forward. A very nice implementation of WebSockets that is backwards compatible with older browsers is available through Socket.io. This is a Node.js library. Node.js brings JavaScript to the server. If you are as sceptic about this as I was, stay with me, you will like it after trying.

Within this blog post I want to share some of the things I learned while creating a sample application. The sample shows twitter integration for authentication, server push in a chat application that also shows the other persons that are online. The most important node.js libraries I use in the sample are: expressjs, socket.io, node-oauth, connect, jade and sass

Read the rest of this entry »