WebAssembly in Action

Author of the book "WebAssembly in Action"
Save 40% with the code: ggallantbl
The book's original source code can be downloaded from the Manning website and GitHub. The GitHub repository includes an updated-code branch that has been adjusted to work with the latest version of Emscripten (currently version 3.1.44).
Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Tuesday, February 28, 2023

ConFoo 2023 in Review

My experience at ConFoo 2023
On Tuesday, February 21st, I started my journey to Montreal to speak at the ConFoo developer conference for my third time.

Usually, when I travel to the big cities, I try to use public transportation to get to and from the airport. The city I live in isn't very big but I decided to give our transportation system a try anyway.

Unfortunately, for me to get to the airport using this approach, I needed to take two city buses and then a coach bus. It's doable but it takes time and the coach bus only goes to the airport twice a day so the timing didn't allow me to use this approach when I returned.

One highlight of my trip to the airport, however, was a pheasant that graced me with his presence.
The conference was held at the Hotel Bonaventure where we were greeted by over 700 attendees and over 150 sessions in 3 days! Being in Montreal, it was fitting that some of the sessions were also available in French.


The past two times that I spoke at this conference, I only spoke for one session each time. This year, I gave two presentations.

My first presentation was given on the second day of the conference. For this session, I talked about how we're using Docker at Dovico to prototype views, try out different UI frameworks, and help speed up the development of Timesheet.
The second presentation that I gave was on the final day of the conference. This time, I walked the audience though creating a Slack bot from start to finish by building a simple hot desk booking system!
My slides, notes, and links to the code from my talks can be found in the following GitHub repository: https://github.com/cggallant/confoo-2023

As my new friend, Andres Pineda, so correctly articulated in one of his sessions, there's more to a developer conference than just taking in the talks. There's also a networking component to these conferences. When I saw him at the opening party for the speakers, I recognized him but couldn't figure out where from. Later I realized that I had seen him talk online as part of UnoConf and he's one of the contributors to the open-source Uno Platform. We have something in common because I've been privileged to work with Uno and write them several articles for their blog. We were able to connect during the conference.

Speaking of the Uno Platform, while I was in Montreal, I had the opportunity to meet Matthew Mattei in person for lunch. I work with him when writing articles for their blog. I wasn't expecting it but I do appreciate that the Uno Platform sent me home with some swag: Over the course of the conference, I was fortunate to meet some great people and to take in a number of really good sessions. My only regret is not being able to take in all of the sessions because there are usually 8 other sessions happening at the same time as the session that you're in.

On Saturday, February 25th, I made the journey from the hotel back to the Montreal airport. I thought this was a neat idea as I was walking through the airport to my gate: It was a great conference and I already miss it. I hope to be able to attend next year's conference and I recommend ConFoo to everyone.

A huge shout out to Yann Larrivée for putting on another amazing event!


As a side note, if you happen to be putting on a developer conference, or know of one that's looking for speakers, let me know because I'd like to speak more. I've started setting up a Sessionize profile but you can also reach me on Twitter or on LinkedIn.

Wednesday, April 14, 2021

From ConFoo to deploying web applications with Docker

The story of how discovering Docker helped me create the demos for my ConFoo 2021 presentation about the WebAssembly System Interface (WASI). Then the continued learning about Windows containers resulting in my latest Uno Platform article about Deploying C# web applications with Docker.
In 2020, ConFoo opened a call for papers for their February 2021 conference. I submitted several proposals and was pleased to find out in January 2021 that one of them had been accepted.

The talk was going to be about the WebAssembly System Interface (WASI). I knew what I wanted to talk about but I wanted a couple demos that were more real-world than the typical 'hello world' style. I had an idea for the applications I wanted to write but, to write them, I needed to compile some C libraries. Unfortunately, I was having some difficulties getting things set up on Windows.

My first thought for a workaround was to set up a Linux virtual machine but I was curious if there was another way. One thought that crossed my mind was, can Docker help here?

Docker

I had seen Docker demonstrated at a couple user group events but I hadn't used it myself so I needed to get up to speed quickly. Thankfully, I found the following YouTube video that not only explained the Docker theory but also walked through several examples that I was able to follow along with: https://www.youtube.com/watch?v=3c-iBn73dDE

After watching the video, I started looking though the images on Docker Hub and discovered that there's a Docker image for the Emscripten SDK. This is useful to me for a couple of reasons:
     
  • I prefer to have Emscripten use the versions of the tools it installed rather than a different version on my machine just in case the changes impact things when compiling a module. Being in a container, all the tools Emscripten needs are in the container with it allowing me to adjust the tools on my machine as needed.
  • I often switch between versions of Emscripten to test different things. Having an image for each version I need makes things a lot easier. Sometimes I've had to uninstall a version of Emscripten before being able to install the next one. Now, I just need to pull and run the image with the version I need.

In the end, I created a Docker image derived from an Emscripten image and was able to build the demos I wanted for my ConFoo talk.

A few days before the ConFoo conference started, I was talking with the Uno Platform team about Docker. I thought Docker might be useful for C# developers for one-click deployment because I saw on Docker Hub that there was an image with IIS (Internet Information Services).

An article about Docker

After the conference was over, I started looking into Docker from a C# perspective. Unfortunately, every time I tried to build a Windows Docker image, I'd get errors. I spent a number of evenings reading about Windows containers and trying different things but kept spinning my wheels.

I learned a lot about Windows containers in the process but I felt a little dumb when I ran across an article that explained my problem. It turns out that you can't create Linux and Windows containers at the same time. You need to switch Docker Desktop to use one or the other and I was trying to create a Windows container while configured for Linux.

Today, I'm pleased to announce that my latest article "Deploying C# Web Applications with Docker" has been published on the Uno Platform's blog. The article walks you through building an image with IIS and .NET Core, publishing it to a private registry, pulling the image, and running the container.