-
Notifications
You must be signed in to change notification settings - Fork 32
Description
From #974 (comment)
Okay, another note that will potentially be raised soon. Currently, the supported processing-worker CLI is still the old one:
# 1. $ ocrd processing-worker <processor-name> --queue=<queue-address> --database=<database-address> # 2. $ <processor-name> --queue=<queue-address> --database=<database-address>We (me and @joschrew) are aware that in the spec there is a change that is not adapted here, yet:
# 1. Use ocrd CLI bundled with OCR-D/core $ ocrd server <processor-name> --type=worker --queue=<queue-address> --database=<database-address> # 2. Use processor name $ <processor-name> --server --type=worker --queue=<queue-address> --database=<database-address>Where the
--typecan be either:worker(processing worker)ocrd server <processor-name> --type=worker --queue=<queue-address> --database=<database-address>or
server(the REST API wrapper based on #884).ocrd server <processor-name> --type=server --database=<database-address>However, it's a bad idea to extend the processing worker code to support the REST API processing server (aka standalone processing worker that has nothing to do with the bigger Processing Server in the spec and does not need the queues).
Now, try to imagine a good way to explain to the OCR-D community without confusing them:
- why the
<processor-name>is a server, but is not a server when--type=workerand is referred to withprocessing-workerand no direct requests can be sent- why the
<processor-name>is a server, and actual server when--type=serverand is referred to withprocessing-server- why both are grouped together under
ocrd server...or... --server ...but potentially implemented together underprocessing_worker.py- why Processing Server (PS-big) and processing servers (PS-small), standalone ocrd processors, are different concepts but both referred to with
processing server.Sounds confusing? It's even more when it has to be implemented in a clean way. So there are 3 main reasons to not adapt that yet:
- The priority changed a bit and the higher priority now is to deploy working Processing Server, Workflow Server, and Workspace Server together on a live VM instance, so KITODO can use that to continue their development.
- Identify and fix problems that arise when combining the 3 servers above from 2 different repositories (Processing-Server #974 and reference WebAPI impl).
- To not complicate the current implementation without first trying to think how to separate concepts properly and avoid potential problems. Ideally:
- the standalone processing servers (aka server processing workers) should be implemented as a separate class (name suggestions?), sibling of
ProcessingWorker, and both will share the common methods.- the CLI for both should be separated with improved naming conventions.