8 ms·
Author here, I have used both Node and Ruby fairly extensibly. I think I touched upon Ruby's performance issues in the post. That's why I don't consider Ruby a
by vegancap 11y ago
Author here, I have used both Node and Ruby fairly extensibly. I think I touched upon Ruby's performance issues in the post. That's why I don't consider Ruby a solid solution. Also, as far as I'm aware, Ruby doesn't have built in concurrency like Go does. Yes, Nodejs is close to being concurrent, but it really doesn't hold a candle to Go. Yes Node has socket.io, something I've used a lot and love. But Go has all of those features natively.
- ocean3 11y agoHave you tried Elixir/Phoenix framework?
- vegancap 11y agoNot yet, I've got as far as reading the Elixir docs start to back, I really enjoyed what I saw, I'm yet to have a play around with it though. I'm hoping to this weekend :)
- commentzorro 11y agoI looked at it a while back. Even played around with Elixir, which I liked as a language quite a lot. But the deployment and configuration for Elixir/Phoenix/Ecto was pretty horrendous. Lots of dependencies, lots of tweaking, I think even NPM was required too?! I do have fun bashing Go, but I also use it. It's too practical not to. And the Go team, above all other of the latest wave of language that are ready for production, got that 100% right. I just can't overstate how simple Go makes setup, deployment, and updates. And how complex Elixir is in comparison. I wish Elixir et al. could have a zero dependency, zero external configuration, and single/xcopy file deployment too.
- ocean3 11y agoUsing exrm its a very simple setup. You get a deployable tar file which gives you the ability to migrate up and down as well. The only issue i have is wrt to running migrations on deploy server. Go is very good for services. But i didn't find any mature libraries like Phoenix.
- commentzorro 11y agoExrm looks good for updating an already established application. Doesn't look like it does anything for the initial setup and configuration of a new system though. For me, the ultimate test is can I copy my application to a flash drive, walk it to a new clean system, and "paste" it to that new system. Go really does let me do that. > But i didn't find any mature libraries like Phoenix. Yup. But then I tend not to need larger frameworks with my Go apps. Like you allude to, Go apps tend to be less monolithic.
- IanCal 11y ago> For me, the ultimate test is can I copy my application to a flash drive, walk it to a new clean system, and "paste" it to that new system. Go really does let me do that. That used to be the case for erlang deployments that looked pretty similar, and Exrm looks like it does the same thing: https://hexdocs.pm/exrm/extra-deployment.html https://hexdocs.pm/exrm/extra-deployment.html There are five stages to creating and deploying a first release. The first is just generating it, the next three are for moving the release to a new place and the third is just decompressing it. Live upgrades/downgrades seem pretty similar: https://hexdocs.pm/exrm/extra-upgrades-and-downgrades.html https://hexdocs.pm/exrm/extra-upgrades-and-downgrades.html
- commentzorro 11y agoClearly I'm not as up to speed as I might be. How do I avoid installing and configuring Erlang, Elixir, Phoenix, etc. on each machine I want to "paste" to? How do I bundle all these into one extract and go package?
- pjmlp 11y agoWhat about Java and .NET stacks? They do everything that Go does and more. We are also web developers on those stacks.
- IshKebab 11y agoI don't know about .NET, but Java definitely suffers from the enterprise verbosity problem (no it still hasn't gone away). I mean, tell me the equivalent Java code to this: resp, err := http.Post("http://example.com/upload", "image/jpeg", &buf) I think that would be about 20 lines in Java. You've got to make a `HttpUrlConnection`, then call `setDoInput(true)` (or is that `setDoOutput(true)`), wrap it in a `try`, etc. etc. etc. Go's standard library is amazing.
- pjmlp 11y ago> I think that would be about 20 lines in Java. You've got to make a `HttpUrlConnection`, then call `setDoInput(true)` (or is that `setDoOutput(true)`), wrap it in a `try`, etc. etc. etc. Nothing prevents you to wrap those 20 lines in a generic method. Also there are other options in Clojure, Scala, Kotlin, Groovy besides pure JDK API calls. Here Scala style, easy to mimic in Java 8 val result = http.postData("http://example.comupload").header("Content-Type", "image/jpeg").responseCode > Go's standard library is amazing. So amazing that is doesn't have proper database drivers for the SQL databases that matter.
- tinco 11y agoI recently rewrote one of our services in Go and there was a SQL interface in the standard library with backends for all SQL databases that matter. I don't remember if the backend we used (for PG) was from the community or the standard library, but that's rather inconsequential.
- pjmlp 11y agoFor our customers that means Oracle, SQL Server, Informix, DB2,... from the database vendors themselves. Not community projects that kind of work.
- codygman 11y agoDid you try jruby? Makes things much faster.
- goldbrick 11y agoIn my experience when a project makes the decision to switch to jRuby it's time to think about breaking parts of it into another language, you end up having to write Java in Ruby and subjecting yourself to the worst of both.
- byroot 11y ago> Ruby doesn't have built in concurrency like Go does Seriously. Pretty much all languages have support for concurrency via threads. Ruby even have the equivalent of channels since a decade: http://ruby-doc.org/core-2.2.0/Queue.html http://ruby-doc.org/core-2.2.0/Queue.html Now if you meant to talk about the GIL, well it prevent parallelism only for purely CPU bound tasks. And in the context of a web app, if I have a CPU bound tasks that I can just fire and forget, I don't want to execute it on my frontend server anyway.
- rakoo 11y ago> > Ruby doesn't have built in concurrency like Go does > Seriously. Pretty much all languages have support for concurrency via threads. You missed the most important point: like Go does
- goldbrick 11y agoSorry, your definition of "concurrent" is all over the place. Ruby doesn't have "built in concurrency"? Ruby has fully native threads; it just has the GIL that blocks for IO (but you could use jRuby). It gives you several options for message passing. You also have the extremely under-rated dRuby system. Not to mention the whole EventMachine world. Node is "close" to concurrent? It's god damn single-threaded! At the very least it's possible to spawn multiple processes and communicate over a Unix socket, good luck doing something like that with PHP. What does socket.io have to do with anything? Sorry man, I'm hearing a lot of cargo cult opinions and precious little data to back it up.