Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

Commit

Permalink
small rename
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzjer committed Apr 26, 2010
1 parent 6ac85c9 commit be7de90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions org/index.html
Expand Up @@ -129,7 +129,7 @@ <h3>Decentralized JSON Notification Protocol</h3>
<li> <big>_ring</big> - Used to open a line with a writer, value from 1 to 32768
<li> <big>_line</big> - The private unique id of the line from one writer to another, the product of the _ring from both
<li> <big>_limbo</big> - Bytes sent are added, received are subtracted, current state (before this telex) is the value included. When the current value differs from the last received by +10k all new telexes should stop/drop
<li> <big>_seq</big> - Integer value from 0 to 4, incremented any time the Telex is forwarded
<li> <big>_hop</big> - Integer value from 0 to 4, incremented any time the Telex is forwarded
</blockquote>
.* - Commands
<blockquote>
Expand Down Expand Up @@ -178,7 +178,7 @@ <h2>Notes</h2>

<!-- AKA command/var? Allow more hash ids of a writer derived from internal 10. 192. etc IPs? -->

<p>For any incoming telex, once any _ring/_line is sorted out, a Writer then processes any commands (each is stateless and processed on their own). If there is an end signal, it should cause a .see response of some sort (unless there's a _seq > 0). Next, if the _seq is less than 4, any and all contained signals should be checked against any active .fwd filters, and all matching .fwd Writers should get a copy of the telex with the _seq incremented.
<p>For any incoming telex, once any _ring/_line is sorted out, a Writer then processes any commands (each is stateless and processed on their own). If there is an end signal, it should cause a .see response of some sort (unless there's a _hop > 0). Next, if the _hop is less than 4, any and all contained signals should be checked against any active .fwd filters, and all matching .fwd Writers should get a copy of the telex with the _hop incremented.

<p>Signals should primarily only ever contain hashes or generic (like xpath) content references and never actual content, as the sending and recipient parties must both be independently aware of the context or content in question so as to avoid any injection or attract spamming from 3rd parties.

Expand Down
6 changes: 3 additions & 3 deletions perl/writer.pl
Expand Up @@ -159,8 +159,8 @@
# now process signals, if any
next unless(grep(/^[[:alnum:]]+/,keys %$j));

# a request to find other writers near this end hash (ignore any telex in a sequence)
if($j->{"end"} && int($j->{"_seq"}) == 0)
# a request to find other writers near this end hash (ignore any relay'd telex)
if($j->{"end"} && int($j->{"_hop"}) == 0)
{
# get writers from buckets near to this end
my $cipps = bucket_near($j->{"end"},$buckets);
Expand All @@ -184,7 +184,7 @@
print "3";
# send them a copy
my $jo = tnew($w,$j);
$jo->{"_seq"} = int($t->{"_seq"})+1;
$jo->{"_hop"} = int($t->{"_hop"})+1;
tsend($jo);
# see if the .fwd is used up
if(scalar keys %$fwd == 0)
Expand Down

0 comments on commit be7de90

Please sign in to comment.