rufuspollock-okfn / yourtopia

Web app for crowdsourcing preferences about index weighting such as the Human Development Index. Powers the YourTopia site - Global Development beyond GDP.
http://yourtopia.net/
14 stars 9 forks source link

Saving a user-generated index #15

Closed marians closed 12 years ago

marians commented 12 years ago

User should be able to hit "Save & Share". Then some information is shown, the user confirms and adds some personal data.

Data should be written to the http://thedatahub.org/dataset/yourtopia-italy into a dedicated resource.

marians commented 12 years ago

We also need a quickly accessible local cache of the user-generated data for the details display and browse pages. For the detail page we only need access by ID. For the browse page, the content should be sorted by ID descending and a lookup of the recent n IDs has to be fast.

In addition, we need a quick and fail-safe way to allocate a new ID.

Probably a local SQL(lite) database - in combination with the datahub storage - would facilitate things.

rufuspollock commented 12 years ago

SQLite will not be especially quicker than ElasticSearch -- i note we can have direct access to elasticsearch instance running in same cluster. However, if you want sqlite please just use that (and don't bother with ElasticSearch :-) )

marians commented 12 years ago

Sharing in the SQLite database is now implemented.

If we want to add writing to Elastic Search directly on thedatahub.org, we can extend the two functions to do so:

add_usercreated_entry update_usercreated_entry