AtomServer helps serve up AtomPub

By Taylor Cowan
July 8, 2008 | Comments: 10

The most interesting development within the XML world of late is AtomPub. It abstracts the details (however simple they may be) of REST and provides them in a well specified protocol. Instead of writing home grown RESTfull web services, merely decompose your domain into collections or listings of XML blocks and let AtomPub handle the details of query, create, delete, and update. One attractive benefit is that you can bank on a plethora of AtomPub client Furthermore, many services (gdata) are sprouting up so that the domain is familiar. Connecting to an RSS feed has always been simple, now we can detach ourselves from the dark days of SOAP over-engineering and provide data to the clients who want it with ease.

So clearly I like Atom...but something has been missing. Until recently you'd be on your own in deciding how to implement the protocol. Many things are left to the particular implementation such as the URL format. The first thing to come along for Java developers was Abdera. This makes it possible to quickly write your own AtomPub server, however, it does require one to write more than a few lines of code. Having played around with Rails I could imagine that it wouldn't be too far off until we had something that made creating and binding an Atom server to a database simpler, and it's finally here in AtomServer. In their own words, "AtomServer is a generic data store implemented as a REST-ful web service." More specifically, it's a generic data store implemented as AtomPub.

I downloaded the distribution and I was able to get it running easily. If you are running cygwin you may have trouble with the classpath, which is easily remedied with cygpath in the startup script...

-classpath `cygpath -wp $CLASSPATH`

After getting the server up and running you can begin exploring two collections, dogs and cats, using Firefox. Remember it's just Atom. Browsers are happy to format the elements in a clean listing. I began to investigate how one would extend it to serve up your own data and that's where it began to get more difficult. One aspect of AtomPub is giving your clients a well regulated URL space to explore. The AtomServer team chose the following structure:


That's where the simple part ends. The cat is out of the bag on zero config (Grails, Rails)
Let's just say the Java camp hasn't completely adopted the "code by convention" style of less to no configuration. I know it may seem ironic, however, I'm no fan of XML configuration files...and you'll have to write some to customize AtomServer.

You might also be interested in:


Comparing atomserver to rails is like comparing openldap to PHP. We're talking about a piece of infrastructure here, not an application framework. As far as the cat being out of the bag, I guess the thing to say here is that mean time between zero and first app isn't the most important metric. I too have created blogging applications in Rails and then decided to use Rails in a very large enterprise project only to regret the decision in hindsight.

I've met the people responsible for Atomserver, it's a solid piece of work that is the foundation for a business that generates millions of transactions a day, I'd hate to think that someone is going to read this and think: "Well it isn't as easy to understand as Rails *shrug*"

The AtomServer to Rails comparison might be off a bit...but if we can get a Rails app connected to a table via scaffolding I'm sure the AtomServer team can do something similar. In terms of defining the URL space they've hit a home run...I'd just like to see more Java based software do away with the Spring xml configs and move towards annotations, convention, configuration via scripting (groovy), or why not just have an init bean do the config in regular old Java when the workspace boots. The way those Spring configs manifest themselves is almost using XML as a scripting language, and it's so much easier to do scripting language stuff with a scripting language. But because the project is so cool, I'll ignore that aspect and use it...and recommend it as well.

Nice article Taylor!

A also agree that AtomPub is a great idea. I think it will wonderful when all databases support AtomPub like the eXist database does today using Alex Milowski's Atom module:


I like the way that just by adding the word "atom" into the URL you in effect have an AtomPub server.

- Dan

AtomServer is receiving a fair amount of press these days. I wonder what your thoughts are on RSSBus.

Thank you!

AtomServer is receiving a fair amount of press these days. I wonder what your thoughts are on RSSBus.

Thank you!

We have been testing our new product on AtomServer and so far we have only been satisfied with what we have seen.

I have also seen some interesting implementations of AtomServer. Feel free to ping me if you want specifics.

Sorry for the double post... But check out hellowallet for a good example.

The men who succeed are the efficient few. They are the few who have the ambition and will power to develop themselves.

Great piece of content. Thank you for sharing.

Popular Topics


Or, visit our complete archives.

Recommended for You

Got a Question?