Comment by ErroneousBosh

Comment by ErroneousBosh 3 days ago

10 replies

I love the idea that I can compile all my functionality including HTML templates, javascript, and CSS into a single albeit huge Golang binary.

I have never done this yet.

But I love the idea of it.

c-hendricks 3 days ago

This is what I'm doing with my side project! A set of personal smart picture frames for me and my partner. One executable does:

- the uploader API

- the uploader UI

- the frame API

- the frame UI

UIs are SSG'd with solid-js and solid-start then served with gin.

It's really fun.

SatvikBeri 3 days ago

I loved uberjars back when I was writing Scala. I don't miss much about the JVM, but I really miss having a single executable I could just upload and run without having to pay attention to the environment on the host machine.

  • cogman10 3 days ago

    That's essentially the role docker serves now. Everything you need to run in 1 single image.

    • SatvikBeri 3 days ago

      Yeah, but building a docker image tends to be a lot heavier weight and slower, in my experience, than uploading a single jar

      • cogman10 3 days ago

        Heavier weight? Yes. Slower? Should be the same performance. Unless you are on a non-linux host, then there is no docker penalty.

        The only time I can think where a JVM might be faster is if you have a multi-tenant setup. In that case, the JVM can be more effective with the GC vs having multiple JVMs running.