Last month I introduced a new open source ATOM Pub server called: Atom Hopper (source code available on GitHub). I did a small demo of Atom Hopper and had to quickly build a user interface to show off what exactly Atom Hopper did (not everyone is familiar with ATOM) in a visual way since Atom Hopper is a back end server. Today I’ll show you how you can take what I’ve initially built and use it for yourself.
[ad name=”Google Adsense”]
Note: Keep in mind I didn’t have much time to build this demo and had to take several shortcuts to meet a deadline that was quickly approaching as well as getting the rest of my workload done. There is definitely a lot that can be cleaned up, etc. so feel free to fork the project and make your own modifications.
There are two pieces currently to demo Atom Hopper:
1. Atomic – an HTML/JSP based front end to create and fetch (search) ATOM feeds.
2. Atomic-AR – an HTML front end to fetch ATOM feeds using polling (websockets would’ve been better but not enough time was available to get it all working). The “AR” in the Atomic-AR stands for “almost realtime”.
Note: I used plain old JSP without any other Java web frameworks/libraries to keep it as simple as possible.
To run the project (available here) you simply need to build the source code (I used NetBeans 7 and loaded the Maven project) and generate the WAR file. You can drop the WAR file into something like Tomcat. Keep in mind though you will need to modify a couple settings:
In the web.xml file setup the URL(s) to your Atom Hopper feeds, below is an example of two feeds:
Note: Multiple feeds are | pipe delimited.
The other setting is in the atomic-ar.html file:
Set the paths however you have your system configured. Keep in mind that the Atomic WAR needs to be deployed on the same server as where the Atom Hopper WAR is running from.
Go ahead and run the jQuery Mobile “Atomic” interface first and you should see the following:
Atomic-AR is best demo’d with a client I built for it (see below):
You can use another project of mine to better demo Atomic-AR. It will enter random ATOM entries into Atom Hopper every few seconds and will allow Atomic-AR to demonstrate how you can pull ATOM entries from Atom Hopper in almost real-time. The project is located here on GitHub. It’s pretty easy to work with and can be loaded with Netbeans 7 easily.
Atomic and Atomic-AR show only a small sample of what is possible with Atom Pub servers like Atom Hopper. These projects can be modified to however you want. If you do something cool drop me note in the comments below! I wish I would’ve had more time to work on this project as there was plenty of things I wanted to add, refactor, etc.