Hacker News new | ask | show | jobs
by tunesmith 4086 days ago
bespoke endpoints sound like a good compromise, but I wonder why they stick with php for the general apis that the bespoke endpoints consume? Wouldn't they get better scalability if they moved that backend logic to something like Play, which would give you NIO on a jvm?

EDIT: Removed mention of "shared-nothing", which I misunderstood.

3 comments

Isn't shared nothing a scalable architecture?

http://en.wikipedia.org/wiki/Shared_nothing_architecture

Ok, I hadn't seen that phrase to describe that kind of architecture before, thanks. Still though, it seemed they were describing each node's "build-the-world" process as onerous. Is HHVM thread-per-request?
Yes. It's why they had problems with certain non-thread safe routines like locale.
Anything that touches our production databases, mostly sharded mysql, needs to go through our php orm.

We do have other contained infrastructure that is written in some other languages like go and scala.

I was also curious about this. If the main traffic interface is bespoke, I'm sure Esty would investigate other solutions. It would make the most sense to also experiment with Bespoke since it's just an interface that talks to other APIs, likely without any business logic and a huge codebase. It orchestrates other APIs into 'views' for the consumer so you have one consolidated endpoint.

I'd personally be curious if they experimented with Go lang for this. Low memory, fast startup, fast at run. It makes more sense to use another language for bespoke than anywhere else in their stack, at least from my limited external viewpoint that is :)

It does mean that every tool they've written to work with their stack now needs to have a Go equivalent. For some things, that'll be easy. It also means they now need people who know Go, which means any of their engineers can't just work on the code without learning.

It also means deployment will be different.

While the technology might make more sense, there's often enough reasons to not use it if you've specialized into a certain ecosystem.