Monday, August 27, 2007

Atom Service Directory

I re-read some of the Atom specifications on a plane today.

I haven't been as excited about a data format since creating a mostly proprietary, but somewhat based on ACORD one at a Canadian insurance company in 1999-2000.

I still have a lot to learn about ATOM, but it seems to address all of the pain points I have seen in integration data formats so I'm optimistic.

I obviously can't be the first one to think of it, but wouldn't Atom / AtomPub make a nice simple Service Directory (think UDDI, but with legs)? Just a feed with entries for each service instance? Categrories and other meta data? You could dynamically register services via AtomPub - perhaps services would have to re-register every so often. Is there something like this already?

I also looked back at some of the blogosphere spaz-outs regarding Atom yesterday. I have more to learn, but perhaps it is best that Atom get's a head of steam before embrace and extend sets in anyway.

Here's to hoping that Atom stays simple - seems to be a beautiful format.

3 comments:

Erik Onnen said...

So, when I fire-up service A and want to publish that to directory D, how does directory D store the state that service A exists so that it can serve A to clients that ask for instances of D? When A is no longer available due to a crash, how does D know to remove A?

I'm a bit lost here, but ATOM seems like a format spec to me and not a service spec like Jini or Bonjour.

asbjornu said...

Firstly, Atom is not an acronym, so it only has one capital letter; the 'A'. ;-) Secondly, if anything in the Atom ecosystem can provide this functionality, it's not the format itself, but AtomPub. The Atom format can possibly be used, but you'll probably need extension elements and attributes to get the right message across to the service subscribers.

I'm not sure this is a good idea, however. I don't think we've even seen a fraction of use cases AtomPub can plumb, and I think you can stretch it pretty far. I think I'd need to see a concrete implementation proposal (details) before I can make up my mind about it.

fuzzy said...

Erik, em ... it certainly isn't a Bonjour, but it may be good enough.

What I was thinking is that service A would just do a PUT (follow semantics of AtomPub) do directory D. directory D could be behind a load balancer and really be several web servers.

Behind the web servers would be Apache Abdera or what-have-you. It would just update the feed.

As far as when A crashes, dunno, maybe that is acceptable since you'd have more than one instance of the service - it may just be on the client to try another option (poor man's fail over generally works this way). Or if you wanted to get fancy, I suppose you could have a nanny process that would periodically read the feed and ping each service. If not there, it would use AtomPub to update the feed. Or services would have to re-register every so often to keep the directory informed of their presence.

For all I know this is a dumb idea. Just part of me learning Atom and considering usages. I keep coming up with new ideas.