mikehardy / google-analytics-java

Open Source license compatible Java API for Google Analytics
9 stars 3 forks source link

Async HttpClient #23

Closed jtjeferreira closed 5 years ago

jtjeferreira commented 5 years ago

I found this fork of brsanthu/google-analytics-java. Would you be interested in a contribution of a pure async HttpClient, so that the sending of events is never blocking?

mikehardy commented 5 years ago

Hmm I don't see why not, especially if accompanied with a little documentation update explaining when it would be useful, and some test coverage.

Thinking technically a little, would there be a case where you could fire enough async events to exhaust resources? Other than that I can't think why it wouldn't be what most want when they choose the post async style...

jtjeferreira commented 5 years ago

I will give it a try then.

I think the pure async solution will consume less resources because we won't have any threads blocked waiting for IO (assuming the HTTPClient implementation is also aysnc)