Week 8
Web Containers
After settling down a bit from all the stress of moving to the new apartment, I decided to give WebContainers a spin again and see if there are any things I could still do to find my way around the issues I was having. I also see if other people who have given it a try is having same challenge. Since this is a tool specifically made for the JavaScript ecosystem, it was pretty difficult finding help around Laravel use cases. After so many back and forth I decided to just pause this and look around for other solutions to achieve what I want to do.
A sure and reliable alternative was to run everything inside the docker container that runs the notebooks but that seems to be more expensive in terms of resource. Thinking about it, I believe it is better to have something that works and resource hungry than not have any at all, so I decided to put some attention into that solution instead. We already have the pieces of what is required to get it done, the work is in putting them together. If a solution like WebContainer do work in the future, it might lead to significant reduction in the impact on the available resources.
It seems navigating to notebook page over inertia didn't include the right header needed for WebContainer to work. I might need to include it as a global header across our apps
Nodebox
During the week CodeSandbox announced their own node-in-the-browser solution called Nodebox. A solution similar to WebContainer in the problem that they solve but different in how it was achieved. When I heard this, I quickly run through the doc to see if it could address the challenge I had in WebContainer. Nodebox’s solution uses a different tech that should prevent the problem with CORS. After some digging, it seems to be a little more complex to setup compared to WebContainer, hence, integrating wasn’t that straight forward. As I did for WebContainer, I had to write a different implementation for grabbing the entire filesystem of a running notebook and that seem to be an extra work.
After a few trials, I manage to get something working. My joy was only shortlived when I hit another wall in an area I believe is specific to Laravel and not the technology itself. As it seems, node in the browser might not be so applicable to what I’m trying to do since these solutions tend to be focused on the JavaScript ecosystems for now and not JavaScript in other ecosystems. As they mature, I think they will be more versatile for use in other scenarios and that will be a nice thing since the browser will basically be capable of more when running web applications.
I hope to give this a try once again in the future while focusing on running everything in the container for now.
Started German Class
After some months of waiting, we started attending a German class. After some recommendations, we paid for the A1.1 class later last year and have been waiting to start it. Personally, I’m happy that I’m getting the chance to learn a new language as I feel this is a mountain I would like to climb successfully. I’ve only ever learnt English formally through the school while growing up and haven’t tried to learn another. We were taught French in school but I didn’t really take it serious. So, to me, learning a new language and being able to communicate with it seems like magic.
Starting this class is more of fear mixed with excitement. The fear that I wouldn’t be able to learn it most especially. Now that I’ve attended the first classes, I won’t say this mixture has gotten any better but rather reinforced. A reason due to the fact that the class tutor uses German all through and I just have to guess my way through understanding majority of the 1.5 hours class. On the part of excitement, it feels good to see some German words finally make sense or be able to introduce yourself in German.
As for learning, our goal is to learn as much as possible to meet the language requirements of both our permanent residency and maybe Citizenship. So, this is pretty important for us. I really look forward to the end of this class to see what the outcome will be and most especially to see the outcome of this teaching method.
Election in Nigeria
A lot has happened in Nigeria in the last few years and we are all on edge as far as looking forward to the next leadership is concerned. Most people looked forward to this election and it is finally here. Even though my Wife and I were out of the country, we followed all the developing stories regarding the upcoming election and anticipated along with everyone else back home.
One part that has been part of our interest is the developing third-force that makes this election totally different. Election in Nigeria has always been between two major players which the majority of the youth in the country including myself regard as same people being recycled in the name of political parties. Many things have led to how the third force has come to be but we are all happy there is a third challenger.
Now on the day of the election we were online for majority of the time trying to know what people are saying about what is going on around the country. We hosted some of our Nigerian friends who were on the same issue and we watched some of the announcements together. We had same complaints about the need for our country to change leadership party-wise. Even though we were already all worked out due to the results that are being declared, we couldn’t help but keep looking out for how the end will be.
Laravel Vite support using Container itself
I’ve been exploring running Vite inside the container running Laravel notebooks on PHPSandbox and it seems to be going fine. I’m happy this might finally work out due to how important this is. In the Laravel community, discussions around frontend tools doesn’t go unnoticed as Laravel is used by many as a Fullstack platform where they can develop frontend and backend in one code base. With this, it makes sense to make it possible to run Vite in the container so users can serve frontend assets in development.
After some hours of changes I got a rough version of this working with some glitches which happens to be from the Tunnelling server being used. Although this is something major, I think it’s easy to approach since I have access to the code of the tunneling server.
The issue is around the inability of the Tunnelling server to support long running connections like WebSocket of which Vite depends on. This causes the pages served to keep refreshing. I have inspected the code on the tunnelling server and think it should be straight forward to bake in support for long running connections. If this works, it would be a significant step in bringing more support for Laravel which is an important framework in the PHP community.
Joining a new team team
Out of my surprise, my lead reached out concerning a new team. I’ve always look forward to joining a new team but I didn’t expect it at this time. I’m exited in some way about the new problem we’ll be solving which is around AI - it serves as an opportunity to learn about an emerging technology as well as working with new people.