2 Replies Latest reply on Nov 26, 2010 1:34 AM by nimigeanu

    Read-only object replication?

    nimigeanu Level 2

      Is there a possibility to password-protect, or otherwise make object replication read-only similar to posting and publishing?

       

      My concern is that, given the total freedom of data put into writeRequestedObject(), some peer may (willingly or not) serve bad/corrupt data into the replication. This will be picked by others and further replicated. If the piece of data is part of a bigger whole this will itself be corrupt.

       

      If there's no way to enforce the read-only, adding an integrity hash to the end of the data sounds like a good idea. Receiver will discard the bad data and wait for another replica. Which leads to the next question:

       

      Say one peer is wanting objects #1 through #5. Once it received #3 from some neighbor could this be received again from others until declared (removeWantObjects) it's no longer wanted or will the first receive lock the want for #3 and only wait for the others. Will in this case a removeWantObjects followed by addWantObjects give peer a chance to get a new replica of the #3?

       

      Thank you for any insight or ideas.

        • 1. Re: Read-only object replication?
          Michael Thornburgh Adobe Employee

          in order for Object Replication to work, everyone in the mesh must be able to do NetGroup.writeRequestedObject().

           

          in your application logic you can add integrity checks to the objects (perhaps with a manifest or directory that lists the expected hashes of each object).

           

          you will only receive an object with a specific index from one peer at a time.  once you receive the object, its index is removed from your want set.  you may perform a validity check against the object, and if it isn't valid, you can re-want it.  at this time there's no way to blacklist a misbehaving peer that is giving you corrupted data, so you might end up getting the same (corrupted/invalid) object again.

           

          after receiving an object and determining that it *is* valid, you add it to your "have" set, and only then will your neighbors begin asking you for that object.  in that way, only valid objects will propagate through the group.

          • 2. Re: Read-only object replication?
            nimigeanu Level 2

            All clear now. Thanks a lot.