Jon Gjengset,
Tej Chajed,
Jelle van den Hooff,
M. Frans Kaashoek,
James Mickens,
Robert Morris,
and Nickolai Zeldovich
Users pick a single provider they trust to provide storage, and be the gatekeeper for their data: an Amber provider.
Amber.login(username, password)
Amber.create(object) -> handle
Amber.setACL(handle, principal...)
Amber.get(handle) -> object
Amber.subscribe(SQL)
Amber.scan(SQL, SQL) -> object...
His tweet application creates an object at his provider:
email = Amber.create({
"type": "tweet",
"content": "I wish Alice could see this; she's so great!",
})
And grants the public at large access to the object:
email.setACL(["*"]);
Amber will transparently ensure that the object is made available to other users.
His e-mail application creates an object at his provider:
email = Amber.create({
"type": "email",
"subject": "Hello Alice",
"content": "You're the best!"
})
And grants Alice access to the object:
email.setACL(["alice@p0"]);
Amber will again transparently ensure that the object is made available to Alice.
Her tweet application calls Amber.subscribe()
with:
SELECT OWNER() as tweeter, content
WHERE OWNER() = "bob@p1"
AND type = "tweet"
This query finds Bob's tweet, even though it was created at a different provider than Alice issues the query to.
Her e-mail program calls Amber.subscribe()
with:
SELECT subject, content
WHERE type = "email"
This query finds and returns all matching objects at all providers that Alice has access to.
Alice subscribes to #catphotos.
p0 registers a subscription for matching photos.
p0 sends the subscription to all other providers.
p1 registers the subscription locally.
Bob creates a cat photo on his machine.
And sends it to his provider p1.
p1 stores his photo locally.
p1 then notifies p0 as the photo subscription matches.
p0 caches the photo in its local store.
p0 then sends the photo to Alice's application.
Alice's application shows her the photo.
Now assume Carol also wants to see #catphotos.
She issues the same query as Alice to p0.
p0 sees that the query is identical to Alice's.
p0 can therefore send the results directly to Carol.
And Carol's application can show the photo to Carol.
Exploit similar queries across users and applications to avoid duplicate work.
Subscriptions are shared; the number of subscriptions does not have to depend on the total number of users.
Can instead depend on number of involved providers.