In this tutorial we are going to create a PageRanking for Wikipedia with the use of Hadoop. This was a good hands-on excercise to get started with Hadoop. The page ranking is not a new thing, but a suitable usecase and way cooler than a word counter! The Wikipedia (en) has 3.7M articles at the moment and is still growing. Each article has many links to other articles. With those incomming and outgoing links we can determine which page is more important than others, which basically is what PageRanking does.
(more…)
Filed under Hadoop, Java, NoSQL | 5 Comments »
As part of the preparations for the recent 1.0.0 release of jclouds, I was tidying up the existing Tweetstore demo application as well as porting it to CloudBees’ Tomcat-based RUN@cloud platform.
A key part of the test harness for the original versions of Tweetstore that run on the Google App Engine is the neat GoogleDevServer class. Basically, it’s a clever wrapper around the KickStart class used under the covers by the GAE SDK tools that allows you to specify the SDK location, address, port and WAR file (or expanded WAR directory) to run.
Better still, it can programmatically be shut down cleanly, making it ideal for integration test runs1.
For CloudBees, I was thus looking to put together a similar RunAtCloudServer. It proved more challenging than expected…2
(more…)
Tags: jclouds
Filed under Cloud, Google AppEngine, Java, Middleware, Tools | No Comments »
Recently, I was preparing a connection checker for Deployit’s powerful remote execution framework Overthere. To make the checker, as compact as possible, I put together a jar-with-deps1 for distribution.
Tests and trial runs from the IDE worked, so I was expected the dry-run of the distribution to be a quick formality. Instead: boom!
Turns out that one of the libraries used by Overthere, TrueZIP – or indeed any code that utilizes Java’s SPI mechanism2 – doesn’t play well with the jar-with-deps idea. (more…)
Tags: Gradle, Maven, spi
Filed under Build tools, Gradle, Java, Xebia Labs | 9 Comments »
In my current position as Performance Engineer and in my past position as a Middleware Architect I did quite some work with closed source performance monitoring and analysis tools (i.g. CA Wily and later AppDynamics).
These tools are both expensive but also do quite a good job most of the times. In the same field there are more tools, but all in the same price range for as far as I know.
To name some: Foglight, Dynatrace, Newrelic, JXInsight, Tivoli Performance Viewer, Compuware Gomez.
Around 2006 several initiatives to create open source performance monitoring tools for java production environments started to appear.
This was mainly because AOP (Aspect Oriented Programming), the technology used in most of these products, was getting attention in the market and there were quite some developments in that area at the time.
I am interested to see how the open source community around these kind of products is evolving. The outcome is quite surprising…
Filed under Java, Middleware, Performance, Testing, Uncategorized | 9 Comments »
Last weekend the public beta of JavaFX 2.0 came out. I’ve much anticipated this release, as you might guess from my previous posting on JavaFX 2.0. I’ve downloaded the JavaFX-runtime, SDK and Netbeans-plugins the following evening from Oracle’s JavaFX page and started trying out JavaFX by viewing and running the examples from the SDK from Netbeans.
I’m quite enthusiastic, read on the learn more!
(more…)
Tags: Java, JavaFX
Filed under Java, mobile, ria, swing, Technology | 5 Comments »
Authenticating users is an important part of an application. Limiting the access to resources with authorization too. Spring Security is a reference in web environment. However, it is tied to the Spring technology and the size of the library — more than 10 JAR of dependencies — may restrain its use. Moreover, its lack of integration with Guice or the recurrent deployment of an App Engine application may exclude it. This is the opportunity to take a closer look at Apache Shiro.
Tags: authentication, authorization, http header, JAAS, Jersey, jetty, Security, Shiro, Spring Security
Filed under Java, Security | 1 Comment »
In the java world we have been using and getting used to annotations since Java 1.5. Although there were some critical voices at first, I think most of us have come around and are using annotations now quite extensively. In my experience annotations are mostly used on POJO domain classes to configure frameworks like Hibernate, Spring and Seam and many other frameworks to be able to handle the custom objects correctly.
There are as many different approaches to this as there are implementations. In this blog I try to identify a few of the better approaches and a few of the poorer ones. The blog is not so much meant as a critique on the frameworks that the examples are taken from, but more as a guide to designing your own annotations whenever you might be faced with that task.
(more…)
Tags: annotations, configuration, jackson, resteasy, Seam
Filed under Java | 1 Comment »
RESTEasy is a Framework for building RESTful applications in Java. In this blog I will show how to easily build RESTful webservices that accept data from an HTML Form. We will also explore the possibilities to extend RESTEasy to handle more complex cases.
(more…)
Tags: form post, resteasy
Filed under Java, RESTEasy | 7 Comments »
As an ubiquitous exchange format, XML is well implemented in java. But those implementations hide how they perform the data binding from a XML structure to an object graph. It leaves us helpless in front of an application giving XML as a plain old string. Because low level API (DOM, XPath) — focused on document structure — are tedious, major JAX-RS implementation (Jersey, CXF) have chosen the same high level API — focused on data —: JAXB. Let’s do the same.
Tags: Data Binding, DOM, JAX-RS, jaxb, XML, xpath, XSD
Filed under Java, Tools | No Comments »
Recently, I was tweaking MultiSPI to add the following class loading fallback logic:
if (threadContextLoader != null) {
loadFromContextLoader(className);
} else if (systemLoader != null) {
loadFromSystemLoader(className);
} else {
loadFromBootstrapLoader(className);
}
and realized that it’s not immediately evident how to do this in a uniform way. But actually, it’s quite simple…getting a ClassLoader object for the bootstrap loader is just a couple of lines of code.
(more…)
Tags: class loader, Java
Filed under Java, Tools | No Comments »