These are chat archives for gin-gonic/gin

25th
Oct 2016
Thomas Boerger
@tboerger
Oct 25 2016 05:48
An endless loop with one millisecond sleep doesn't make any sense at all :)
I'm pretty sure it will be less CPU heavy if you increase the sleep
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 15:08
anyone here
I have a problme
problem*
but it says it doesn't exist
I'm calling c.HTML(200, "templates/template.html", MyStruct{<options>})
it works
even if I cat templates/template.html from the binary's CWD
The template DID work with Iris
Rewording: if I call the above function on a context, even if the template exists, it panics with a nil ptr dereference
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 15:13
Even when I can cat the template, it prints the correct template...
wow this amount of lag
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 15:20
test
none alive? :(
Thomas Boerger
@tboerger
Oct 25 2016 16:48
Be patient...
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 16:48
I am
Thomas Boerger
@tboerger
Oct 25 2016 16:49
I can't give an advice since I'm not on a workstation
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 16:49
I Fixed it
I needed a HTML glob
Thomas Boerger
@tboerger
Oct 25 2016 17:20
But good decision to get away from iris ;)
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 17:26
Iris is a POS, everyone knows it :D
Thomas Boerger
@tboerger
Oct 25 2016 18:46
Point of sale? XD
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 18:48
piece of shit
:D
lulz kataras just broke all the copyrights
Thomas Boerger
@tboerger
Oct 25 2016 18:49
That's not the only issue... But that's a different story ;)
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:07
well it's not the fastest
I think I'll give Echo a shot because Gin isn't fast enough :(
Thomas Boerger
@tboerger
Oct 25 2016 19:29
But gin is pretty fast... It depends on the usecase and the written code of course
:(
and Echo is removing fasthttp support from v3
so there's no point in it
I've used Django before
it's so slow and unscalable
Thomas Boerger
@tboerger
Oct 25 2016 19:30
Fasthttp got anyway a lot of downsides
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:31
Golang web Frameworks (IMHO) can be measured only in speed/efficiency of the routing and in their API flexibility
Fast HTTP didn't succeed in gin , because it would break a lot of things with it's implementation, like she
Sse*
ZenifiedFromI2P @ZenifiedFromI2P sticks with Gin
Thomas Boerger
@tboerger
Oct 25 2016 19:32
But anyway, both of my projects and also drone uses gin and I will stay on gin :)
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:32
Who uses SSE anyway
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:32
I do
Thomas Boerger
@tboerger
Oct 25 2016 19:32
And http2?
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:32
it's 2016, people use WebSocket
HTTP/2, as I have said before, works for me (TM) with NginX reverse proxy
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:33
Not always, websockets may be not proxy friendly
Thomas Boerger
@tboerger
Oct 25 2016 19:33
Websocket got more overhead... That makes only sense for bidirectional communication
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:33
mm.. modern proxies support websockets
atleast Squid and Privoxy does as well as Varnish
then simple SockJS long-polling?
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:34
Yeah, but standardized
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:34
I have found a way to defeat the net/http slowness
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:34
Tell us(?)
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:35
net/http has bottlenecks when a large amount of packets come in simul.
but it doesn't use all of my resources
so if I run more than one server deamons connected to a single database
then HAProxy -> Varnish -> nginx -> enumerate into multiple daemons on the same server
it seems to use all of the resources efficiently
Actually a better method will be to use Varnish -> nginx (serve statics) -> HAProxy -> multiple Gin daemons
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:37
Well, maybe you need to understand whats going on at golang scheduler
ZenifiedFromI2P @ZenifiedFromI2P does
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:37
it's related with GOMAXPROCS
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:37
Yea
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:37
net/http sometimes fails to run goroutines when a lot of goroutines are already active
and those sockets not handled go to sleep
somehow fasthttp is not affected by this???
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:40
I don't know the fast http implementation, maybe they reutilize goroutines through channels
Mr. Zenified
@ZenifiedFromI2P
Oct 25 2016 19:40
there's always room for improvement
but the way Iris utilized fasthttp is cool
but if the developer was sane, and the project was a complete OSS project
I'd definitely use it
:( but the dev is actually insane and edits git history lol
Javier Provecho Fernandez
@javierprovecho
Oct 25 2016 19:59
Even with all those bad behaviours , we can pull some cool features from iris and many other frameworks, from flexibility to speed/efficiency