After three weekends and numerous early-morning bursts of programming, I have brought my new website quietly online. I wouldn’t be surprised if many of you are coming to the realization that the change has happened as you read this now. On the surface, the new site is very, very similar to the old one.
However, there are a handful of publicly visible changes worth noting. I reorganized the navigation bar a bit. On the main blog page, you’ll notice that you can now easily browse posts by tag, category, year, and month. The covers page now looks a bit… reorganized. That’s because it’s being generated from database records instead of crafted by hand. And also, the landing pages for collection titles, such as Transmutations and The Shipwright and Other Stories, now show which stories they contain, and all bibliography pages list the ISBN’s of all editions.
Interesting side note. It turns out that I don’t, in fact, own a 2017 edition of Voyage Embarkation, and the ISBN assigned to it isn’t discoverable via the printer’s web dashboard. Perhaps one day I’ll order a copy from them, but until I do, that particular ISBN is unknown.
Most of the ways in which this site is different from the old one lie under the hood. I accomplish blogging now entirely in my browser. My old process involved numerous manual steps. My new process involves me checking the “is ready” checkbox on the post in this site’s admin control panel.
As I mentioned in a previous post, this project has been an opportunity for me to teach myself the Actix server framework, and it is my first Rust server project.
Overall, this went very well. My only major snag was the discovery that the deadpool/tokio-postgres libraries I had chosen for connecting my server to my database refused to operate correctly over SSL (which is required for a production site). I eventually solved this by moving to sqlx. Another issue is that it seems nigh impossible to mock out database transactions for testing. There is currently no utility in Rust for defining global pre-test and post-test operations, which is unfortunate. I refuse to let my tests make modifications to my database.
As with any first project in a new ecosystem, the earlier parts of my codebase are messier than the later parts. The whole thing could almost certainly use a refactoring pass. However, I feel the changes would be pretty minimal. Before this project, I would have said I was uncertain if Rust and Actix were ready for production server projects. I can now safely say that they definitely are for small projects, and they are pretty close for large, professional projects as well. There are a couple major areas for me to explore before I could make the latter assertion with confidence: building containerized Actix apps, and using gRPC/protobuf instead of raw JSON for client/server communication.
Finally, I should note a few other small side effects of this change. The URL scheme of all my pages has changed, so any bookmarks you may have had will need to be refreshed. Also, since Disqus comments are keyed to the URL of the blog post, past comments have unfortunately been disconnected from posts. I will add a backlog items to my task list to see if I can’t go through Disqus and manually reconnect them. Or, even better, if Disqus exposes an API, I might be able to automate that.
For those of you who come here for my writing rather than my software engineering, thank you very much for humoring me this last month. This blog will be returning to more literary endeavors shortly. You may have also noticed that Intersection Thirteen did not come out at its scheduled release date. I’ve got some clean up work to do on that still. More on that soon.