This application runs various workloads against Lawncipher and PouchDB to :
- Compare their performance in the context of a hybrid Cordova app
- See what Lawncipher does well and what it doesn't
- See how much overhead is added by the cryptography in Lawncipher
This projects was developed as part of a semester project in a "Business Analytics & Intelligence" course given by Prof. Periklis Andritsos at HEC Lausanne.
This app was developed to see how Lawncipher would perform against other mobile document stores. Therefore, it is designed to test Lawncipher's features and capabilities. If a feature or a capability is not directly available in a "competing" document store, that feature is "added" in this app to allow the comparison.
Example of design choice, applying this principle: Lawncipher allows to store JSON, string or Uint8Array/binary blobs. It doesn't care which of these types of data you provide. It will store that data and remember of what type it was, such that when you retrieve the said data, it will recover it's initial type.
In PouchDB, before you store an attachment, you have to encapsulate it in a Blob
instance. When you retrieve the attachment from the document store, you have to reconvert/decapsulate the attachment yourself. In fairness, PouchDB allows you to indicate what type of data it is by providing a MIME string; but still, you have to do the conversion yourself.
I'm writing wrappers for every document store used in this app (to have a uniform interface to run the workloads on). In this current example, it's the object that wraps PouchDB that runs these data/format conversions, so that the wrapper can provide the same functionality/flexibility on every document store. And the time used by these conversions will be counted in the time taken to run the workload on the document store. I'll try to have an additional, separate time counter for these conversion operations, but I can't be sure yet that it will be precise enough.
- Node.js
- Cordova
- Bower
- Grunt
- Make
- iOS and/or Android SDKs
The workloads are a mix of YCSB-based workloads and Lawncipher-targeted workloads:
- Mostly-read : 95% reads and 5% updates
- Mostly-insert : 95% inserts and 5% reads
- Mostly queries : 95% compound queries and 5% updates
- Read/write combination : 50% reads and 50% updates
- Mixed : 55% reads, 10% inserts, 25% updates and 10% compound queries
- Collection size stress test : (targeting) 100000+ index documents in a single collection. See how it performs with advanced/compounds search queries
- Massive blob insertion and read: (targeting) 10000+ blobs of 100kb-200kb each (ie, an Instagram picture), 250 reads. See how it performs with advanced queries with blobs of that size
Assuming that you have installed the prerequisites:
- Clone this repository
- Open the terminal and move to the cloned repo's directory
- Run
make android
ormake ios
to build for Android or iOS respectively - To run the app on a physical device, run
make run-android
ormake run-ios