Live data from Hacker News

How We Built Airbnb Holiday Cards in Five Days

nerds.airbnb.com

11–15 of 15 posts

Re: How We Built Airbnb Holiday Cards in Five Days

#12

Initial discoverability is the one thing that most SOA articles I read tend to skip over or hand-wave away which really drives me nuts. What else is there out there apart from ZooKeeper?

ZooKeeper is really the most accepted option here. It is used by many other important projects (Kafka, Storm, Hadoop) so adding it to your stack is likely to pay dividends later when you want to adopt some other cool technology that relies on it.

Doozer is the other option I've heard of that fills this role, but I don't personally know of anyone using it.

In terms of initial discoverability, services register in a designated place in ZooKeeper using an ephemeral node and then other services can find them there. You can set a "watch" on the ephemeral node to get notified if it goes away for any reason (ie. the other service or node goes down)

Re: How We Built Airbnb Holiday Cards in Five Days

#13
post #9
post #2

TL;DR: Monolithic applications (in any technical stack, not just Rails) are bad. See also: http://en.wikipedia.org/wiki/Big_ball_of_mud Extricate focused concerns (like authentication or service discovery) so they can be well-tested, well-designed, and reused in new services.

I'm curious about how exactly to go about extricating authentication, but I'm not sure where to look. Any pointers for best practices or cool patterns for this?

We have a single sign-on (Rails) application along with a client library that other apps use to integrate with it (which provides helpers for checking for accounts and roles as well as rspec helpers for writing tests that involve logging in without retesting the login/signup flow)

Re: How We Built Airbnb Holiday Cards in Five Days

#15
post #9

Earlier quoted context omitted.

I'm curious about how exactly to go about extricating authentication, but I'm not sure where to look. Any pointers for best practices or cool patterns for this?

We have a single sign-on (Rails) application along with a client library that other apps use to integrate with it (which provides helpers for checking for accounts and roles as well as rspec helpers for writing tests that involve logging in without retesting the login/signup flow)

Ah, ok. Do you think it would work okay with a distributed setup, with different apps on different servers, and so on? I'm imagining lots of RPC calls just for authorization. (Like, if the apps do defensive role checking.)
Post reply on HN