linkedin / flashback

mock the internet
BSD 2-Clause "Simplified" License
578 stars 54 forks source link

Comparison with goreplay #18

Open tomkel opened 7 years ago

tomkel commented 7 years ago

I'm not understanding the high-level differences between this and goreplay. They seem to occupy most of the same problem space. Can someone explain if and how they differ in their use cases?

sf1152 commented 7 years ago

I think the idea is the same. I didn't dig into goreplay but something I found out:

  1. goreplay implemented in go not sure if it can be used for other languages
  2. The example doesn't show how to support Http.
  3. It supports more protocol such as binary protocol.

For 3, we are going to support that soon. To share some idea how we want to support different protocol:

  1. Based on first a few bytes, we can decide if it's CONNECT or any other Http method or random bytes.
  2. If it's CONNECT, establish TCP connection
  3. If it's HTTP METHOD, decode using HttpDecoder
  4. If it not 2 or 3, then store whatever bytes somewhere.