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
Show HN: A simple Go web server with logging, tracing, health check
91–97 of 97 posts
Re: Show HN: A simple Go web server with logging, tracing, health check
#92Here'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!
Re: Show HN: A simple Go web server with logging, tracing, health check
#93Can 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...
Re: Show HN: A simple Go web server with logging, tracing, health check
#94This 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...
Re: Show HN: A simple Go web server with logging, tracing, health check
#95Earlier 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?
Re: Show HN: A simple Go web server with logging, tracing, health check
#96Earlier 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.
Re: Show HN: A simple Go web server with logging, tracing, health check
#97Earlier 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…
No, apr_pools.h was not custom written to make some programming language look better on a toy benchmark!