5 ms·
Towards the end of the article there seems to be a confusion between servers and web servers. Yes, Go is nice for writing servers, no, web servers aren't the on
by jgrahamc 12y ago
Towards the end of the article there seems to be a confusion between servers and web servers. Yes, Go is nice for writing servers, no, web servers aren't the only things out there doing 'serving' in systems-land.
Three examples from CloudFlare all written in Go:
1. Our Internet compression/optimization technology called Railgun
2. Our DNS server
3. Our CA infrastructure
All are networked, all are highly concurrent.
Also, our entire logging and analysis infrastructure is being migrated to Go.
PS Forgot that we also recently rewrote the code that does image compression (using C tools) in Go as well. Here the Go code is working as a job server.
- ironchef 12y ago"Also, our entire logging and analysis infrastructure is being migrated to Go." This intrigues me. I've been moving a lot of ETL into Go (as it's pretty well suited to this), but I still end up doing a lot of the analytics in Spark (for bigger work) or Pandas or R (for smaller bits of data). What are you guys planning on doing for the analytics? Or is it more of straight up time series work (so you can use influx + whatever). Just curious and keep up the good work :)
- jgrahamc 12y agoSince I'm not actually involved in that project I'm going to defer answering until we write a detailed blog post. Also, if you are interested in a job...
- voidlogic 12y ago"Also, our entire logging and analysis infrastructure is being migrated to Go." This intrigues me.... Go is great for this kind of stuff. Spark is great when you have a lot of custom queries, but if you have a few fixed queries writing a simple solution in Go have have huge gains. I worked to implement a web service + simple map reduce (with network transparency) + a time series DB (storage engine too, NOT using levelDB like influx) all in Go and the result was it is many times faster than an order of magnitude larger hadoop cluster, BigQuery, etc for the limited operations it supports.
- jobquestion123 12y agoDid you use a framework to run mapreduce with go or did you roll your own?
- voidlogic 12y agoWe wrote our own, Go 1.0 had just come out.
- alfor 12y agoIt seems that you have the canonical type of use case for Go. Server systems for thousands of customer and huge number of requests. Python became a jack of all trade where concurrency and performance is not the main focus.
- dubcanada 12y agoIs the Lua stuff going away? What are your opinions of Go vs Lua?
- deleted 12y ago[deleted]
- jgrahamc 12y agoNope. No need to throw away the Lua. We're moving more and more to a combination of C-based (nginx) for core serving, Lua-based for logic and Go for services.
- jamra 12y agoIt looks like the author found the worst use case for Go in comparison to a library that Python absolutely soars in and uses that as a basis for this argument. Go does not have something as nice as numpy. For numeric computing, by all means use Python. He then makes some crazy statements about operator overloading as if that is the essence of a good language. I disagree. I don't want operator overloading. I almost never used operator overloading in C# or Java. Maybe that's just me, but it's certainly not a reason to avoid a language. The crux of his argument is that C++ users who switched to Java years ago are the types of programmers that Go wished to convert. He neglects to mention deployment. He neglects to mention stability in runtime. He neglects to mention any low level meddling that you have to do in compression. The examples you posted are exactly the kind of things that Go soars in. It's very convenient to leave them out while beating your chest about how your language is a superior language because it is superior in a very specific niche.
- S4M 12y ago> I almost never used operator overloading in C# or Java. Dude, you can't overload operators in Java. You can overload methods of a class, but not operators. Operator overloading means that you can overload '+' for example for your particular class, which would enable you to write code like (in Java): Matrix a = zeroMatrix(4,4); Matrix b = identityMatrix(4,4); Matrix c = a+b; You can't do that, so you would have to write: Matrix c= a.add(b); Which makes your code verbose and makes Java (and Go) painful for doing numerical analysis.
- nordsieck 12y agoIt's important to note that numerical calculation is a domain particularly suited to operator overloading simply because the underlying domain (math) already uses operator overloading heavily (e.g. multiplication means something different when done on scalars and vectors, but in both cases it is well defined and in common usage).
- Someone 12y agoYou should leave out the 'overloading': - Math (and it's very close relative logic) are the only domains that use operators, period. - other domains use overloading; homonyms are very common.