commit | 85f25c84c2715016ffb77a947602194668a36969 | [log] [tgz] |
---|---|---|
author | Adam Sadovsky <asadovsky@gmail.com> | Thu Jun 25 10:20:21 2015 -0700 |
committer | Adam Sadovsky <asadovsky@gmail.com> | Thu Jun 25 10:20:22 2015 -0700 |
tree | beca8c87bcc0379e59f7cb85bb8f8453c61f596d | |
parent | ffc30a2e9052ed516edd0629f989854f311942a7 [diff] |
todosapp: wire up syncbase The good news: it works! The bad news: it's dog slow. Other notes: - I realized that it makes more sense to plug in Syncbase at the Dispatcher level, rather than have it implement the Collection API. It was a pretty quick change. - I sprinkled in various "NOTE" comments in places where I found the Syncbase API to be deficient or awkward. Change-Id: I9d7a10f11ed3eae48e2126af916cec85c9b7e9d2
Todos is an example app that demonstrates Syncbase.
make serve
$V23_ROOT/release/go/bin/namespace glob -v23.namespace.root=V23_NAMESPACE -v23.credentials=V23_CREDENTIALS "test/*" $V23_ROOT/release/go/bin/vrpc signature -v23.namespace.root=V23_NAMESPACE -v23.credentials=V23_CREDENTIALS "test/syncbased/todos"
problem was that the extension defaults to prod mounttable and assumes blessings minted by prod identity server, but local mount table and syncbased run with local credentials and do not include dev.v.io in trusted roots.
one solution is to configure the extension with local identityd, identitydBlessingUrl, and namespaceRoot, but this requires running Chrome as follows and manually editing the Chrome extension options on each restart.
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --user-data-dir=/tmp/foo
to avoid manually editing options, we could build the Chrome extension as part of “make serve” - that's what our tests do. ew.
alternatively, we can include dev.v.io in our local mount table and syncbased‘s trusted root sets, and have their “root dirs” allow access to anyone. secure b/c these services are only accessible on localhost. for this to work, we’d need to configure the webapp to talk to the local mount table.
even simpler, we could bypass mount table completely and have the webapp talk directly to local syncbased. in addition, instead of overriding the trusted root set, we can run the local syncbased with a dev.v.io blessing by using seekblessings. (both here and above, all extension opts are left untouched, and dev.v.io blessings are used.)