Coder Social home page Coder Social logo

Comments (4)

dominictarr avatar dominictarr commented on July 20, 2024

oh that is an interesting point.
the purpose of the server timestamp is so that we do not get times that are wildly wrong.
(say, set to the wrong day, or year) we'll still have the relative time from each client
(how long they have been on that page) and we just need the server timestamp so that we can retrive data that happened with a particular range. normally we'd be grabbing ranges that are days or months or at the smallest probably hours, so batching for a few seconds (while not exactly correct) will still be good enough.

from condor.

will123195 avatar will123195 commented on July 20, 2024

I think we do want accurate timestamps.

Here's an idea: The last event in the batch can get normalized to server.now() and all previous events in the batch will be server.now() - n ms.

This way we're always logging with server timestamps and the intervals between events will be preserved.

from condor.

dominictarr avatar dominictarr commented on July 20, 2024

every event will have a localtime, that will be the time elapsed since the page was opened.

hmm. Maybe the solution is to have the client set timestamps, and just to validate them on the server?

If the timestamp is within a givin range, then let it be, but if it's outside of that range then set a new timestamp to the current server time.

from condor.

kesla avatar kesla commented on July 20, 2024

Here's how this works now:

We have 3 fields:

  • duration - that's how many ms a user has been on the page since the script was initiaded
  • timestamp - timestamp in UTC when the event happens
  • timezone - the timezone the user is in

These combined should make it possible for us to do batch requests. Please reopen this issue if there's something that I've forgotten about.

from condor.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.