Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support concurrent requests #13

Open
cmdoret opened this issue Feb 23, 2025 · 0 comments
Open

support concurrent requests #13

cmdoret opened this issue Feb 23, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cmdoret
Copy link
Member

cmdoret commented Feb 23, 2025

afaict, the shacl subprocess is currently a bottleneck, as it:

  1. blocks execution
  2. always use the same data/shapes filename

We could take advantage of fastapi's async capabilities by:

  1. running shacl asynchronously (e.g. with asyncio.create_subprocess_shell and/or a queue)
  2. using temporary files with random filenames (e.g. via tempfile)

This would allow handling multiple requests concurrently. In practice, this means the API server could be operational and receive data for next requests while shacl is still running.

@cmdoret cmdoret changed the title support concurrent request support concurrent requests Feb 23, 2025
@cmdoret cmdoret added the enhancement New feature or request label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants