Diogene Laerce | 2 Mar 08:10 2008
Picon

Timestamps

Hi David

In your message of 2007/10/23, you say :

"Use the regular RPC API to get the update on each question. There is a
timestamp mechanism to know if a question has been changed. Look at
RPC get_timestamp() in the demexp book.

In short, a timestamp, an integer counter, is incremented each time a
question, tag, etc. is modified. You have the timestamp in the data
structure of each question, tag, etc. Moreover, you can use the
get_timestamp() RPC to get all the timestamps at once.

As an added bonus, on the XML-RPC proxy, you have two RPCs available:
 * get_timestamp(), the same as the get_timestamp() ONC-RPC;

 * get_timestamp_decoded(), returns the timestamp as arrays of
integers (instead of the compressed version of the get_timestamp()
RPC)."

So I guessed that it exists a get_timestamp() function available for each
question. But the demo-server answers that such funcion is  not supported.
See the joined file for debbug.

Have I guessed wrong ? 

Yours 
Diogene
Attachment (debbug.txt): text/x-vhdl, 1706 bytes
(Continue reading)

David MENTRE | 2 Mar 12:04 2008

Re: Timestamps

Hello Diogene,

Diogene Laerce <me_buss777 <at> yahoo.fr> writes:

> As an added bonus, on the XML-RPC proxy, you have two RPCs available:
>  * get_timestamp(), the same as the get_timestamp() ONC-RPC;
>
>  * get_timestamp_decoded(), returns the timestamp as arrays of
> integers (instead of the compressed version of the get_timestamp()
> RPC)."
>
> So I guessed that it exists a get_timestamp() function available for each
> question. But the demo-server answers that such funcion is  not supported.
> See the joined file for debbug.
>
> Have I guessed wrong ? 

Yes and no.

I was wrong in my description, the correct functions to call are
"get_timestamps(cookie)" and "get_timestamps_decoded(cookie)", with an S
at the end of the "timestamp" word.

However, you cannot get a timestamp for on a single question through
get_timestamps[_decoded](). With those calls, you'll get *all* the
timestamps for participants, questions and tags, in that order (see code
chunks 17a and 19f in demexp book).

If you want the timestamp of a single question (or a small set of
questions), use "question_info()". The timestamp of a question is
(Continue reading)

Diogene Laerce | 3 Mar 04:42 2008
Picon

Re: Timestamps


Hi Dave

> see code chunks 17a and 19f in demexp book.
> imestamp (see code chunk 17d
> page 17 in demexp book[1]).

So it is what I already saw in the demexp-book : I just wanted to be
sure.. ;)

And to be oversure .. : : what do you mean by :

"Method get timestamps returns timestamps of all the objects on the
server." (3.3.2 Timestamps 19f)

all the objects means ?

And, passing by, maybe already ask but : Is there a limitation of times,
the voter can vote ?

Another one :
I developp the client, working with Postgresql : All questions in a
database with the clients account managed by the forum server.

What do you think of the idea (security issues, fake vote
opportunities..) ?
 I was thinking about a demexp label to warrant the forum
administrator.. ??
 Yours
Diogene



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
_______________________________________________
Demexp-dev mailing list
Demexp-dev <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev
David MENTRE | 3 Mar 08:55 2008

Re: Timestamps

Hello Diogene,

2008/3/3, Diogene Laerce <me_buss777 <at> yahoo.fr>:
>  And to be oversure .. : : what do you mean by :
>
>  "Method get timestamps returns timestamps of all the objects on the
>  server." (3.3.2 Timestamps 19f)
>
>  all the objects means ?

As I said in my previous email: participants, questions and tags, in
that order (see fields gt_participant, gt_question and gt_tag in the
returned data structure).

>  And, passing by, maybe already ask but : Is there a limitation of times,
>  the voter can vote ?

If the vote limit date is over, the voter shouldn't be able to vote
but I'm not really sure it is implemented. ;-)

>  Another one :
>  I developp the client, working with Postgresql : All questions in a
>  database with the clients account managed by the forum server.
>
>  What do you think of the idea (security issues, fake vote
>  opportunities..) ?

I can't say much without further technical details. I think you should
use the authentication of the demexp server.

>   I was thinking about a demexp label to warrant the forum
>  administrator.. ??

Sorry, I don't understand what do you mean.

Yours,
d.
Diogene Laerce | 4 Mar 07:46 2008
Picon

Re: Timestamps

Hi David

> As I said in my previous email: participants, questions and tags, in
> that order (see fields gt_participant, gt_question and gt_tag in the
> returned data structure).

I check the base64 doc and ask if issue.

> I can't say much without further technical details..
>  I think you should
> use the authentication of the demexp server.

The access to the client, so the databse is authorized by the demexp
server.

> >   I was thinking about a demexp label to warrant the forum
> >  administrator.. ??

Well according to the joined graphic, I thought about a central demexp
server connected to the forums. Where each forum can run his own
database : votes and propostions are still recorded by the demexp server
but the questions browsing is made locally. So it could decrease the
number of connections to the demexp server.

Even why not, the vote and propositions can be updated during the
database update (my client can update and store the database in the
admin interface). So that each forum would connect only 2 or 3 times a
day.

> Sorry, I don't understand what do you mean.

I hope its clearer now.

Yours
Diogene

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
_______________________________________________
Demexp-dev mailing list
Demexp-dev <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev
Diogene Laerce | 4 Mar 08:34 2008
Picon

base64

Hi David

So I succeeded in retrieve the base64 value from the struct but I dont really understand what to do with it.
I put it in a translator which gave me the joined answer but it didnt help me much.

The php function :

echo base64_decode($timestamps);

give me back the text translation. And anyway, no translation on this picture looks like a timestamp list ??

Can you show me the light ?

Yours
Diogene

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
_______________________________________________
Demexp-dev mailing list
Demexp-dev <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev
David MENTRE | 4 Mar 19:55 2008

Re: Timestamps

Hello Diogene,

2008/3/4, Diogene Laerce <me_buss777 <at> yahoo.fr>:
>  The access to the client, so the databse is authorized by the demexp
>  server.

Ok. Seems correct at first sight.

>  Well according to the joined graphic, I thought about a central demexp
>  server connected to the forums. Where each forum can run his own
>  database : votes and propostions are still recorded by the demexp server
>  but the questions browsing is made locally. So it could decrease the
>  number of connections to the demexp server.

Nice.

>  Even why not, the vote and propositions can be updated during the
>  database update (my client can update and store the database in the
>  admin interface). So that each forum would connect only 2 or 3 times a
>  day.

Regarding reading, there is no particular issue so you can cache as
much as you like in your forum databases.

However, regarding writing (e.g. vote, new questions or new
responses), I think you should do them as early as possible otherwise
you might have coherency issues (e.g. the new questions conflicts with
the same one registered by somebody else, etc.). Only the demexp
server can guarantee a coherent state. You might cache during writings
but, in my opinion, this is very complicated and you'll have a lot of
tricky issues.

Yours,
d.
David MENTRE | 4 Mar 20:02 2008

Re: base64

Hello Diogene,

2008/3/4, Diogene Laerce <me_buss777 <at> yahoo.fr>:
> echo base64_decode($timestamps);
>
> give me back the text translation. And anyway, no translation on this
> picture looks like a timestamp list ??
>
> Can you show me the light ?

Sure. As it is written in the demexp book on page 33, a set of
timestamps is encoded as a gzipped array of 32 bits integer. So,
roughly, you need to base64_decode then ungzip the $timestamps and
then exploit as a binary array of 32-bits integers.

Frankly, I don't know how to do this in PHP or if it is even possible.

Why don't you use the call get_timestamps_decoded()? It gives you the
same timestamps but as a nice set of three integer arrays already
uncompressed. It would be much easier for you.

Yours,
d.
Diogene Laerce | 6 Mar 12:23 2008
Picon

Re : Timestamps

Hello David

> Regarding reading, there is no particular issue so you can cache as
> much as you like in your forum databases.

So it will..

> However, regarding writing (e.g. vote, new questions or new
> responses), I think you should do them as early as possible otherwise
> you might have coherency issues (e.g. the new questions conflicts with
> the same one registered by somebody else, etc.). Only the demexp
> server can guarantee a coherent state. You might cache during writings
> but, in my opinion, this is very complicated and you'll have a lot of
> tricky issues.

Actually I didnt think about that coherency issue : So the writing will
be sync.

> Why don't you use the call get_timestamps_decoded()?
> same timestamps but as a nice set of three integer arrays already
> uncompressed. It would be much easier for you.

Yes, much easier.. :)

Thanks and yours,
Diogene

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
_______________________________________________
Demexp-dev mailing list
Demexp-dev <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/demexp-dev
Lyu Abe | 11 Mar 19:42 2008
Picon

Test

This is a test.

Gmane