Daily Post Image from Upsplash

August: 19th

2024

Worker Time to execute the worker library, I been holding the command off for a bit.

pnpm nx g @nx/js:lib worker --importPath="@kbve/worker" --publishable=true

Let us start with the base library, I am thinking a singleton to handle the workers? We would create a singleton worker manager class and then have that manage the different pool of workers. I am thinking that we split the worker library into two unique classes, the minion and the warden. Each browser will only have a single warden that is running but can have a pool of these minions? The initial load will be a single warden and two minions, but if the user has the resources, we can increase the pool size. The warden would be the first class that our future main scripts would initialize and that would provide a pool of minion instances for us to reference.

Okay mapping out the different aspects of the task system and warden system, we are getting closer to a functional setup. For now, let me throw up a bunch of these base files for the general concept. Afterwards, I will try to test case and see where we can establish a working proof of concept. Besides adding in the comlink, we also need to make sure that the tanstack query core is also included in this setup!

Vault The vault seems operational, I am going to double check it again right before I leave! It does scare me a little bit because it is important for me to make sure that I can grab the important details anywhere from the world. I can not come back to my pc magically when I am floating around.

Supabase The version of supabase/postgres needs to be updated on the docker compose to be around 15.6 rather than the 15.1 that was stated within the default compose. Hmm, let me go through all the generic break downs of the services:

  • studio - the iamge that was being set from the start was supabase/studio but we might want to update that to the 20240729-ce42139 version.

  • auth - The gotrue version that we the docker compose has is set to v2.151.0 and could be upgrated to v2.158.1 ? We can look further into this.

  • rest - The stack version is v12.0.1 but the latest compose example image has it set to v12.2.0, so we will have to see what is getting upgraded.

  • realtime - Once more the current version is v2.28.32 and latest version seems to be v2.30.23.

  • meta - The outdated compose has it set to v0.80.0 and the latest version from the example stack is v0.83.2.

  • functions - Seems to be the same situation for the edge, i.e needs to be bumped up to supabase/edge-runtime:v1.56.0

  • db - The big one, it seems that the version they are recommending for the self hosted is 15.1.1.78 and the one that is under the compose is 15.1.1.61.

  • kong - kong:2.8.1 that seems like it will be okay for the current version, so we can keep that the way it is. Could be a good reference to keep track of.

  • storage - This seems fine at v1.0.6.

  • imgproxy - The darthsim/imgproxy at v3.8.0 seems fine currently.

  • analytics - This seems fine at around logflare:1.4.0

  • vector - This seems fine - 0.28.1-alpine.

Even though I can see some of the pain points that Supabase will bring to our eco-system, the tradeoffs will be worth it in the long term.

ZeroCopy While preparing to launch the internal supabase, I need to start preparing the rewrite of the rust api and the zero-copy reference fun! I would be a bit concerned with how I will handle the supabase interaction within the api but during my test casing, we were able to get a small api up and running that was under 20MB! The size of the image was also smaller and the jemalloc made it so much easier to scale out, oohhh the next month will be so much fun.

Realtime The realtime configuration will be fun to build out within Cryptothrone and having each of the NPCs have their own edge functions. This would make each NPC have unique abilities that could be written in different languages without having major drawbacks. Granted a python or nodejs process would be slow to run, even at edge, there are a couple cute and cool tricks that we can use! Having cloudflare deploy wrangler-style functions will be a dope prize for us to obtain this year.

Flight Preparing to venture to Zurich and then eventually to Italy! I will try to take a bunch of photos and maybe keep a written travel log that I can convert over.

KiloBase The idea of setting up a postgres / supabase image that has additional plugins already setup and ready. I am thinking that we could call this the kilobase for the time being.

Airport Family got through the airport terminal and the new systems that they have in place makes going through TSA painless. Furthermore, having some decent internet speeds too, this might be the first time that my airport journey has been amazing. Well this time and of course the airports in Amsterdam!

Warden The major focus for the worker package will be the warden system and how it will handle the minion scaling system. I am still a bit on the fence for the amount of resources and power that it will be using, yet I think it will be worth it in the long term. Next, we have the new types.ts to add into the Worker library, which will start with the very basics and then update it again later on. I am not too sure if we need to use enums for the TaskStatus but for now it would be fine. Actually we could use a better way to handle it by having an integer value but we can loop back.

WriteOnFlight Since I will be in the air for a couple hours, I wonder how I will balance out the mini jail. My usual plan would be to get wasted and pass out, but since the flight is not really that long, the second best option would be to just write away. I am thinking about how much I will be able to write without having internet?

About to board the flight in about another 20mins.

PostGres

I am trying to run postgres from my laptop but I made a big mistake. I forgot to download all of the extensions, so now I am stuck without being able to run pgvector on the 8 hour flight. Its okay but I was really hoping to have this resolved in this flight but damn, we have not even taken off.

2023

  • 3:37PM - Fixing up the Login system so that it works across multiple domains. I will have to delay any major notes for today because of the current project.

Quote

Neatness begets order; but from order to taste there is the same difference as from taste to genius, or from love to friendship. — Johann Kaspar Lavater


Tasks

  • [ ]