tekuma / curator-portal

Interface for the Curation database
0 stars 0 forks source link

Create server-side daemon for handling workflow of reviewing submission. #62

Closed xstephen95x closed 7 years ago

xstephen95x commented 7 years ago

The curator-tekuma firebase database should have 4 branches used in the review process. submissions , approved, held, and rejected.

Each branch is keyed by the artwork_uid of the image/artwork in question. The curator has authority to move data between each branch. Though, some moves should trigger external responses.

  1. For any moves into the approved branch, the daemon should be triggered to (1) insert the data into the central SQL database and (2) add a field to the JSON in the approved branch to denote that it has been successfully inserted.

  2. For any moves into 'held' , the daemon should access the artist-tekuma firebase database, and change the submitted tag to allow for the artist to edit/revise their artwork.

xstephen95x commented 7 years ago

@slivingston Should we use HTTP, or firebase.database().ref().on() as an event listener?

slivingston commented 7 years ago

would the HTTP request be sent from client-side?

slivingston commented 7 years ago

if so, then there must be some server listening for connections from arbitrary hosts, which introduces security risks. Instead, I recommend the second approach that you sketch, i.e., using a queue from monitoring the Firebase database.

xstephen95x commented 7 years ago

I also recommend the firebase stack idea. It works well for the artist portal.

xstephen95x commented 7 years ago

All objects in the branch should be inserted in the curator SQL database. This can be done with a script with a listener such as firebase.database().ref("approved").on("child_added", (snapshot)=>{ do stuff }); After an artwork has been inserted, a field of imported should be added to the object, and set to true Alternatively, these can be removed from the DB, as the data is already present in the SQL DB.

xstephen95x commented 7 years ago

Began here : https://github.com/tekuma/artist-portal-image-daemon/tree/master/curator-daemon

xstephen95x commented 7 years ago

from meeting on feb 18, it was concluded that both the artist daemon and curator daemon can be ran on the same GCE instance, using different tmux sessions.

xstephen95x commented 7 years ago

Moved into separate repo

xstephen95x commented 7 years ago

Done in commit to curator-daemon.

xstephen95x commented 7 years ago

Restructure: