Live data from Hacker News

Program your next server in Go

talks.golang.org

1–10 of 384 posts

Re: Program your next server in Go

#2
I love Go.

It has become the default Go-To (pun intended) language for me for almost anything that needs to be small and portable.

However, I don't see myself writing a full server with it, I would still prefer a dynamic language like Ruby/Python for that and use Go for micro-services CLIs and the rest.

For example:

Our main application is Rails, it communicates with SOLR as the search index, in between the application and SOLR there's a proxy server that backups the documents onto S3 and also does Round-Robin between slaves.

One other thing is that we use Go to communicate with all external APIs of 3rd parties, the application code is rails and it communicates transparently with a Go server that fetches the data from 3rd parties and responds to the main application.

Re: Program your next server in Go

#3

I love Go. It has become the default Go-To (pun intended) language for me for almost anything that needs to be small and portable. However, I don't see myself writing a full server with it, I would still prefer a dynamic language like Ruby/Python for that and use Go for micro-services CLIs and the rest. For example: Our main application is Rails, it communicates with SOLR as the search index, in between the applicati…

Likewise. I use for set and forget services. Once a Go application has been properly tested it runs quietly like a mainframe in the corner of a datacenter.

Re: Program your next server in Go

#4

I love Go. It has become the default Go-To (pun intended) language for me for almost anything that needs to be small and portable. However, I don't see myself writing a full server with it, I would still prefer a dynamic language like Ruby/Python for that and use Go for micro-services CLIs and the rest. For example: Our main application is Rails, it communicates with SOLR as the search index, in between the applicati…

Also to add on this...

All of my lambda functions are a thin Node wrapper on top of Go applications.

The go application is simply a command line accepting JSON via stdin (from the Node wrapper). It is a Joy to test, you can run it locally/independently etc...

[Edit]: Typos fix

Re: Program your next server in Go

#6
What about debugging? This is the major pain point for me. I've tried using GDB, but...

> GDB does not understand Go programs well. The stack management, threading, and runtime contain aspects that differ enough from the execution model GDB expects that they can confuse the debugger, even when the program is compiled with gccgo. As a consequence, although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones. Moreover, it is not a priority for the Go project to address these issues, which are difficult. In short, the instructions below should be taken only as a guide to how to use GDB when it works, not as a guarantee of success.

https://golang.org/doc/gdb

Re: Program your next server in Go

#8
post #5

The only place I would want to use Go is for a server tbh. It isn't all that great for anything else imho.

It is amazing for dev tools and CLIs.

Perfect example for this is Hashicorps products, taking out Vagrant it is 100% written in Go.

Having a single executable tool that you can download and run anywhere is super powerful. You develop once and you build it for every system. It's the definition of delight to me.

Re: Program your next server in Go

#9

What about debugging? This is the major pain point for me. I've tried using GDB, but... > GDB does not understand Go programs well. The stack management, threading, and runtime contain aspects that differ enough from the execution model GDB expects that they can confuse the debugger, even when the program is compiled with gccgo. As a consequence, although GDB can be useful in some situations, it is not a reliable deb…

Visual Studio Code has a visual debugger that is close to being on-par with Chrome's JavaScript debugger, at least for me.
Post reply on HN