What is an AtomServer ?
I had the opportunity to work with the ATOM protocol in detail recently. One of the products related to ATOM that I stumbled across is the AtomServer. If you dont already know it, ATOM is accompanied by a publishing protocol. Its called ATOMPub in short. Unlike RSS this protocol allows you to perform CRUD operations on the entries that you define under a feed.
What does that mean ? For example, you could have an entry in a feed which you wish to edit. You can edit / remove this entry using PUT / DELETE HTTP requests to an appropriate URL hosted by a server. So this protocol allows a user to interact with the feed (among other things. The ATOM XML format can be extended).
So what does the ATOMServer do and where does it fit in here ? The ATOMServer provides a RESTful interface and a RDBMS that stores the entries that the user interacts with. A user may wish to store 10 entries in a feed and then later retrieve and edit them as needed. To do this in an ATOM server the following operations would be invoked
- 10 PUT / POST requests to store the entries
- A GET operation to retrieve the entry.
- A few PUT requests to edit existing entries
You can go through the protocol basics . The Google GData API uses ATOMPub as the protocol to talk to various services such as Blogger / Google spreadsheet / Youtube etc etc. Whether they use an ATOMServer like product behind the scenes is debatable. The ATOMServer is by itself made up of pluggable components. You could easily replace the RDBMS store with a custom store of your own for example.
So where is an ATOMServer useful ? If you have existing services that need to be Atom enabled, the ATOMServer can provide the framework necessary to accomplish that. The ATOMServer can act as a layer that serves feed readers. The results for a feed can initially be fetched from an external source, such as an existing API or a file.
A search query that needs to refresh a feed every 30 minutes for example can be integrated with an ATOMServer. On the first call the search results would be fetched and stored into the ATOMServer DB. All subsequent feed reader calls to the ATOMServer for the next 30 minutes can be configured to get the cached data from the DB instead of the search query (A little coding into the ATOMServer framework would be required ). It is a simple use case and I am sure many more exist.
Another way to integrate ATOM into your APIs / services is to use Apache Abdera. Abdera provides APIs that can generate ATOM XMLs. The ATOMServer is by itself built on top of Abdera. So if you need more flexibility you can go ahead and use Abdera directly.