The following is not an attempt to convince anyone that one technology is better than the other, instead I like to explore the strong points of eac...
For further actions, you may consider blocking this person and/or reporting abuse
Good read, thank you for taking the time to write it and link to different sources. I totally agree with the point of there is no right or wrong answer and its totally dependant on the software and priorities.
Have you tried the tools which compile a node program into a binary? i.e. which package Node and your program into a single executable? For example, github.com/zeit/pkg It does not solve the size problem (about 45 Mb, in my case) and the startup time. But it might be easier to distribute.
Yes, pkg is great! Good that you mention it!
In rust you could use
I agree and I also took the same path. Writing node apps and realized that Go is a good complementary language, I see them playing well together as in keeping the most business logic in JS and the fast ops in Go.
Quick question, how can you tell how much memory each process uses? And why do you think Node uses so much more memory in this case?
Easiest way to see the resource usage of a process is to open Activity Monitor on Mac or Task Manager on Windows.
The memory usage of Node.js is surprising low if you think about how much the environment is doing for you. The runtime translates your code to actual machine code on the fly and while your program is running, it is still being analyzed and optimized so that hot code paths become more efficient and so on.
Everything you have with a compiled language like Go in the separate build step, the VM in a language like JavaScript is doing for you at runtime.
Hope this helps a bit. If you are interested there are many interesting talks and articles about the internals of JavaScript (and other) engines, for example this one: youtube.com/watch?v=p-iiEDtpy6I
You should use an alpine version of the node docker base image, it will be way lighter. Maybe github.com/mhart/alpine-node
Yes, I mentioned that above already. You only need to be aware of all the gotcha that come with not using a full blown distro like Debian or Ubuntu.
What are these gotchas?
I do like alpine and recommend everyone giving it a try, but if people already have a complicated setup running on another system, it will be a lot of work to port it. You need to find out how to install all the dependencies you are using, deal with differing versions and varying configuration files. And there will be hard to figure out little differences when you - for example - need to compile some C dependency and can't figure out why it's not working with the C toolchain on that system.
Still, give it a try, maybe you don't have any problems with your setup. Docker image size is also not such a big problem if you use a lot of the same images and they can be reused.
More interesting thoughts on which images you want to choose: derickbailey.com/2017/05/31/how-a-...
Technically, you can have 'threads' in node.js like github.com/andywer/threads.js or github.com/audreyt/node-webworker-...
Now imho, if you want to do an experiment regarding performance and test something else than node, you can try kotlin since it has decent JS interop kotlinlang.org/docs/reference/js-i...
Does Go have an IDE comparable to those of NET/Java ecosystems?
If you like IDEs, Goland by JetBrains is pretty good. jetbrains.com/go
But Editor Integration is also good with Go. Many people like to use Visual Studio Code. A lot of Go users are using Vim too.
i think there is a project called Nexus.js now that use threads. Maybe you ever compare it with Go? Great article by the way.
Thanks, Nexus looks interesting! Let's see how it goes. Seems to be still pretty new.
It's pretty efficient, but it has to pause the program a bit. In all but the most extreme cases you won't notice the break through.
They even parallelize GC.