It is worth noting that this was pre-PHP7. Post-PHP7 the out of the box performance is similar or better to what Facebook did with the HHVM.
Re: Moving from PHP to Go and Back Again
51–60 of 281 posts
Re: Re: Moving from PHP to Go and Back Again
#52I don't know Go and I didn't use PHP very much so I'm qualified to comment only on this part: > I’ve worked with RoR, and a variety of frameworks in the Node world – and I have never had a framework project where I didn’t end up fighting the very system that was supposed to make development “easy”. This is not my experience with Rails, Django and Phoenix. Actually, I was probably fighting Rails in my very first proje…
For example, the labstack echo framework in Go is one of my favorite frameworks, it does a lot of work for me. On the downside, I can't hijack HTTP connections in the router, like for example, when I want to host something under customs domains and redirect internally to a subURL. I have to hack around the framework to do that, the solution is rather ugly. But there isn't much I can do otherwise that doesn't have various amounts of bugs.
Frameworks will always limit what you can do, period, you will have to code around them once you want to do something they don't allow out of the box.
On the other hand, the less the framework does for you, the less limiting it is but in the same moment it also does less work for you.
Re: Re: Moving from PHP to Go and Back Again
#53Earlier quoted context omitted.
He is correct though, at least from the perspective of Go's own designers? Wasn't "systems language" removed from the description at some point. I've listened to interviews with Rob Pike who even outright said they got the messaging wrong there. I think it's pretty well accepted that no systems language has GC. Go is on the same abstraction layer as Java/C#. Everything in text can be taken as a slight, and to ensure…
Java has been used as the implementation language for games, high performance servers, message queuing systems, operating systems, and operating embedded devices for goodness sake. It doesn't get much more "systems-y" than that. Go is surely at least as suitable for these uses. I think the other commenter is correct: it seems like a semantics argument, and a rather pointless one at that.
Re: Re: Moving from PHP to Go and Back Again
#54Earlier quoted context omitted.
Go's "runtime" is just a library. Programs are still compiled to native machine code.
I think you are confusing the language runtime with the Go "runtime" package that provides an API to the Go runtime. Golang runtime is basically a program, that is running whenever your Go application is running. As a programmer, you do not have full control over the language runtime. It runs things like garbage collection, and serializes/deserializes data in the channels. True system languages like C do not have a r…
Re: Re: Moving from PHP to Go and Back Again
#55Earlier quoted context omitted.
> And yet we keep writing Go. What are the alternatives if you want something with type checking? Java? No, thanks. Haskel? Where are the libraries? C/C++? I guess Typescript is the only alternative
Kotlin.
Re: Re: Moving from PHP to Go and Back Again
#56Re: Re: Moving from PHP to Go and Back Again
#57Re: Re: Moving from PHP to Go and Back Again
#58Also one should not forget that a company with 1000s of engineers is probably not you (yet); when you read that some company runs successfully on Node and saves $n amount of money by using it etc; when they have 1000s of engineers and devops on top of that it doesn't mean you can achieve the same (or any) success with it with 2 people. PHP for instance might be a much better choice with a small team; you don't need complex server setup, you don't need (or can handle) middle of the night alerts that require you to dive in vs just reboot the server etc.
Re: Re: Moving from PHP to Go and Back Again
#59It's not a good start when you have to resort to gifs ridiculing the other article.
Re: Re: Moving from PHP to Go and Back Again
#60I don't think it was a very wise decision because not only are you doing things twice, you're doing it three times, because you have to serialize/deserialize to/from Thrift for every request. It adds development time, more tests, and Thrift's binary protocol makes debugging RPC almost impossible.
This isn't really an argument for/against Go, but it just shows that you should try to avoid using multiple codebases that have to be tightly integrated. Personally, I would've gone with a Ruby-only codebase that used Thrift RPC only if there was some backend task that was too slow in Ruby, and that Go's concurrency and speed might be better at. Then I'd serialize it and send it over to be processed by a better language. I wouldn't do it for every request.
That being said, if I had the choice between writing an API in Go vs Rails, I would do it in Rails for the faster iterative development speed and quick debugging capabilities that is made possible by an interpreted language.