I'm trying to replicate the latency compensation done by Meteor and minimongo. For instance to create an id on the client and then the same id on the server after calling the method, so the client can update the UI without waiting for the server response.
For this I need to generate the same Id on both the client and the server.
So, in meteor if I do: Random.createWithSeeds('abc').id()
I always get: WKrBPwCSbzNHmhacn
But if I connect from and external app, outside of metor using a ddp client: self.send({msg: 'method', id:id, randomSeed: 'abc', method: name, params: params});
I get a different Id. It's repeatable, but not the same as the one generated by Random. Why?
I cannot understand. Are they using a different generationId algorithm?
Packages I'm using: On Meteor: http://ift.tt/1q5y2Ep On external Client (outside Meteor): http://ift.tt/1uE9ihA + source code of random.js
Aucun commentaire:
Enregistrer un commentaire