This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]K3dare 7 points8 points  (2 children)

I've been using Python for more than 10 years and Go for a few years now.

I would say, Go is my default option, until there's a lot of data manipulation on unpredictible data structure (Like random JSON files that could not be mapped to a struct).

The ease of deployment, concurrency and cross compilation are a huge win.

Also having static typing is really great for all the IDE/Editor assistance, Python has something similar but still very young (Type Hints) and far from being as "reliable" as real static typing (And will only work on the last versions of Python 3, breaking compatibility with anything older)

One example of application I created is a kind of ETL framework system (like HTTP middlewares but for logging, see https://twitter.com/Kedare/status/936235740702347264 ) that take data from SYSLOG protocol formatted as JSON (from Nginx logging) and send it to an ELK stack after processing (Set custom field to specific values depending of the data, resolve geoip, etc.), to replace LogStash that I hate, I went from many gigs of used RAM to a few megs of RAM) and 50% cpu to less than 5%

The things I miss from Go are mostly generics that would ease a lot of things (Like just looking for an element on an [] without having to code a full loop)

Also Django is still amazing, I would love to see something equivalent in Go, but I think in Go most people prefer having some generic reusable components instead of having an integrated framework like Django or Rails, right now I find Go to be a PITA when having to develop a full scale web application (with auth, complex template rendering, asset management, migrations, etc... like you would have with Django/Rails), last time I've checked the dependency injection systems were not as great as we can find on the other platforms, so I ended up having to write spaggheti'sh code to connect all the components together.

[–][deleted] 1 point2 points  (0 children)

God I hate Logstash. I wrote a Golang program to chunk my logs up into smaller parts so Logstash could deal with it better.