3 ms·
Can you explain the "Fine-grained Object Containers" concept a little more? For example, how is this enforced: "JavaScript running in the user’s browser can ta
by slewis 10y ago
Can you explain the "Fine-grained Object Containers" concept a little more?
For example, how is this enforced: "JavaScript running in the user’s browser can talk only to the document container for which it was loaded, no others."
Do apps need to be SandStorm aware? Thanks!
- robotresearcher 10y agohttps://sandstorm.io/how-it-works#grains https://sandstorm.io/how-it-works#grains See also comments by Sandbox designer kentonv in this thread.
- kentonv 10y agoHi! There's an extensive explanation here: https://sandstorm.io/how-it-works https://sandstorm.io/how-it-works To answer your questions: > For example, how is this enforced: "JavaScript running in the user’s browser can talk only to the document container for which it was loaded, no others." Each grain (or actually, each session on each grain) is assigned a randomly-generated subdomain. These domain names are unguessable, so there's no way for one grain to know another's domain, and anyway same-origin policy generally prevents Javascript from interfering with other domains. (In the future, we plan to further lock down the client side using Content-Security-Policy, although we haven't done this yet.) > Do apps need to be SandStorm aware? Yes, apps need to be packaged for Sandstorm, and that usually involves some modifications to the app. However, the modifications are usually mostly deleting code: you delete your user management and rely on Sandstorm, and you delete your multi-document management and instead let the user create multiple grains at the Sandstorm level. Typically, this work takes a few hours, though it varies depending on the app. (It's also worth noting that apps which target exclusively Sandstorm from the start are much easier to write than normal web apps: User management, document management, security, access control, etc. are handled for you.)
- slewis 10y agoThanks. I'd poked through the howitworks. What threw me off was the reference to Etherpad, which made me think apps could somehow run on SandStorm unmodified. Makes sense now!