Live data from Hacker News

Show HN: A simple Go web server with logging, tracing, health check

gist.github.com

41–50 of 97 posts

Re: Show HN: A simple Go web server with logging, tracing, health check

#42

Earlier quoted context omitted.

Hi chrisper, you are right! This is just a reminder for me on how to do those things when I start a new app in Go, instead of always google for them.

I like how you, as the owner of the repo and poster, agreed with me, yet I got -3 points...

[deleted]

Re: Show HN: A simple Go web server with logging, tracing, health check

#43
post #40
post #34

This reminds me of an ongoing discussion I was having with friends about Golang web frameworks -- one side of the argument is that you can achieve so much with the standard library that frameworks are "unnecessary", but folk like me want an ORM(ish) layer and some kind of back-office scaffolding. https://beego.me and https://iris-go.com are nice, but we (all) have (as yet) to find a Django-like framework that comes w…

I regularly go down this road with go. My conclusion is that it's never going to suit that use case. I'm not even sure it's not technically doable (i think introspection and interface{} can go quite far), but it's just culturally opposed to this kind of project. People like go for its minimalist approach. Not in the sense that you don't have a lot of code to write, but more in the sense that you are in control of eve…

I understand that, which is why I said "ORM(ish)". But a back-office scaffolding would go a long way to move some of us off of Django.

Re: Show HN: A simple Go web server with logging, tracing, health check

#44
post #36
post #34

This reminds me of an ongoing discussion I was having with friends about Golang web frameworks -- one side of the argument is that you can achieve so much with the standard library that frameworks are "unnecessary", but folk like me want an ORM(ish) layer and some kind of back-office scaffolding. https://beego.me and https://iris-go.com are nice, but we (all) have (as yet) to find a Django-like framework that comes w…

Iris is a poorly maintained project that I would not recommend for production use. See the drama unfold at https://www.reddit.com/r/golang/comments/57w79c/why_you_real... and https://www.reddit.com/r/golang/comments/57tmp1/why_you_shou...

Well, it _seemed_ nice. Regardless, I'm a bit more concerned with back-office scaffoldings myself. Any pointers?

Re: Show HN: A simple Go web server with logging, tracing, health check

#45
post #43
post #40

Earlier quoted context omitted.

I regularly go down this road with go. My conclusion is that it's never going to suit that use case. I'm not even sure it's not technically doable (i think introspection and interface{} can go quite far), but it's just culturally opposed to this kind of project. People like go for its minimalist approach. Not in the sense that you don't have a lot of code to write, but more in the sense that you are in control of eve…

I understand that, which is why I said "ORM(ish)". But a back-office scaffolding would go a long way to move some of us off of Django.

Why do you want to move off of Django?

Re: Show HN: A simple Go web server with logging, tracing, health check

#46
post #45
post #43

Earlier quoted context omitted.

I understand that, which is why I said "ORM(ish)". But a back-office scaffolding would go a long way to move some of us off of Django.

Why do you want to move off of Django?

Because we're all using Go for other projects (even if piecemeal) and would like to build the entire project in a single language.

Re: Show HN: A simple Go web server with logging, tracing, health check

#47
post #38

Here's a quick attempt at the same thing in Java (although note that the command line format is different): https://gist.github.com/tomwhoiscontrary/b4888b86057c74a636c... The main takeaway is that the JDK's built-in web server is poor: * There is no way to configure timeouts * Filters have to be added to each handler separately, by mucking with its filter list * Filters have to extend an abstract class with two meth…

Hi twic, thanks for sharing this! I love to see implementation in other languages. I'm particularly interested in Rust, it would be awesome if anyone can make a attempt! :)

Re: Show HN: A simple Go web server with logging, tracing, health check

#48

It's a nice reference program to show you what's going on. I build stuff like this for a living. I'd recommend not re-inventing the wheel yourself and using a nice web framework, like Echo ( https://github.com/labstack/echo ) or Gin ( https://github.com/gin-gonic/gin ). I prefer Echo due to a cleaner, mockable design, but they're equivalent. You can throw up that web server in 1/10 the code to do the same thing, and…

I also build stuff like this for a living and I tend to avoid frameworks :)

I don't care for Gin. I'll take a look at Echo.

Re: Show HN: A simple Go web server with logging, tracing, health check

#49
post #23

Golang is self sufficient for a small scale web app. It has HTML templates library, decent error handling, rpc, logging, built-in http server. Many people choose golang for that reason.

What do you mean by small scale? I think requests per second. Our Go-backed API has handled 90k rps without batting an eye. Or do you mean small scale as in team size? It is my understanding that Go was specifically designed to work for large organizations (cough Google cough).

Or do you mean single page JavaScript web sites? At which point Go would be the backing API? I don't see what qualifies Go for "small scale" vs "large scale."

Thanks for any clarification. Cheers!

Re: Show HN: A simple Go web server with logging, tracing, health check

#50

Can someone add letsencrypt.org ACME cert generation? https://godoc.org/golang.org/x/crypto/acme/autocert Edit: found this https://gist.github.com/kennwhite/f9ea1afff776049974678fb21a...

Love this type of thread and great find on the cert stuff. Super cool
Post reply on HN