4 ms·
Hi, nice idea! It went down though so I was thinking maybe you could build it strong but on the cheap too without needing a database and very little coding. It
by sebringj 10y ago
Hi, nice idea! It went down though so I was thinking maybe you could build it strong but on the cheap too without needing a database and very little coding.
It starts with this premise: https://aws.amazon.com/articles/1434/ https://aws.amazon.com/articles/1434/
There is an approach I've used for years and my site never goes down with high traffic and I didn't use load balancers or anything fancy. Its very cheap to run and maintain.
1) Use Amazon S3 and Cloud Front for all your web pages, including your web app as well along with storing anything such as file uploads, etc.
2) Have a simple cheap $5 Digital Ocean Droplet (Node or Go) used only as an API.
3) JavaScript is hosted on your website front end that upon save for content then hits your API server just once to get a Just-In-Time signing request that authorizes the web browser to make an upload directly to S3 temporarily and signed to a specific namespace/bucket. This type of traffic happens very less than say viewing a web page along with it taking up very little processing and bandwidth so you really don't need to scale this.
4) The web browser's javascript literally creates the entire html page and uploads it directly to S3.
You can easily do image uploads as well or video too using this method and use the just-in-time signing method for those too.
Yes it is not secure if there is no signup etc but you can do crypto.generateRandom to put people in specific namespace path then show their URL after, controlling limited permissions and the location of where things are saved from your cheap API server.
Here's my little repo for signing to demonstrate this -> https://github.com/sebringj/siggy https://github.com/sebringj/siggy
Just a thought.
- qbaqbaqba 10y agoYou may also use AWS Lambda and AWS API Gateway.
- sebringj 10y agoSure you could. The funny thing is, I've had this product on the market using this very concept of JIT signing, using the browser (and apps) to do all the work, didn't really put any effort into, only used for my clients as a CMS-as-a-service or CMSSAAS WTF? called kitgui.com, been on some department store brands using it for ecommece sites that i've put as a consequence of needing this on multiple backend platforms. Any hoo, never goes down, never had to do jack shit scaling or worry about it but I've completely neglected it so it looks like 2010 crap themes and diy web standards. Anybody want to partner up on it and make a bad-ass json cms that spreads to all devices? I'll gladly divvy % on current revenue.
- iso-8859-1 10y agoYou could maybe convince me that this is good if you cared enough about it to host an instance yourself...
- sebringj 10y agoAlas, only doing this for karma and a false sense of belonging, beyond that, I like money.