vacp2p / mvds

Minimal Viable Data Sync Implementation
https://specs.vac.dev/specs/mvds.html
MIT License
13 stars 3 forks source link

Extend simulation with mocking of mailserver node #54

Open oskarth opened 5 years ago

oskarth commented 5 years ago

Add flags to simulation, similar to -interactive int etc. Mock mailserver (and/or later remote log a la Swarm as well). See https://github.com/status-im/status-console-client/issues/61

  1. mailserverAgent bool whether a mailserver picks up and relays messages or not
  2. mailserverUptime int 0..100% uptime (default 95%, % receive)
  3. mailserverBufferTime int time for rolling buffer of messages is sent when waking up, e.g. client does requestMessages from mailserverAgent and gets last hour

Possible (lesser prio?) other things that can be encoded to simulate Whisper:

Enhancements:

Better names etc are encouraged.

cc @adambabik if this makes sense or if there's something you'd like to change

@decanus would you mind having a look at this?

decanus commented 5 years ago

@oskarth I understand the rationale of this, however I do not believe that it belongs into MVDS. This should be a simulation in the client that allows us to arbitrarily simulate a remote log whether that is mailserver or something else is completely irrelevant imo.

oskarth commented 5 years ago

@decanus so what do you suggest?

If there's some differences in opinion on best way to approach it and who should own it, maybe @adambabik and @decanus you guys can talk directly? I'm flexible as to how it is done, I only care that it is done sooner than later. We should have done this weeks ago and now it's turning into a ping-pong game.

adambabik commented 5 years ago

@decanus Well, it does not really matter where the simulation is put at this stage. It can be a separate repo if this repo is not the best place but let me explain my reasoning.

We want to check some characteristics of mvds when using offline messaging. It can be in a form of mailserver, swarm, ipfs whatever. The basic assumption is that there is an actor which provides a batch of historical messages (like Oskar described a rolling buffer of messages from the last N minutes/hours).

We can go directly to an actual client (which also introduces latencies related to the network and generally to Whisper which is not covered in the previous naive simulation). The output can be that overhead dropped from 100x to 10x. How do we know that this is maximum improvement? Where is another 10x lost? Due to Whisper or it's just mvds characteristic when introducing such an actor?

If we can get a naive simulation first and confirm that with introducing offline messaging to mvds, the overhead dropped by 100x, we are clear that it should also be our target for Whisper and mailserver.

The same goes when testing mvds over Whisper. Having a naive simulation with properties of Whisper nodes can tell us about a magnitude of improvement/degradation which we can compare with the real world simulation.

Does it make sense?

StatusWrike commented 5 years ago

➤ Oskar Thoren commented:

Adam Babik Dean is off this week, I believe this was supposed to be dealt with in mvds-simulations or so? Leaving task here for now. Not sure if Pedro or someone is helping out either?

rachelhamlin commented 5 years ago

@adambabik is there any discussion about this outside the issue, or is it going to be included in MVDS?

adambabik commented 5 years ago

@rachelhamlin this is pretty independent and does not really affect V1. This work is suspended at the moment because of mvds being actively developed.

rachelhamlin commented 5 years ago

Okay, noted - thanks!

On Mon, Aug 12, 2019 at 8:15 PM Adam Babik notifications@github.com wrote:

@rachelhamlin https://github.com/rachelhamlin this is pretty independent and does not really affect V1. This work is suspended at the moment because of mvds being actively developed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vacp2p/mvds/issues/54?email_source=notifications&email_token=ADWA6Y67YTLZG4LOX4O3AB3QEGZEXA5CNFSM4H7N3BG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4DRLYA#issuecomment-520558048, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWA6YYZCOWS32UQXFE2CPLQEGZEXANCNFSM4H7N3BGQ .