Live data from Hacker News

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

gist.github.com

91–97 of 97 posts

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

#91
post #64
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…

If you're using java, just use finagle's http server and be done with it. It is really good and runs most all of twitter.com's production web services. The very definition of "web scale": https://twitter.github.io/finagle/guide/Quickstart.html

"zero dependencies" was an essential feature of this. Finagle would be a dependency. And, according to a quick 'gradle distZip', it drags in a further 49 transitive dependencies.

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

#92
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…

Just wrap the handlers with middleware rather than using that filter abstraction. Same thing!

By 'middleware', do you mean another handler? That would work, but i'd still have to wrap each handler separately.

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

#93

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...

I went ahead and started fleshing out a combination of both of these along with an example of using golang templates: https://github.com/Xeoncross/vanilla-go-server

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

#94
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...

This is totally propaganda, they spamm those links without even reading the code. Florin is clearly putting lies to a part of the community to deflame the Iris via the slack golang chat. He's also banned the author of the web framework without notice or any other action from his behalf. Is this a healthy relation between an author of a popular software and a guy who never wrote a single line of code?

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

#95
post #44
post #36

Earlier quoted context omitted.

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?

Note the dates and you'll see the truth, if you're a programmer you can also read the code, Iris doesn't even use the libraries the 1+ year old article claims to be used there.

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

#96
post #91
post #64

Earlier quoted context omitted.

If you're using java, just use finagle's http server and be done with it. It is really good and runs most all of twitter.com's production web services. The very definition of "web scale": https://twitter.github.io/finagle/guide/Quickstart.html

"zero dependencies" was an essential feature of this. Finagle would be a dependency. And, according to a quick 'gradle distZip', it drags in a further 49 transitive dependencies.

That seems sensible. Really cool project (and I didn't mean to piss on it), just wanted to point out that generally speaking, finagle is serious business and can be used already.

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

#97
post #75
post #67

Earlier quoted context omitted.

A small scale means you won't use redis for in memory data storage. You will not need C++ to write heavy string processing and hash table lookup. Golang also doesn't scale well if you have some heavy processing involving trees( http://benchmarksgame.alioth.debian.org/u64q/binarytrees.htm... ).

FWIW that benchmark is not reliable . Developers have submitted go programs that do far better, but they get rejected because they use custom memory allocators. This is despite the fact that C++ does precisely this with an arena allocator. Go was not designed for the small scale, but the large: - it has a sensible module system that makes compilation fast - it's a simple language that encourages boring code - your co…

> Developers have submitted go programs that do far better, but they get rejected because they use custom memory allocators. This is despite the fact that C++ does precisely this with an arena allocator.

No, apr_pools.h was not custom written to make some programming language look better on a toy benchmark!

https://apr.apache.org/docs/apr/1.5/apr__pools_8h.html

Post reply on HN