Moving from PHP to Go and Microservices
blog.arduino.cc
blog.arduino.cc
You re-wrote your entire REST API in a new language without first understanding where your performance issues were?
What's funny is how much more exciting Arduino itself is, compared to all this.
If that's legitimately your opinion on that topic then I suggest you expand your knowledge.
NoSQL databases aren't slot in replacement for SQL databases. However, for what they're good at they're REALLY good at it. Namely highly scalable, Document Storage (or "blobs"), and incredibly low latency reads.
Keep in mind that NoSQL doesn't mean schemaless. You can have a schema and be NoSQL, and that is the direction most NoSQL databases are moving into (or have moved into).
So, If my knowledge were expanded I would think NoSQL is an equally valid option, and not a worse one? I hesitate to do any more expansion because of this panel held in 2014 [0] asking weather we are in a big data bubble, and probably answering "yes", but I wasn't there.
Simple query language is REALLY good too. It has a kind of general usefulness.
> Keep in mind that NoSQL doesn't mean schemaless. You can have a schema and be NoSQL
Can you also have SQL and be NoSQL?
[0] http://people.csail.mit.edu/tatbul/publications/sigmod14_pan...
For some things NoSQL would be a better option. For most things SQL remains the better option.
> I hesitate to do any more expansion because of this panel held in 2014 [0] asking weather we are in a big data bubble, and probably answering "yes", but I wasn't there.
We were in a dot-com bubble around 97-2000, maybe the internet is a bad idea also?
> Can you also have SQL and be NoSQL?
By definition, no. But some NoSQL databases do support an alternative to SQL with some of SQL's properties (e.g. JSON-like syntax).
This is all just tech hipsterism.
Thank you! I have been looking for the right words to describe this for ages. You nailed it.
And now I still don't know why.
Maybe I'm dead wrong but for me this is yet another case of pure tech fashionismo.
But that's for small hobby projects, where the developer team is usually just me. For a large project, there should be some serious advantages to Go over PHP in their use cases. Don't get me wrong, I think Go is a better language to write websites in than PHP, but I am also a pragmatist.
According to half the comments here and on every other Go-related HN post that makes me a hipster, fashionista, hype-driven sheepdev.
If this had been a post about Arduino.cc being unhappy about performance and refactoring their code in an attempt to improve that, nobody would be batting an eye. But since they decided to refactor with Go, suddenly everyone is asking "why?"
Using fashionable tech X is not bad on its own. But without the "why" we have no clue what the author's reasons for the given choices are, and how the end results align with the initial reasons.
Lots of small businesses have driven themselves off a cliff basing their tech choices on what their employees would "enjoy" most. It's a good reason to code Go in your free time, but not to migrate a company's infrastructure to it.
It's very strange to see that you wouldn't want to know "why". Maybe you're smarter than all of us.
Go is sufficiently mature enough that those questions need not be asked any longer. Docker is built on it, Google's Vitess database sharding system (which powers YouTube, of all things) is built on it. Nobody is at risk of "driving themselves off a cliff" for choosing Go, provided they are proficient enough with it.
I haven't seen any other language get as much hate as Go does on this site.
We should be ready to have these technical discussions and encourage them, not be so strangely defensive about it as you seem to be.
And I do love technical discussions around Go vs any of those or other languages, or indeed even discussions having nothing to do with Go, but I'm tired of all of the hateful comments Go developers get.
If I seem defensive it's because I am constantly put on the defensive.
The only one framing the debate so negatively here is you. As a fan of "Go" you should be taking the opportunity to educate people about it.
Instead, I'm left with a bad taste in my mouth. Let's hope this mood is not representative of the Go community.
"hipsterism" - https://news.ycombinator.com/item?id=9394483
"pure tech fashionismo" - https://news.ycombinator.com/item?id=9394119
"Hype Driven Development" - https://news.ycombinator.com/item?id=9394371
These are the comments driving my responses which are negatively addressing the developer's choice of language, and those are only the ones on this thread. I'm sick of Hacker News trying to make developers feel guilty for using a technology.
I have not argued against anyone asking "why" in regards to what language they feel is best suited to the task at hand. Obviously that question needs asked for any project. I am arguing against everyone whose instant response to "we built X in Go" with "oh god why would you do that" types of "why". There is a distinction in those whys, and if you cannot or will not recognize that distinction then that is your own failing.
I am not involved with or representative of the Go community. I represent only myself.
If you use something else and decided to switch to one of those languages, someone might well ask why. Rewriting is almost always a decision that needs some justification.
People ask "why?" about conversions to those languages all the time (if you converted a web project from PHP to C/C++, I'd expect you'd get more "why?" questions than doing the same thing from PHP to Go.)
So... just so I can get the chain of thought, here:
* the language has growing for a while
* people have used it to ship something
Therefore, no more need to ask questions -- just switch to it!> I haven't seen any other language get as much hate as Go does on this site.
Given the amount of criticism PHP and JavaScript get on this site, this statement is simply indefensible.
And a lot of the criticism Go gets is concrete and a direct result of choices the language designers consciously made.
Well, sure, if you want to twist my words then go ahead.
What I said rather clearly, but seems to have been lost on you, is that questions not asked in earnest but in flippant disregard for the developer's choices are not welcome.
And my statement on the hate Go gets is certainly defensible. I never questioned the criticisms, I'm not here to say Go is perfect, only to rail against the senseless vitriol that is guaranteed to fill the comments on every Go-related link posted to Hacker News.
While not from the same people or for the same reasons, JavaScript, Dart, and Java all get plenty of hate here. Conversely, Go also gets plenty of love as well as the hate (probably more than any of JS, Dart, or Java does.)
Its high visibility in the community here, so it get lots of attention, positive and negative.
I use supervisor to start/stop my Go programs. I also use it for log rotate and to autostart my programs on a system reboot.
Basically, I have a "service" package that offers:
* mux routing
* Negroni for middleware (with stats and auth middlewares delivered out of the box)
* a centralised logger
* Rendering of things to JSON
* An idea of controllers (a controller is a web handler for a given route, handling all verbs)
* An idea of handlers on those controllers (per verb... you basically just load in your GET or POST handlers here)
* HEAD and OPTIONS for free (including automatic Allow headers)
* Error handling returns JSON throughout, including 404s, etc
* Basic filling of structs with POST'd/PUT'd JSON
The thing is fairly primitive, and it's Go idiomatic and so doesn't provide a context for the middleware and handlers, but it just allows one to rapidly say "this struct, to this controller, on this route" and the rest is for free.
This is just a starting ground though, a test of an idea. If I can package this better and have it be a little less hacky in nature I'll look to open-sourcing it. Right now it's really just testing the idea of taking all of the cross-cutting concerns and common issues and solving them via this service package I've made, with the goal of just letting us get on with writing the business logic.
I want to expand it... with better description of errors, standard schemas for arrays being returned, auto-documentation of the endpoints (perhaps Swagger, but it seems awfully monolithic in nature), etc.
For example, mailgun's https://github.com/mailgun/godebug looks very promising.
http://blog.mailgun.com/introducing-a-new-cross-platform-deb...
A debugger can make things easier, but can you effectively work without one if needed?
The type of argument you are making has been used throughout the history of computing as a reason to avoid using computers to solve problems. For literally any problem that is solvable by computers, you can make an argument about how using a computer to do it means you lose the ability to solve it by hand. From accounting to engineering to programming to administration to physics to writing, in all these areas (and more) older practitioners have bemoaned the use of computers to quickly and accurately solve problems that they have spent a lifetime mastering how to solve by hand. The reason for their opposition is pretty clear.
I don't know why this type of attitude is so prevalent among some sections of the programmer community. Programmers are the people who should most of all appreciate the ability of computers to automate tedious and error prone tasks. Yet for a certain class of easily automatable programming problems there is a group of programmers who resist very strongly the use of computers to automate. Maybe it's just the same old issue of not wanting to admit that something they spent a long time mastering isn't very useful anymore and that they are getting outcompeted in the marketplace. I think there is a bit of unpleasant machismo about it as well though; the idea that you aren't a 'real' programmer unless you eschew a certain level of automation (be that high level languages or compilers or version control or automated build systems or syntax highlighting or tools to refactor code etc).
Someone who wants a complete ecosystem before they can be effective strikes me as a problem.
Using trace? ...
Real programmers use print statements...
I write plenty of Go in my time off but professionally I write C# in Visual Studio and the debugger is amazing. It's saved me thousands of hours cumulatively over the years. I like Go a lot, but lack of a proper debugger can definitely be seen as an argument against it by someone considering the language.
And? Who said it's that better? How many died or didn't die anyway?
There is a talk scheduled on this at GopherCon 2016. Make sure you have a look at it.
Care to explain me how I'm debugging some la,guage that has no debugger?
golang.org/doc/gdb: "although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones"
I absolutely refuse to touch Java/C#/C++ without a debugger, but that's because they're a lot more "magical" - lots of layers, lots of magic, 'heavy' types.
Go is a lot more explicit about what's going. It is more verbose, yes, but you also know how things work by just looking at them.
I'd love a debugger for Go, sure, but I just don't need one.
There will be a clear migration path, including, it seems, the ability to run both 1.x and 2.x modules side by side using the new router from 1.4. This means you won't have to rewrite your 1.x modules immediately. 1.x also has a commitment from the Angular team to remain maintained for the foreseeable future.