Live data from Hacker News

Experimenting with HHVM at Etsy

codeascraft.com

11–20 of 39 posts

Re: Experimenting with HHVM at Etsy

#11
post #7

Earlier quoted context omitted.

HHVM is just a PHP JIT compiler. It's not a different language. That is Hack.

I wasn't clear enough I now realize in my post, I meant supporting Hack language that comes with HHVM (type annotations etc) in PHP Storm

But those are two things. You can move to HHVM and not use Hack.

Re: Experimenting with HHVM at Etsy

#12
The new stuff happening in the PHP space is really really awesome.

HHVM + HACK + XHP is an entirely different experience compared to writing PHP. Code can actually be very clean and lots of bugs can be found that may have previously gone unnoticed + performance benefits.

Just wanted to say FB is doing an exceptional job with these projects.

Re: Experimenting with HHVM at Etsy

#13

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.

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 :)

Re: Experimenting with HHVM at Etsy

#14

Earlier quoted context omitted.

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.

Re: Experimenting with HHVM at Etsy

#16
This is great. After being one of the early contributors to documentation and clearing up the (admittedly ridiculous) on-ramping guides for what was then HipHopPHP, I'm really happy to see it get more traction. I deploy it in production for a webapp that is more or less simple CRUD on the outside but does some relatively expensive scheduled batch processing of number crunching. The differences are huge and allow me to keep it to a single - albeit big - dedicated machine.

It's come a long way and I'm excited to see further improvements.

Re: Experimenting with HHVM at Etsy

#17
Shameless self promotion: I wrote hussar[0], a tool that uses HHVM for PHP static analysis in projects that can't run HHVM directly. Etsy says "getting [their] code to run on HHVM was relatively easy", but my experience has been the opposite. Previous discussion on HN here: https://news.ycombinator.com/item?id=9071854

[0]: https://github.com/wayfair/hussar

Re: Experimenting with HHVM at Etsy

#18

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.

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 th…

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.

Re: Experimenting with HHVM at Etsy

#19
I guess the question I've been having is that if I want to begin a new project with performance as a main priority, should I use HHVM+PHP or HHVM+Hack over something like Java or Go, or is it more for making existing PHP codebases more performant.

Re: Experimenting with HHVM at Etsy

#20

I guess the question I've been having is that if I want to begin a new project with performance as a main priority, should I use HHVM+PHP or HHVM+Hack over something like Java or Go, or is it more for making existing PHP codebases more performant.

Go or Java is still faster than HHVM/PHP7. I'm writing my new project (Magento Go (wordplay) ;-) ) in GoLang.
Post reply on HN