diff --git a/org/index.html b/org/index.html index feee800..2b1ef84 100644 --- a/org/index.html +++ b/org/index.html @@ -129,7 +129,7 @@

Decentralized JSON Notification Protocol

  • _ring - Used to open a line with a writer, value from 1 to 32768
  • _line - The private unique id of the line from one writer to another, the product of the _ring from both
  • _limbo - 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 -
  • _seq - Integer value from 0 to 4, incremented any time the Telex is forwarded +
  • _hop - Integer value from 0 to 4, incremented any time the Telex is forwarded .* - Commands
    @@ -178,7 +178,7 @@

    Notes

    -

    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. +

    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.

    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. diff --git a/perl/writer.pl b/perl/writer.pl index eaac604..6520768 100755 --- a/perl/writer.pl +++ b/perl/writer.pl @@ -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); @@ -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)