3 ms·
I use the two Heroku tools `foreman` and `heroku` regularly. I've recently switched to their Go alternatives, and for one thing, the speed has improved[1]. How
by pearkes 13y ago
I use the two Heroku tools `foreman` and `heroku` regularly. I've recently switched to their Go alternatives, and for one thing, the speed has improved[1].
However, the Heroku client is mostly network bound (communicating with their API), and on an average connection this speedup hardly matters.
I wonder what the other benefits will be?
[1]
$ time heroku help
real 0m0.409s
user 0m0.146s
sys 0m0.036s
$ time hk help
real 0m0.008s
user 0m0.003s
sys 0m0.004s
$ time foreman run echo hello
real 0m2.062s
user 0m0.199s
sys 0m0.100s
$ time forego run echo hello
real 0m0.886s
user 0m0.205s
sys 0m0.097s
- mitchellh 13y agoThe benefit would be EASY cross platform support. From experience building Vagrant installers: it's a pain in the butt. Shipping a single binary client would probably simplify things greatly.
- ddollar 13y agoThere are two reasons I rewrote Foreman in Go. You hit one of them square on the head. A single binary with no dependencies that can be cross-compiled on a Heroku dyno makes things much simpler. Foreman was originally written in Ruby which ideally means it runs on any machine with a Ruby interpreter. When you get down to it, though, the differences in fork/exec between Ruby 1.8, 1.9, JRuby, Rubinius, etc make this a nightmare scenario of a different sort. If you go to https://gobuild.herokuapp.com/ddollar/forego/master/darwin/amd64 https://gobuild.herokuapp.com/ddollar/forego/master/darwin/a... you get a working program as a single binary in one step. Using bsdiff I can even ship binary diffs for fast upgrades (this is how `foreman update` works in the new version) Oh and as a side effect the new Foreman is quite a lot faster to start up (Rubygems initialization is sloooooow)
- warmwaffles 13y agoI had no clue `forego` was actually available. This is incredible.
- kungfooguru 13y agoYes! I love this way more than any speed upgrade. When is Vagrant being redone in Go ;)