internet infrastructure • being without a data package on your phone • being on the tube or a plane • getting the train from Huddersfield to ... really anywhere @lornajane
client-side javascript can use • Can also sync to CouchDB (-compatible) databases • https://couchdb.apache.org • A NoSQL document database • Best replication on the planet (probably) • HTTP API = good support in all languages @lornajane
(https://stedolan.github.io/jq/) • hate curl? Try one of these • http-console https://github.com/cloudhead/http-console • Postman https://www.getpostman.com/ • for more, try this HTTP Tools post (and comments): http://lornajane.net/posts/2017/http-tools-roundup @lornajane
for ad-hoc querying It is a JSON structure containing: • Selector: the criteria to match records on • Fields: which fields to return • Sort: what order you'd like that in (use with Skip) • Limit: how many records (default = 25) @lornajane
--data @index.json { "result": "created", "id": "_design/e9b54f2ac34b8823ccbe8aaf6f406d464f50f521", "name": "Year" } Check which indexes are used by putting _explain where the _find normally goes! @lornajane
same key • CouchDB has useful built in functions for most things • Use reduce step when you want aggregate data • (SQL equivalent: a query with GROUP BY) @lornajane
and PouchDB (a more detailed example) • Polymer and PouchDB • React and PouchDB • Vue.js and PouchDB • React Native and PouchDB https://github.com/ibm-watson-data-lab/shopping-list @lornajane