Replies: 6 comments 6 replies
-
If the Web API is simple enough, and for simple use cases, maybe client libraries wouldn't be necessary? Some thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @josteinaj. Good suggestions.
We've also thought of this. It would indeed simplify the usage if there was a choice between XML and JSON.
The idea is good, but I don't know if it's feasible, because the job request XML format is not totally trivial.
Yes, good idea.
Good idea. But I don't think this needs to be settable on the level of individual jobs. I suggest that we try to accomplish this with a global setting. If you disable persistence (with the We could add another setting for the time the jobs are kept in the volatile storage (currently forever).
Not sure if this is what you mean, but there is an undocumented |
Beta Was this translation helpful? Give feedback.
-
I have a Python and a Clojure client library in production. These are quite rudimentary and just do the bare minimum get get the specific scripts working that we need. I do not plan to further improve the Python client library as I want to retire that code. In the case of the Clojure client libraries I have indeed thought about making it into a separate library. But I'm almost a bit embarrassed to do so as it is so rudimentary and doesn't even cover the whole API surface,
Did I say that? IMHO there is a bit of a mismatch in that a "classic" RESTful API deals with resources, their addition and removal. The pipeline is at its core a functional API: you invoke some function, give it some input and you get some output. In order to be RESTful, I guess, we introduce the concept of jobs, that you can add and delete. But fundamentally the end user doesn't care about jobs. They just want their conversion to happen. So IMHO there is this conceptual mismatch. But do we need to do anything about it? I don't think so. RESTful is a useful concept and well established as an API. |
Beta Was this translation helpful? Give feedback.
-
Maybe the idea of a synchronous API would be a step towards a more functional API? But then I'm not so sure. It can be asynchronous, just do not force me to create a jobs and dispose of it afterwards. |
Beta Was this translation helpful? Give feedback.
-
No, it was Benetech who made this comment:
A synchronous API would help, but comes with some other challenges:
I do like the idea of not having to delete jobs. But can that be RESTful? |
Beta Was this translation helpful? Give feedback.
-
@egli Thanks for the research. That's interesting.
I think how the web API currently works is already very similar to what the pattern prescribes. The difference seems to lie mainly in the return codes and the use of the
I'm not sure whether a WebSocket API could solve the issue of having to delete jobs.
Hm, I don't really like this idea. There are too many assumptions.
If the client authenticates with the server, such an ID is already included. But still, I don't like that this would work only in the specific case of clients running one job at a time. A setting for the time the jobs are kept in the (volatile) storage sounds simpler and better. Ideally, I would like a solution where a job, once results are fetched (or possibly once the final job XML was returned), is automatically and immediately removed from the job list. The links to the result files (and perhaps the link to the the job XML as well) could possibly remain active for some time, but the job list would not include the job anymore. If a job completes but the results have not been fetched yet, the job should remain in the storage. |
Beta Was this translation helpful? Give feedback.
-
We are currently in the process of analysing your responses to the Pipeline usage survey held earlier this year. Some of the feedback requires some more elaboration or discussion. Below are some responses in the topic "setup":
I would like to know:
Beta Was this translation helpful? Give feedback.
All reactions