Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Make the Signbank Package API RESTful. #236

Open vanlummelhuizen opened 7 years ago

vanlummelhuizen commented 7 years ago

Now the Signbank API is using the standard authentication method of Django. It uses sessions and therefore it is not RESTful. When making Signbank RESTful, we need to use the existing user database. See also #189.

henrinie commented 7 years ago

This is a bit offtopic. Would it make sense to make the whole application RESTful? If we would divide the app into backend and frontend, we could perhaps develop a backend that we both (and others) could share, and then build our own frontends?

vanlummelhuizen commented 7 years ago

I guess it would take a lot of rewriting to make it completely RESTful. Perhaps a RESTful Django app is sufficient, although it will probably take some effort to make it work with the existing apps (/dictionary and /video). I also think that the backend is not completely sharable, it will always be tailored to one languages/research method. But perhaps @ocrasborn can give his view on this.

henrinie commented 7 years ago

I think I am a little confused. Is this REST api for the packaging functionality, or are you going to serve the files directly from Signbank to ELAN (and then perhaps cache them in ELAN)? Or is this for something else?

vanlummelhuizen commented 7 years ago

No, it is about the package functionality. I added 'package' to the title of this issue to avoid (hopefully) confusion.

vanlummelhuizen commented 7 years ago

@Woseseltops and I thought it might be wise to spent some time on this issue, because not only the package stuff is API-like, but there are also some other actions (e.g. /dictionary/update_ecv) that are API-like and should perhaps be behind authentication. What do say, @ocrasborn ?

ocrasborn commented 7 years ago

Agree.

henrinie commented 7 years ago

@vanlummelhuizen are you planning to implement authentication on the ELAN side? These features are API's, so it would make sense to make them RESTful.

I made a couple of suggestions how you could fix this without making changes in #281 , but I also think it is a good idea to make this RESTful.

Woseseltops commented 7 years ago
<harmaahy1je> interesting, there are packages that probably would make it possible
<harmaahy1je> have you looked into django restframework
<harmaahy1je> if you make this restful, please make sure you design it in a way that would not require the package feature
<harmaahy1je> just simple links would be fine
<harmaahy1je> perhaps this could be added directly into the ECV?
<harmaahy1je> also, don't enforce authentication
<harmaahy1je> it would restrict our use case, which is to keep it open. (well, for as long as we can, unless someone decides spamming the url would be fun)
<harmaahy1je> which probably could be fixed with caching
<harmaahy1je> any thoughts on these points?
henrinie commented 6 years ago

@vanlummelhuizen @Woseseltops Do you have any plans regarding this? I would like that it would be possible to deliver links to videos directly with the ECV. That way there would be no need to package any videos, and the users wouldn't have to download all the videos.

We are possibly starting to work on implementing the ELAN-video stuff into FinSL-signbank. Have you had any problems with the package feature? What happens to old video files that have been deleted from Signbank? Are they still in the packages? (I assume so, or otherwise the users would need to download all the videos again?)

susanodd commented 3 months ago

What about this issue? Close this?