openpaperwork / paperwork

Personal document manager (Linux/Windows) -- Moved to Gnome's Gitlab
https://gitlab.gnome.org/World/OpenPaperwork/paperwork
2.43k stars 149 forks source link

RESTful / Hypermedia backend #265

Open bignaux opened 10 years ago

bignaux commented 10 years ago

I'm trying to add RESTful/hypermedia capabilities to paperwork to use it for example -

I've studied a lot of architecture pattern on the subject. I began with a Flask based solution. They are a lot of thing in frontend that need to be moved in backend (perharps job scheduling).

Advantages

• far better data model ( settings:ocr/devices , document ) • asynchronous (for non blocking) • multiclient connection (thanks http) • authentication (thank http) • validation ( json schema on the go) • versionnable API • less code • easier to develop backend/frontend see https://en.wikipedia.org/wiki/HATEOAS • plugin pattern using http://lv2plug.in/ns/ but json-ld instead of rdf for plugin description/discovery see hydra over restful here http://www.markus-lanthaler.com/hydra/spec/latest/core/

jflesch commented 10 years ago

You do realize I designed Paperwork as a fat client on purpose, right ? I want to keep things as simple to use as possible for the users. Installiing their own server is not simple.

bignaux commented 10 years ago

And it would probably be too lot of change anyway. I think i better have to write from scratch a new thing and don't disturb here. Anyway, i keep in mind that it would be better if it usable by paperwork later the key here is my effort should be profitable to paperwork.

The pipeline step stuff is the main difficulty i've to solve in my design. This hypermedia and dataset makes me really enthusiast and would be definitively useful for processing scan&forget data.

jflesch commented 10 years ago

Something that could help you: I've been thinking for a while to split Paperwork in two pieces : a library (basically the backend) and a GUI (the frontend right now). People could then reuse the backend for whatever they want without ever polluting my precious GUI :)

Also, regarding the jobs in the frontend : the backend is not thread-safe (depends on too many non-thread-safe libraries). Unfortunately, to keep the GUI as smooth as possible, I had to use threads. In the end, jobs in Paperwork are basically a workaround. Details are available here: https://github.com/jflesch/paperwork/wiki/Hacking-guide#thread-safety )

jflesch commented 8 years ago

I think this ticket is related to #146

jflesch commented 7 years ago

Just FIY, #328 (split backend / frontend) has been done.