[go-nuts] Parsing XML with namespaces in golang

2017-07-23 Thread emartinez1847
Hello, So I'm trying to unmarshal an XML with namespaces in go but i just can't find the right parser to do so. My code: package main import "fmt" import "encoding/xml" type Root struct { MNResultsResults []ls `xml:"xmlns ls, MNResultsResults>ssResultSet>ssResult"` } type ls struct {

Re: [go-nuts] Parsing XML with namespaces in golang

2017-07-24 Thread emartinez1847
Thanks!. XMLName struct{} `xml:"urn:MNResultsResults MNResultsResults"` Cpcs []float64 `xml:"urn:MNResultsResults ssResultSet>ssResult>cpc"` Is there any reason to declare the namespace 2 times? At first we declare XMLName (which doesn't seem to be used) and then we use urn:MNResult

[go-nuts] Best way to launch/monitor several go process in production

2017-09-03 Thread emartinez1847
Hello, I am looking for the 'best' way to launch and monitor several go processes. Doing it with just 1 is easy enough, using monit or systemctl should do the trick, however since our app takes a while to start, we want to keep a few proceses running at all times so we don't have downtime every

[go-nuts] HTTP requests bottlenecks

2017-02-01 Thread emartinez1847
Hello, I'm writing a POC for a future RTB platform. Basically I'm doing stress tests by receiving HTTP requests and performing HTTP GET requests in the background. Issue I face is that when i try to scale up, URLs starts to timeout. I am trying to find what our bottleneck is but so far no luck

[go-nuts] Re: HTTP requests bottlenecks

2017-02-02 Thread emartinez1847
Thanks for the answer. Yes, it seems to be blocking, I just fixed it with: http://blog.sgmansfield.com/2016/01/the-hidden-dangers-of-default-rand/ After that change my code is working a lil bit better but still I see a ton of timeouts + high latency on responses. Maybe the code is locking on a

[go-nuts] Re: HTTP requests bottlenecks

2017-02-02 Thread emartinez1847
Ben, you are correct the dial thing, not sure how that ended up commented. Anyway, I've removed the custom dial (and tried with the timeout enabled as well), it did increase r/s a lil bit (5%-10% or so) but it increased the amounts of timeouts on the remote urls as well. El jueves, 2 de febrero

[go-nuts] Creating struct through a dynamic var

2017-02-07 Thread emartinez1847
Hello, I am having several structures with the same interface and I need to declare them based on an sql value. On some languages it is possible to do something like: variable struct_name="MyStruct" object:= new struct_name{} I was wondering if its possible to do something similar in Go? Other

[go-nuts] Re: Creating struct through a dynamic var

2017-02-07 Thread emartinez1847
Thanks! El martes, 7 de febrero de 2017, 22:55:06 (UTC-3), emarti...@gmail.com escribió: > > Hello, > > I am having several structures with the same interface and I need to > declare them based on an sql value. On some languages it is possible to do > something like: > > variable struct_name="M

[go-nuts] Decode XML performance in golang

2017-02-07 Thread emartinez1847
Hello, I'm making a go code which is basically parsing a lot of small xml responses. I've noticed that right after I enable the parsing code, my R/S as per wrk, as well as response times drop to 15% for some reason. I'm testing with about 2000 concurrent clients and each one parses about 50 ve

[go-nuts] Re: HTTP requests bottlenecks

2017-02-08 Thread emartinez1847
any idea? El miércoles, 1 de febrero de 2017, 23:26:07 (UTC-3), emarti...@gmail.com escribió: > > Hello, > > I'm writing a POC for a future RTB platform. Basically I'm doing stress > tests by receiving HTTP requests and performing HTTP GET requests in the > background. > > Issue I face is that