inception-project / inception

INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.
https://inception-project.github.io
Apache License 2.0
600 stars 153 forks source link

Add connection checker to external recommender settings #726

Open jcklie opened 6 years ago

jcklie commented 6 years ago

Is your feature request related to a problem? Please describe. When creating an recommender, it is required to check whether it can be reached by INCEpTION. Right now, one needs to create it, go to annotations and try it out to see whether it works. In error case, one needs to read the log files which is not nice, especially for not self-hosted systems.

Describe the solution you'd like Add a connection checker button next to the recommender settings for the remote URL.

jcklie commented 5 years ago

I would require external recommender to implement OPTIONS for their remote URL. This resource just should respond with 200 and set accept to json. The checker on INCEpTION side then would just query that when pressing a button in the traits.

reckart commented 5 years ago

I believe the equivalent of a "ping" is a HTTP HEAD request, no?

jcklie commented 5 years ago

I think both would work out. I did not find too much information about HTTP ping, so I am not sure.

reckart commented 5 years ago

A head request probably already works with the existing implementation without any additional effort. Would be worth a try.

jcklie commented 5 years ago

My code does not listen to HEAD, just GET and POST

reckart commented 5 years ago

Interesting - I thought that HEAD might be implicitly handled by the web framework you are using.