ooo eee ooo
Sup. After yesterday’s post, I was doing some thinking about what I want on the website. I got some criticism on the quality of the post itself, and one of the critiques that I agreed with was, essentially, rant-y posts are going to be unorganized and not well written. That being said, I’m considering two ways to go about what I upload to this blog, as looking back on yesterday’s blog, and trying to extend that idea out into the future, results in a site that I don’t like. The first idea as to organize what I upload to this blog is to try and focus on my thoughts on a single thing that I learned that day, no matter how small. For example, today’s post after this preface will primarily be about Cloudflare Workers and R2 storage. The second idea is that more of a less strict version of the first, which I’m leaning into more. Essentially the second idea, on top of what the first allows, will also allow for posts that are more focused on pondering something in a structured way, and trying to write a conclusion on what was pondered about. I’m now noticing that idea 1 and 2 are the same thing, so I’ll probably be going with that in the future.
Anyways, I like Hatsune Miku a lot. While in the middle of my massive daily Minecraft session today, I couldn’t help but think to myself that I’m wasting my time. Before the previous semester, I’ve always had a major project or goal that I was working on in regards to programming, and recently the only goal that I’ve been focusing on is weight loss. To combat this, I was thinking of making a Minecraft mod to make crafting less tedious, and reflect the functionality of crafting in Factorio. But, I stopped thinking about that so that I could think about what to make for today’s post. This took me back to my enjoyment for Hatsune Miku, and this combined with me spending too much time looking at old 4Chan music videos on YouTube gave me an idea. Let me take my love for shitposting, and try to do something kool and kreative with it.
The randomized image/gif that you’re viewing at the top of this page is brought to you by Cloudflare Workers and Cloudflare R2 storage. It was pretty easy to get working, and I’ll try to describe how things work at a high level.
R2 storage is a storage solution for objects, aka, unstructured data. This idea of storing unstructured data is important in this aspect, as I’m storing multiple media types (gif, png, jpeg, etc.). Another key point mentioned by Cloudflare is that R2 makes it to where you won’t be charged with fees in regards to egress bandwidth. Egress fees stack up when anything you have stored is transmitted from your cloud storage to anything else outside of said providers storage. Hence, if I was using a different solution that didn’t take care of it, I’d most likely be looking at fees being charged towards me when you download any of the media served on this page, as well as if I were to ever want to migrate this data to anywhere else.
The second kool thing used to show these cute Miku images are Cloudflare Workers. Workers are these cool things that you can deploy on their own, and have any of your other applications interact with them when needed. One of the things that makes Workers special is that they are serverless. If you’re not familiar with the idea of something being serverless, a TLDR is that if you have a service running on a serverless solution, the underlying hardware is only used when the service is in use. As the service is being ran, the provider will scale up or down hardware resources needed depending on the current demand. This makes things extremely nice for some use cases such as this blog, where I just want to show some cute random images. I don’t have to worry about hardware whatsoever, and if there is a sudden influx of users, I won’t have to be worried about some upper-end limit on bandwidth that I would have had to set if I was using a non-serverless service.