demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Demexp-dev] get_timestamps() and get_timestamps_decoded()


From: Augustin
Subject: [Demexp-dev] get_timestamps() and get_timestamps_decoded()
Date: Sun, 10 Sep 2006 01:08:25 +0800
User-agent: KMail/1.8.2

On Saturday 09 September 2006 11:12 pm, David MENTRE wrote:
>  * get_timestamps() and get_timestamps_decoded()
>
>    get_timestamps(cookie) returns the latest timestamp for tags,
>    participants and question. This RPC calls the raw binary timestamp
>    interface that returns three gzipped array of 32 bits unsigned big
>    endian integers, one integer for each tag, participant or
>    question. The greater the integer, the fresher is the corresponding
>    element.
>
>    I assume that this binary interface might be a little difficult for
>    you to use at first, so I have added get_timestamps_decoded(cookie)
>    RPC method. This call is the same as the previous one, except it
>    returns the set of the three arrays already decoded (i.e. ungzipped
>    and binary value transformed into XML counterpart).


David,

As you properly guessed, this is more unusual stuff for me.
But it seems that I eventually will HAVE TO implement get_timestamps() on the 
web client side, won't I?

There are two aspects to the problem: the compression, and the integers.

About the compression, I would need to enable this module:
http://php.net/manual/en/ref.zlib.php
(I have to see if it's enabled at my host).

About your gremlins ("32 bits unsigned big endian integers, one integer"), we 
may have more of a problem:
http://php.net/manual/en/language.types.integer.php
""The size of an integer is platform-dependent, although a maximum value of 
about two billion is the usual value (that's 32 bits signed). PHP does not 
support unsigned integers.""

Is the solution as easy as handling the signs properly. 
If I have (trying to guess):
a = -3,
b = -1,
c = 0,
d = 1,
e = 3
Then the proper order is:
c = 0,
d = 1,
e = 3,
b =  y + 1,
a = y + 3
???


Do you think that it would take too much time to deal with this now, or you 
can help me make an attempt at using the right protocol straight away.

If it is too troublesome, or if it would take too much time to do this, given 
our time constraints (those I have just announced on the fr list!!), maybe I 
should go forward and use the  get_timestamps_decoded() you kindly provided, 
and come back to this problem only much later...


I just checked get_timestamps_decoded() and that's easy stuff, thanks.

>    In order to limit network overhead, maybe I should implement
>    get_timestamps_questions_decoded(), get_timestamps_tags_decoded(),
>    etc. ?

Well, it will depend on how often I use each type of data. Don't work on this 
now, and when I have a better understanding of the relation between each 
piece of data and their timestamp, I'll tell you what I plan to do.

Let's see how complicated it can be to deal with the gzipped arrays first.



Blessings,

Augustin.



-- 
http://www.wechange.org/
Because we and the world need to change.
 
http://www.reuniting.info/
Intimate Relationships, peace and harmony in the couple.

http://www.gnosis-usa.com/
Revolutionary Psychology, White Tantrism, Dream Yoga...

http://www.masquilier.org/
Condorcet, Approval alternative, better voting methods.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]