Anonymization Layer-Reputation System protocol: Difference between revisions

From
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
For the communication between the Anonymization Layer and the Reputation System a simple line based protocol is used. The Reputation System acts as a TCP server and listens on 127.0.0.1 port 4444. All commands are sent by the Anonymization Layer. All commands and responses end with a single newline (<code>"\n"</code> in C).
For the communication between the Anonymization Layer and the Reputation System a simple line based protocol is used. The Reputation System acts as a TCP server and listens on 127.0.0.1 port 4444. All commands are sent by the Anonymization Layer. All commands and responses end with a single newline (<code>"\n"</code> in C).


; <tt>newuser n</tt> : A new user with index <tt>n</tt> has been added. <br />No response from the Reputation System.
; <tt>newuser <var>n</var></tt> : A new user with index <tt><var>n</var></tt> has been added. <br />No response from the Reputation System.
; <tt>feedback n m x</tt> : User <tt>n</tt> sent a feedback about user <tt>m</tt> with value <tt>x</tt>.<br />No response from the Reputation System.
; <tt>feedback <var>n</var> <var>m</var> <var>x</var></tt> : User <tt><var>n</var></tt> sent a feedback about user <tt><var>m</var></tt> with value <tt><var>x</var></tt>.<br />No response from the Reputation System.
; <tt>query n m</tt> : User <tt>n</tt> wants queries the reputation of user <tt>m</tt>.<br /><dl><dt>Response</dt><dd><tt>y</tt>, the reputation value</dd></dl>
; <tt>kcabdeef <var>n</var> <var>m</var> <var>x</var></tt> : User <tt><var>n</var></tt> previously sent a feedback about user <tt><var>m</var></tt> with value <tt><var>x</var></tt> and now wants to undo it.<br />No response from the Reputation System.
; <tt>query <var>n</var> <var>m</var></tt> : User <tt><var>n</var></tt> wants to query the reputation of user <tt><var>m</var></tt>.<br /><dl><dt>Response</dt><dd><tt><var>y</var></tt>, the reputation value of <tt><var>m</var></tt> as seen by <tt><var>n</var></tt></dd></dl>
; <tt>age <var>a</var></tt> : Introduce ageing into all previous feedback by multiplying it with <tt><var>a</var></tt>. (Creates a moving average.)<br />No response from the Reputation System.
; <tt>n</tt> : The anonymization layer wants to query the <math>N</math> (e.g. the last <tt><var>n</var></tt> from a <tt>newuser</tt> command).<br /><dl><dt>Response</dt><dd><tt><var>n</var></tt>, the <math>N</math>.</dd></dl>


<tt>n</tt> and <tt>m</tt> are integers from the range <math>\{1, \ldots, N\}</math> (with <math>N</math> being the last <tt>n</tt> sent in a <tt>newuser</tt> command).<br />
<tt><var>n</var></tt> and <tt><var>m</var></tt> are integers from the set <math>\{1, \ldots, N\}</math> (with <math>N</math> being the last <tt><var>n</var></tt> sent in a <tt>newuser</tt> command).<br />
<tt>x</tt> is from the set <math>\{-1, +1\}</math><br />
<tt><var>x</var></tt> is from the set <math>\{-1, +1\}</math><br />
<tt>y</tt> is a real number, represented with the C format string <code>g</code> or <code>G</code> (with almost arbitrary precision).
<tt><var>a</var></tt> and <tt><var>y</var></tt> are real numbers, represented with the C format string <code>g</code> or <code>G</code> (with almost arbitrary precision).

Latest revision as of 18:46, 25 May 2006


For the communication between the Anonymization Layer and the Reputation System a simple line based protocol is used. The Reputation System acts as a TCP server and listens on 127.0.0.1 port 4444. All commands are sent by the Anonymization Layer. All commands and responses end with a single newline ("\n" in C).

newuser n
A new user with index n has been added.
No response from the Reputation System.
feedback n m x
User n sent a feedback about user m with value x.
No response from the Reputation System.
kcabdeef n m x
User n previously sent a feedback about user m with value x and now wants to undo it.
No response from the Reputation System.
query n m
User n wants to query the reputation of user m.
Response
y, the reputation value of m as seen by n
age a
Introduce ageing into all previous feedback by multiplying it with a. (Creates a moving average.)
No response from the Reputation System.
n
The anonymization layer wants to query the (e.g. the last n from a newuser command).
Response
n, the .

n and m are integers from the set (with being the last n sent in a newuser command).
x is from the set
a and y are real numbers, represented with the C format string g or G (with almost arbitrary precision).