-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Now that the job and script APIs have been reworked and made more generic (XProc agnostic), the opportunity is there to add other backends.
1. Pipeline 1 backend
A first idea is to add a Pipeline 1 backend. This would provide an alternative to porting scripts from Pipeline 1 to Pipeline 2 and would allow discontinuing the Pipeline 1 GUI and give access to Pipeline 1 scripts in the new Pipeline 2 GUI.
2. Web server backend
A second idea is to add a backend that dispatches jobs to one or more Pipeline web servers. It is a combination of two older idea's and one fresh use case:
-
Unified Java API. The idea, originally launched by Jostein, has been around for a while to unify the "direct" Java API and the Java client library API to connect to a server over HTTP. The benefit is that users can easily change between the two methods to call Pipeline 2, and that we would uncomplicate and eliminate our code base.
-
Scaling. The idea to be able to scale Pipeline came from MTM and they have probably implemented something for their specific needs already (but haven't shared it). My idea for addressing this request was to have a web server that would connect and dispatch to multiple other web servers and that would manage the pool of servers based on the load and would also do load balancing based on the load of each server.
-
A new use case is a project I’m doing that uses Pipeline as a Java library and that needs to run jobs one at a time (one job per invocation of the tool), but ideally without the overhead of starting and stopping the engine each time. The solution could be to fire up a web server that will keep running in the back, also when the process ends, and connect to it each time. There are however a number of hurdles with this and I would much prefer if there was a reusable component that would do it for me:
- The Java API (after the rework) is more streamlined and rich than the Java client APIs (both the pipeline-clientlib-java/pipeline-clientlib-httpclient and pipeline-clientlib-jaxb versions).
- As a user I don't want to be bothered with managing the web server process. It could be done automatically behind the scenes.
- I don't even need to know that the implementation is based on a HTTP server. It doesn't matter how it is implemented.
The new component I'm thinking about would provide all of the above features. It would implement the script and job APIs and would have the following additional configuration parameters:
- whether to automatically fire up web servers or connect to a existing ones
- whether to fire up servers using Docker or the normal way
- connection info (addresses, authentication info)
- whether to use fixed port numbers or automatically assign free ports
- location where to store PID and port number info of launched web servers
- locations of home directories of launched web servers (only when persistence is needed)
- whether to automatically stop servers when they have no more jobs in their queue or force the user to stop them through an API call
- load balancing settings