Hacker Newsnew | past | comments | ask | show | jobs | submit | more CrimsonCape's commentslogin

Can someone ELI5 from the experience of hosting a static site, what is the next step beyond a static CDN?

I am guessing the next step is paying for a bucket that that allows virtualized containers to run an OS? Or having a constantly-up node.js backend to generate server-side HTML? Is this essentially the generic description of self-hosting Wordpress on an own server?

Does integrating a payment processor like Shopify require something more than static hosting?


For Shopify in particular, they have a headless front-end services called Hydrogen[0] (with optional hosting called Oxygen). It's basically an opinionated wrapper around the storefront[1] and customer account[2] APIs, which allows interacting with the store from the front-end. It allows you to host Shopify on your own domain under your own control and gives a bit more customization than is available via hosted Shopify. It's what I run for the Creature Publishing site[3] and allows some extra customization for wholesale accounts, etc, without the exceptionally expensive enterprise (Shopify Plus) plan. To be completely honest, sometimes I question the decision over a simple hosted shop subdomain. Some light SSR/API calls are necessary for our setup, which is hosted on Cloudflare Pages/Workers.

[0]: https://hydrogen.shopify.dev/

[1]: https://shopify.dev/docs/api/storefront/latest

[2]: https://shopify.dev/docs/api/customer/latest

[3]: https://creaturehorror.com/


Next step in which dimension?

There is what modern JS world calls 'SSR' (server-side rendering) which is where, yes, you basically have a node server running to generate the HTML that is sent to the browser and that's then 'hydrated' into a client-side app. Doesn't necessarily have to be Node/JS though, other languages have their own frameworks, but JS is probably most common. This setup can then be fronted by a CDN for caching purposes.

That's not really related to the bucket concept though, it just runs on a normal server and serves everything (static and dynamic content), typically.

IMO the benefits of SSR (vs SSG or a pure static-file site) are marginal _unless_ you have a very specific use case. E.g. an ecommerce site where you want all your product pages to have great SEO, but you've got too many products to build them all at once.

Then again if you _only_ need a website (i.e. no API for other clients) then it can be nice to have end-to-end types in that kind of fullstack setup.

> Does integrating a payment processor like Shopify require something more than static hosting?

I don't know about Shopify but for e.g. Stripe you can do a lot on their hosted pages, without your own backend. If you want to automate things though, have user state based on payments, etc you will need a backend and a data store of some kind. But that could be an API that your static site points to.


I see lots of shader related videos but to me the worst part of GPU code is that the setup is archaic and hard to understand.

Does anyone have a good resource for the stages such as:

- What kind of data formats do I design to pipe into the GPU? Describe like i'm five texcels, arrays, buffers, etc.

- describe the difference between the data formats of traditional 3D workflow and more modern compute shader data formats

- Now that I supplied data, obviously I want to supply transformations as well. Transforms are not commutative, so it implies there is sequential state in which transforms are applied which seems to contradict this whole article

- The above point is more abstractly part of "supplying data into the GPU at a later stage". Am I crossing the CPU-GPU boundary multiple times before a frame is complete? If so describe the process and how/why.

- There is some kind of global variable system in GPUs. explain it. List every variable reachable from a shader fragment program


You’re partly asking questions about APIs rather than questions about GPUs. It might help to identify any specific goals you have and any specific tools or APIs you intend to use.

In general, you can use just about any data format you want. Since GPUs are SIMT, it’s good to try to keep data access coherent in thread groups, that’s the high level summary. There are various APIs that come with formats ready for you. Depends on whether you’re talking textures, geometry, audio, fields, NN weights, etc., etc.

I’m not sure I understand what you mean about sequential state contradicting the article. Shaders don’t necessarily need to deal with transforms (though they can). Transforms in shaders are applied sequentially within each thread, and are still parallel across threads.

Crossing the CPU GPU boundary is an application specific question. You can do that as many times as you have the budget for. Crossing that boundary might imply synchronization, which can affect performance.

For global variables, you might be thinking of shader uniforms, but I can’t tell. Uniforms are not globals, they are constants passed separately to each thread, even when the value is the same for each thread. You can use globals in CUDA with atomic instructions that causes threads to block when another thread is accessing the global. That costs performance, so people will avoid it when possible.

I hope that helps. Answering these is a bigger question than just shaders, it’s more like understanding the pipeline and how GPUs work and knowing what APIs are available. An intro course to WebGL might be a good starting point.


For graphics, there's a Lanterman course: https://www.youtube.com/watch?v=i5yK56XFbrU&list=PLOunECWxEL...


Shameless plug, but I wrote some blog posts because I had a lot of the same questions. In my case, I wanted to learn the WebGL APIs, so I wrote two posts:

* https://avikdas.com/2020/07/08/barebones-webgl-in-75-lines-o...

* https://avikdas.com/2020/07/21/barebones-3d-rendering-with-w...

I still go back to them myself to refresh my memory. It's funny that I called this a lot of boilerplate, but Vulkan is known to have even more.

This won't answer all your questions, but maybe it'll answer some of them.


Thanks, this helps. Do VBOs map 1:1 to meshes? Is there some point where I'm looping though meshes and sending every mesh to a VBO?


Looking at the web page is kinda ironic. A yacht builder proclaiming how much better the materials are for the environment. We could just build less yachts, for example. Nobody needs a yacht.

There has to be an interesting commentary here regarding the necessity of productive endeavours that pay taxes and fund local governments and drive investors portfolios into the black, all funded by useless largesse.


Yachts are not just rich-kid toys. They're useful in supporting ocean research, tourism, transfer vessels, security, etc.

It's super cool to find an alternative to fiberglass.

Maybe they could be used in wind turbines as well.


Well, 'research vessels' don't need to have gold-plated luxuries, etc.


Many people live on sail yachts. They are a very economical way to live.


So technically, a yacht is any leisure vessel. ie not a working boat. In the UK, a yacht is usually a sailing boat though we also increasingly have motor yachts. In the USA though, a yacht is a large motor powered vessel. So, when an American says 'nobody needs a yacht' they generally mean one of those, rather than a sailboat. Not sure what context CrimsonCape was using.


Nobody needs Netflix either. Think of all the electricity we could save if we shut it down.


Yeah especially when the unsolicited contact starts sending PDF attachments of "evidence".... felt like a classic phishing attempt


Here he is unironically citing Ted Kaczynski:

https://xcancel.com/RoguesPhilo/status/1814993224148066772#m


"I took 20 Americans on the most dangerous horseback riding expedition in central asia" and there isn't one AK47 in any of the photos. What a poser.


Do you believe there's a distinction between giving the minority too much power versus protecting them from having too little? It seems like the same thing said two different ways.


Giving the minority (Christian extremists in flyover states) too much power has caused them to start revoking the rights of everyone not them. Forget about protecting minority groups from having too little power, the main concern now is wresting control of our government in line with the principle of "one person, one vote" instead of "hectares of corn and churches take precedence over people".


Yes.


I found the reddit ManyBaggers recently and there is a cottage industry of high-end bags that seem incredibly made for the price that are in no way luxury products.


You missed the part where he said "make a device people want."


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: