Hosting a static website (or static web resources) is easy. There are tons of ways to do it. There are even free ways to do it! Good ones even have apis or easy to script interfaces to get content there with a CD pipe.
Soy focuses on delivering an easy to use suite of tools and smart contracts to deliver content with style. Under the covers it uses ENS and IPFS, so it can't (virtually) go down, it's distributed so users everywhere can get it quickly.
Content under the covers is immutable. Immutability is the key. We all know that cache invalidation is one of the 2 hard problems in CS... Devs can deploy new versions all the time, and keeping every version available, andreferenceablee, makes caches easier to manage (see if it hurts, do it more often). We can also do things like like time traveling (what did the site look like at a specific date or what will it look like in the future?).
How does it work?
Boring: Soy is a smart contract that maps locations of files in a distributed file system, to a name.
Exciting: Soy is a collection of easy-to-use tools that give you the flexibility to get your content to your users when and how you want.
Soy consists of 3 parts:
A Smart Contract that is an ENS resolver. Think of this like DNS, but it's turing complete. The record resolves to a contentHash (an IPFS location) given a set of inputs, the name (obviously) as well as any other variable programed into the contract or any other input provided by etherium like the date, blockheight, current time, or "randomness". This gives us the ability to do things like blue/green deploys, a/b testing, slow rollouts, time-traveling, and dark launches.
A CLI to interact with the contract. Web3js is still a pain, unit conversion is a pain, writing scripts that you copy everywhere is a drag, Common actions are put here and are easily run in CI/CD environments.
A gateway. This is a shim until browsers support distributed file systems natively (see future). The gateway rewrites requests from the browser to a specific contenthash.
Why distributed? Why isn't AWS good enough?
AWS is great! Github Pages is great. They all make it easy to build and serve static content. Putting your content on the distributed web has some advantages. It's got a baked in CDN, as content is requested, it moves over the network bringing it closer to the people who want it. This makes it faster. Everything is hash addressible, this sounds like it would make caching even harder, but because it's a first class citizen, any solution for adding mutability to immutability eliminates the issue. All content is stored and accessed by it's etag and so all content is always up to date. Distribution allows devs to focus on the content and the user rather than their infrastructure. Setting up a global cache and CDN, and web server is a pain. It can take a while, and it can fail in complex ways. Using the world computer for what it's good for keeps you focused where you aught to be.
The future, aka: Why the gateway needs to be removed
In the world of the near future, there are IPFS nodes everywhere. They're in everyone's browser, they're run by ISPS (who are making money off their merkel boxes and filecoin) next to large population centers, and they're run in every home router. As content get's accessed it stays and moves closer and closer to users. When content is requested, it moves from peer to peer always keeping users next to their content. Distribution is easy because everything is hash addressible. Updating it is as easy as updating a contract. After that, the world computer handles propagation. We now have a world where we don't copy the same jquery file on thousands of origin servers, it's where people are using it.
Existing Work
Github Pages - Very good, slow-ish to update, can't do production deploys/roll backs etc
Self Hosting - This can all be accomplished with custom code, AWS Lambdas let you do something similar, but you have to write your own storage and web server, they're the infra.
Netlify - Hadn't read all the features of this guy until writing this, looks awesome, has it's own deploy pipe (could be bad, could cause weird pipeline things). Does a lot of extra stuff, auth, lambda management. Billed monthly (worse than one time forever). Does do split testing and can give you preview urls. Doesn't do time traveling.
Fit and Fitness
Netlify seems to be aiming to take over this space and is doing a good job at it. We can make it cheaper with a one time deployment cost, pay as you go, rather than a monthly subscription. This is better for things like open source maintainers
Github
The Problem
Hosting a static website (or static web resources) is easy. There are tons of ways to do it. There are even free ways to do it! Good ones even have apis or easy to script interfaces to get content there with a CD pipe.
Soy focuses on delivering an easy to use suite of tools and smart contracts to deliver content with style. Under the covers it uses ENS and IPFS, so it can't (virtually) go down, it's distributed so users everywhere can get it quickly.
Content under the covers is immutable. Immutability is the key. We all know that cache invalidation is one of the 2 hard problems in CS... Devs can deploy new versions all the time, and keeping every version available, andreferenceablee, makes caches easier to manage (see if it hurts, do it more often). We can also do things like like time traveling (what did the site look like at a specific date or what will it look like in the future?).
How does it work?
Boring: Soy is a smart contract that maps locations of files in a distributed file system, to a name.
Exciting: Soy is a collection of easy-to-use tools that give you the flexibility to get your content to your users when and how you want.
Soy consists of 3 parts:
contentHash
(an IPFS location) given a set of inputs, the name (obviously) as well as any other variable programed into the contract or any other input provided by etherium like the date, blockheight, current time, or "randomness". This gives us the ability to do things like blue/green deploys, a/b testing, slow rollouts, time-traveling, and dark launches.Why distributed? Why isn't AWS good enough?
AWS is great! Github Pages is great. They all make it easy to build and serve static content. Putting your content on the distributed web has some advantages. It's got a baked in CDN, as content is requested, it moves over the network bringing it closer to the people who want it. This makes it faster. Everything is hash addressible, this sounds like it would make caching even harder, but because it's a first class citizen, any solution for adding mutability to immutability eliminates the issue. All content is stored and accessed by it's
etag
and so all content is always up to date. Distribution allows devs to focus on the content and the user rather than their infrastructure. Setting up a global cache and CDN, and web server is a pain. It can take a while, and it can fail in complex ways. Using the world computer for what it's good for keeps you focused where you aught to be.The future, aka: Why the gateway needs to be removed
In the world of the near future, there are IPFS nodes everywhere. They're in everyone's browser, they're run by ISPS (who are making money off their merkel boxes and filecoin) next to large population centers, and they're run in every home router. As content get's accessed it stays and moves closer and closer to users. When content is requested, it moves from peer to peer always keeping users next to their content. Distribution is easy because everything is hash addressible. Updating it is as easy as updating a contract. After that, the world computer handles propagation. We now have a world where we don't copy the same jquery file on thousands of origin servers, it's where people are using it.
Existing Work
Github Pages - Very good, slow-ish to update, can't do production deploys/roll backs etc
Self Hosting - This can all be accomplished with custom code, AWS Lambdas let you do something similar, but you have to write your own storage and web server, they're the infra.
Netlify - Hadn't read all the features of this guy until writing this, looks awesome, has it's own deploy pipe (could be bad, could cause weird pipeline things). Does a lot of extra stuff, auth, lambda management. Billed monthly (worse than one time forever). Does do split testing and can give you preview urls. Doesn't do time traveling.
Fit and Fitness
Netlify seems to be aiming to take over this space and is doing a good job at it. We can make it cheaper with a one time deployment cost, pay as you go, rather than a monthly subscription. This is better for things like open source maintainers
Assumptions