All events are currently only loaded into an in memory buffer. Failed events are returned via a callback mechanism. So it is up to the developer to ensure they resend any failed events.
It would be better to simply push all events into persistent storage for later sending like so:
tracker.track(...) -> event stored and then a polling emitter checks for events every second.
We can be a bit slower to send but we have to ensure we do not lose the event that is created.
This model also allows for the following features:
- Do not send if their is no active network connection
- No need to pass events back from the callback mechanism
- Developer does not need to manage failures anymore
- No more constant failure loops if their is a network failure
All events are currently only loaded into an in memory buffer. Failed events are returned via a callback mechanism. So it is up to the developer to ensure they resend any failed events.
It would be better to simply push all events into persistent storage for later sending like so:
tracker.track(...)->event storedand then a polling emitter checks for events every second.We can be a bit slower to send but we have to ensure we do not lose the event that is created.
This model also allows for the following features: