Comments (4)
Yes, that is the reason why heartBeat call rate is in ms not seconds, default beat interval being 500 ms or half of a second. With increased beat interval that could become a problem.
Why bulk requests are not used from the start? Well we have one guideline for all SDKs and currently we stick to it, adjusting the parameters per need. And Bulk API while being available for quite long time, was not always so reliable, as you can see notices in our docs, in some versions it was broken, in others did not guarantee correctly executed sequences, and was mostly used for bulk data importing and not SDK end point. It only became more stable in Countly Server version 16.06 and by that time all current SDKs were fully development and in the spirit of ("don't mend it if it is not broken") those are left as is for now.
But you are right, while mobiles apps probably not so much, but web SDK could benefit from it and most probably will move to bulk API in case of some more major sdk redesigning event.
from countly-sdk-web.
This is not how SDK would be intended to be used, but I think the right approach would be to take matter in your hands and construct a bulk request from what you have in the storage, cause you should be able to access storage outside SDK too and then empty it, before initializing SDK or calling any heartbeat.
You can read more about bulk request construction here: http://resources.count.ly/v1.0/reference#ibulk
and you can access internal methods to process query params if needed.
from countly-sdk-web.
Hi, thank you for your suggestion.
I have another question, why the heartBeat
send only one element in the request queue per time and not all elements.
This behavior is not optimal in case of significant interval.
For example, in case of interval = 10s, in request queue, we have a alot of request : begin_session, session_durations, events, end_session, etc... We need ((nbOfElement-1) * 10s) time to send all requests to counlty server. If the user closes the browser soon and never comeback, we could miss a lot of informations.
This is may be not a real case because 10s is a lot. But the probleme can occurs in another case for example interval = 5s, we have a multi-pages web apps, everytime a page is loaded, multiple requests are added in the request queue (begin_session, events, end_sessions, begin_session, end_session, ...). If the user stays only 3s on each page, only one heartBeat is called. At the end, we have the same problem.
Do you has any suggestion? Or i'm missing something.
Thanks
from countly-sdk-web.
Thank you for your clarification, it's very helpful.
Keep up your great work!!
from countly-sdk-web.
Related Issues (20)
- Do you offer a notification service for web HOT 2
- Element is Not Defined With React Integrations HOT 1
- Countly installs a non-compliant polyfill for Element.closest HOT 8
- Lighthouse error "Registers an unload listener" from the tracking script HOT 1
- Pass user agent with all requests HOT 1
- [Security Issue] Semi-persistent DOM XSS HOT 2
- How to integrate this sdk with βAnt Design Proβ? HOT 2
- Bug: Countly doesn't correctly remove consent for custom groups. HOT 3
- version inconsistencies HOT 2
- It is not possible to cancel the timed event HOT 5
- Session duration issues HOT 2
- Shipping Countly In a WebWorker Context HOT 11
- Device ID not used for the queued queries when disabling offline mode HOT 1
- Can not work when the salt on Countly server is set HOT 5
- China map is displayed incorrectly HOT 1
- After using "opt_out" method, "opt_In" method does not work properly without reloading the browser screen. HOT 2
- send json string to countly HOT 2
- Source maps
- Uncaught TypeError: Converting circular structure to JSON HOT 4
- CORS issue with Next.js and countly-sdk-web HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from countly-sdk-web.