View Posts for Software Engineering

  • Optimized My Blog V3

    |
    Updated at

    Well, as part of version 3 of the blog I wanted to close down my blog's API HTTP in favor of an endpoint on this domain. It was driven by my desire to reduce public web surface of the blog, which meant I could use my custom ZeroMQ RPC library in achieving this. That led to some yak shaving I needed to do to get authentication/authz middleware support on the RPC server. Middleware is used via HTTP for the internal management UI side of the blog, but now the RPC server does it and the migration was seamless b...

  • ZeroMQ RPC Extreme High Performance or 280k Requests/Response Per Second.

    |
    Updated at

    When I say RPC request and response, that means the request and response were serialized/deserialized with messagepack. It's just message passing in the end.

    ZeroMQ is fast I mean really really fast. ZeroMQ is a networking library and should be part of any toolkit where you need extreme high performance and reliability between applications.

    Let's do some math

    140k requests per second + 140k responses per second = 280k req/response total. That's 2.8 million in a 10 second span. This measly server can handle m...

  • Spotify used ZeroMQ at One Point for Internal Server Communications

    |
    Updated at

    I was curious about use of ZeroMQ since I use it extensively with my own RPC, PubSub system.

    Spotify's Hermes

    Hermes is a network messaging stack created at Spotify, on top of existing open source stack such as ZeroMQ, protobuf and gevent. We are migrating backend service from legacy stack to Hermes and this session explains the rationale behind some of the choices. It also gives a brief introduction of some typical network topology for backend messaging at Spotify. Finally we discuss some lessons lear...

  • Enhance Looks like a Promising HTML Web Components First Framework

    |
    Updated at

    "Enhance your Functional Web Apps with Web Components"

    https://2022.cascadiajs.com/speakers/brian-leroux

    Enhance is one of those frameworks I wish existed in 2010 because I would have used it. Too bad I found Lit and a few other libraries I like now. I'm generally not a fan of UI frameworks unless they allow you to substitute their functions like routing. Can't be having arbitrary updates break shit that already works and chase low value updates.

    There are things I would say you legitimately need a framework f...

  • No More SvelteKit in my Projects and NoMo Svelte in my New Projects

    |
    Updated at

    Migrated my SvelteKit projects to lit-html because it is so much better to use lit-html. I've always been a fanatic about staying close to vanilla as possible for high performance and low maintenance. I'm super happy about how lit has gone about it.

    I've noted in previous posts why I am switching away from Svelte and going frameworkless. No more Aurelia, React, Vue or Svelte/SvelteKit/Sapper as Web Components with Lit obliterates the use case of these frameworks. Never required two way binding, SSR or whatev...

  • Server Side Rendering Doesn't Matter

    |
    Updated at

    I think SSR is only important because of cargo culting. This site right now uses Sapper to render the the entry page after that, it's all Javascript. I never cared about Sapper's SSR ability. Only that it kept close enough to HTML, CSS, JS and easy to understand routing. No weird shit.

    Now that I've discovered lit-html which is lightweight and helps tremendously with building web applications without a framework why bother with React, Svelte or anything else for small web apps? Web Components are easy AF. Bu...

  • If You Find Yourself Adding Slots In Web Components, Think Again.

    |
    Updated at

    I've been looking for a way to pass properties and/or attributes to a slot element through to the target element that replaces the slot, but that isn't supported behavior in the W3c spec. I spent a few days trying to google for a solution heavily, but instead landed on the simplest solution. I use lit (http://www.lit.dev) for creating web components because it is perfect for any use case.

    I found one idea to pass attributes and properties here: https://pierrelebrun.me/dynamic-properties-on-slots. I find it c...

  • Glad to be in Web Components Land

    |
    Updated at

    Already started migrating the front end part of one application to Web Components. Absolutely making heavy reuse of existing code to hasten the effort. The way the web components renders and how high performance it is, its fucking amazing. This is exactly what I've been looking for. Loads way faster than Svelte will any day and this is without any SSR. Imagine how this thing will scream with SSR.

    I need to figure out how I'm going to do bootstrapping. I'm thinking I will have the bootstrapper js file trigger...

  • Vanilla SPA Website with Web Components and Fastify in Typescript.

    |
    Updated at

    https://github.com/normano/web-starter

    BOOOM BABY! NO FUCKING FRAMEWORK!

    From my last post where I had a direction on where to go I found the libraries that were sufficient to get me going on the Vanilla JS track successfully.

    Rollup for bundling because web components.

    Lit for web components templating and sugar syntax. This is very very useful. VS Code has an extension for syntax highlighting and there are static analysis tools out there.

    Router-slot to enable SPA with guarded routes.

    Fastify for the backend we...

  • Starting a New Adventure in Vanilla HTML JS CSS

    |
    Updated at

    Leaving Svelte behind immediately, I've started looking for vanilla approaches to replace Sapper and SvelteKit for my apps.

    When it comes to web apps, some want to be loaded on page by page, some from that server via SSR and my typical app serve a seed page that fetches the rest from the backend. As long as you can get an initial page and show a loading screen of sort then you will always win the first impression user experience front. That is my goal.

    The question is what is needed for that? Well, how do web...