TechEmpower / FrameworkBenchmarks

Source for the TechEmpower Framework Benchmarks project
https://www.techempower.com/benchmarks/
Other
7.66k stars 1.95k forks source link

Diagram db query strategies, include these diagrams in the requirements #3946

Open michaelhixson opened 6 years ago

michaelhixson commented 6 years ago

The requirements for what database query strategies are allowed and disallowed is currently confusing. For example, we say "pipelining" is permitted but we don't explain what pipelining is. There are long discussions about this in our mailing list, but those were not effective. After those discussions, I had to reject a couple of PRs that were doing batch queries instead of pipelining.

Clarify the requirements by providing diagrams, created with draw.io for example. They should show what each query strategy is and whether it's allowed.

Known strategies include:

zloster commented 6 years ago

You could give a try to PlantUML. My quick attempt:

@startuml
title The Java and JDBC flow
autonumber
"Application thread" -> "DB connection": SQL query A
"DB connection" -> "Application thread": SQL resultset A
"Application thread" -> "DB connection": SQL query B
"DB connection" -> "Application thread": SQL resultset B
@enduml

The result is: Result or as ASCII art:

     ┌──────────────────┐          ┌─────────────┐
     │Application thread│          │DB connection│
     └────────┬─────────┘          └──────┬──────┘
              │       1 SQL query A       │       
              │ ─────────────────────────>│       
              │                           │       
              │     2 SQL resultset A     │       
              │ <─────────────────────────│       
              │                           │       
              │       3 SQL query B       │       
              │ ─────────────────────────>│       
              │                           │       
              │     4 SQL resultset B     │       
              │ <─────────────────────────│       
     ┌────────┴─────────┐          ┌──────┴──────┐
     │Application thread│          │DB connection│
     └──────────────────┘          └─────────────┘

Note: the title is missing from the ASCII art. Probably this is a bug.