Skip to content

feat(server): process requests in batch from a file#308

Merged
sebhoerl merged 1 commit into
developfrom
feat/server/request-batch-processing
Mar 6, 2025
Merged

feat(server): process requests in batch from a file#308
sebhoerl merged 1 commit into
developfrom
feat/server/request-batch-processing

Conversation

@sebhoerl

@sebhoerl sebhoerl commented Mar 6, 2025

Copy link
Copy Markdown
Collaborator

This PR lets users use the routing server infrastructure without actually starting a server on an HTTP port. Instead, one can put all the requests that one would send to the server into a JSON file, run the processing script, and obtain all responses in an output JSON file. The input requests and the output responses have the exact same structure as in the HTTP API:

java ... org.eqasim.server.RunProcessor \
  --config-path scenario_config.xml \
  --input-path requests.json \
  --output-path response.json 

Both the input and output files are structured by endpoint:

{
  "road_router": [
    { "origin_x": 1234, "origin_y": 5122, ... }
  ],
  "transit_router": [
    { "origin_x": 1234, "origin_y": 5122, ... }
  ],
  "road_isochrone": [],
  "transit_isochrone": []
}
  • Example for input.json in server/src/test/resources/processor/input.json
  • Example for output.json server/src/test/resources/processor/output.json

@sebhoerl sebhoerl enabled auto-merge (squash) March 6, 2025 17:05
@sebhoerl sebhoerl merged commit 8aac748 into develop Mar 6, 2025
@sebhoerl sebhoerl deleted the feat/server/request-batch-processing branch March 6, 2025 17:24
And128 pushed a commit to And128/eqasim-java that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant