work by making an http request to an api, parsing the response, and
delivering a response to the client.
I'm using net/http for the server, which as I understand it already creates
a goroutine for each request. With that in mind, is there any reason I
should also make the request to the api provider a goroutine and use
channels to retrieve a response to parse?
Most of my experience with concurrent type programming is using python
tornado which is an event loop, so in that environment you explicitly make
remote http requests labeled as asynchronous so they don't block. I believe
with go, the fact that net/http has already created a goroutine for the
request I have no need to try and make the api requests goroutines unless I
want to do multiple api requests in the same response handler.
Am I understanding things right?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.