I’m just starting my journey to Golang (or GoLand, ) and I would like the to hear from more experienced guys about how to proceed.
The thing is, I have five applications programmed in C. I would like to port those application to Go, but I have some issues with flash (HD) space.
My question is … should I make five Go applications and run them as five separate OS processes? that way each Go binary will have its own “whole Go underlying machine”. Or should I make just one Go application and make them all concurrent inside Go so that all-in-one Go application will end up consuming less flash memory since the “whole Go underlying machine” will be shared?
Well, today, in C, they are kind related, not completely … so that’s why they are five separate programs, but my question was more directed to the issue I have with my limited flash memory size.
Actually I think I was not clear on what I had in mind and after some days of research I think I reached a conclusion.
Please, just tell me if the following make sense:
Every Go application has a “runtime code” that ends up included in the final binary. So that counts for the ended size of this binary. If I have five Go binaries, all of them will count five times for the space they consume on my flash (Hard Disk). So if I only think in terms of flash consumption, I’ll better stick to only one binary with five features. Mathematically it would go like this:
Let’s imagine that each feature takes 1MByte and that the Go runtime code takes 2M, so:
Five binaries would take: (2MB+1MB)5 = 15MB
One binary with five features: 2MB + (1MB5) = 7MB