rama icon indicating copy to clipboard operation
rama copied to clipboard

Add distributed session/application layer tests using turmoil

Open GlenDC opened this issue 7 months ago • 3 comments

With Turmoil (https://github.com/tokio-rs/turmoil) we can add chaos to the transport layer (UDP / TCP) and serve data for session / application layer stacks. Could be useful to add some more guarantees.

Inspiration for the kind of tests that we could do can be found in https://github.com/tokio-rs/turmoil/tree/main/tests. Whoever picks this issue up first should list the kind of tests they'll write.

I would keep these tests separate from other tests and just add them under ./tests-turmoil/, each test its own cargo project there. This way we can add them to the workspace via the pattern ./tests-turmoil/* in our cargo toml of the rama workspace.

The resolution to this ticket can be as small as just picking 1 or 2 use cases already. E.g. http client<->server, or with a proxy in the middle, etc.. Plenty of stuff to pick from.

It's a good first issue as one doesn't need to go very in depth in rama knowledge, but one does need sufficiently good rust knowledge as there's plenty to do here, so it isn't easy by any means. Just no difficulties specific to rama I would think.

GlenDC avatar Jun 02 '25 15:06 GlenDC

This ticket looks interesting and I would like to have a think about it.

Could be useful to add some more guarantees.

I suspect these are related to proxy management, e.g., reconnection to upstream, smoothing jittery connections, etc.

Are there any specific modules/features I might consider for testing?

Babbleshack avatar Jul 19 '25 17:07 Babbleshack

Sure have a think about it, if you at some point think you can do it and want to do it, do let it be known and it is yours if still available.

I would test all kind of stuff with it (eventually and if possible)

  • http/1.1
    • client <-> server
    • client <-> transport proxy <-> server
    • client <-> mitm proxy <-> server
  • ws (skip handshake)
    • client <-> server
    • client <-> transport proxy <-> server
    • client <-> mitm proxy <-> server
  • h2
    • client <-> server
    • client <-> transport proxy <-> server
    • client <-> mitm proxy <-> server

But for a first PR I would start simple. e.g. just a http/1.1 client <-> server test.

GlenDC avatar Jul 19 '25 20:07 GlenDC

Sure I will take have a go at this.

Babbleshack avatar Jul 20 '25 21:07 Babbleshack