heap icon indicating copy to clipboard operation
heap copied to clipboard

Asynchronous backend tracking

Open karellm opened this issue 10 years ago • 4 comments

It looks like the backend event tracking is done synchronously and does not support grouping. Do you plan on supporting a queue?

karellm avatar Jul 29 '15 22:07 karellm

Hi @karellm Thats a great suggestion. I currently don't have the time, but I'm happy to accept (and support) a pull request if you want to code this up.

HectorMalot avatar Aug 01 '15 11:08 HectorMalot

When you talk about "grouping" do you mean batching multiple events into one API call? If so, is it even possible? (I ask, as can't see anything relating to this in Heap's API docs https://heapanalytics.com/docs/server-side)

ktopping avatar Nov 18 '15 11:11 ktopping

I think the intention would be to be able to queue the server-side call (e.g. DelayedJob) and have a worker take care of it. Currently, if you implement a server side activity as a result of a http request, it will first finish the whole http request with heap, before returning a response to the final user.

Even though in most cases you would either go through the user, and have the server-side requests done by a worker. I'd like to add this to the gem, for those situations where someone feels the need to schedule a server-side request as a direct result of a user interaction.

HectorMalot avatar Jan 15 '16 12:01 HectorMalot

Both would be nice. Both sending multiple events in a bulk and sending those bulks asynchronously. I would definitely say that asynchronous is the most important but is rather easy to overcome on a per app basis (we use sidekiq).

karellm avatar Jan 16 '16 15:01 karellm