Skip to content

paul-snively/easyracer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Racer

A series of obstactle courses as a way to compare how different languages and frameworks handle structured concurrency, including:

  • loser cancellation
  • resource management
  • efficient thread utilization (i.e. reactive, non-blocking)
  • explicit timeouts
  • errors causing a race loss

A scenario server validates the implementations of 11 scenarios:

  1. Race 2 concurrent requests

    GET /1
    
  2. Race 2 concurrent requests, where one produces a connection error

    GET /2
    
  3. Race 10,000 concurrent requests

    GET /3
    
  4. Race 2 concurrent requests but 1 of them should have a 1 second timeout

    GET /4
    
  5. Race 2 concurrent requests where the winner is a 20x response

    GET /5
    
  6. Race 3 concurrent requests where the winner is a 20x response

    GET /6
    
  7. Start a request, wait at least 3 seconds then start a second request (hedging)

    GET /7
    
  8. Race 2 concurrent requests that "use" a resource which is obtained and released through other requests. The "use" request can return a non-20x request, in which case it is not a winner.

    GET /8?open
    GET /8?use=<id obtained from open request>
    GET /8?close=<id obtained from open request>
    
  9. Make 10 concurrent requests where 5 return a 200 response with a letter, when assembled in order of when they responded, form the "right" answer

    GET /9
    

If your implementation is correct, each race will result in a 200 response with a body:

right

The scenario server has a public container ghcr.io/jamesward/easyracer and if you contribute your client to this repo, use Testcontainers and include automated integration tests.

For local dev you can spin up the server via Docker:

docker run -it -p8080:8080 ghcr.io/jamesward/easyracer --debug

Clients

Name Source Tests Author Notes
Scala 3 + ZIO scala-zio tests James Ward
Scala 3 + ox scala-ox tests Adam Warski
Scala 2 + Cats Effects 3 scala-ce3 tests Paul Snively
Kotlin + Coroutines kotlin-coroutines tests Jack Leow
Kotlin + Splitties kotlin-splitties tests James Ward
Kotlin + Arrow kotlin-arrow tests James Ward
Java + Loom java-loom tests James Ward
Python + AIOHTTP + TaskGroup python-aiohttp-taskgroup tests James Ward Bruce Eckel
Python + AIOHTTP python-aiohttp tests James Ward Unable to get it working
Python + HTTPX + asyncio python-httpx-asyncio tests James Ward Unable to get it working
Python + HTTPX + Trio python-httpx-trio tests James Ward Unable to get it working
Go go-stdlib tests Jack Leow
Swift + Grand Central Dispatch swift-dispatch tests Jack Leow
Swift + async/await swift-async tests Jack Leow
Swift + Combine swift-combine tests Jack Leow
Elm elm-worker tests Jack Leow
Rust + Tokio rust-tokio tests James Ward and Rust Developer Retreat Participants
JavaScript javascript-stdlib tests James Ward

About

cats-effect 3.x contribution to James Ward's easyracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 26.4%
  • Batchfile 25.6%
  • Swift 11.5%
  • Scala 11.2%
  • Python 7.0%
  • Elm 5.4%
  • Other 12.9%