So I want to make a new project. It will have a website and an algorithm which will handle the requests. The thing is, web development in Rust feels harder than say in Go or Python. So I thought maybe I could somehow make bindings in Rust for Go since the faster the algorithm is, the better. However, that seems to complicate stuff as well. So do you think I should just rewrite the current algorithm in Go? Is it fast enough for it to not be a noticeable difference?

Edit: Thanks for the suggestions and advice! I decided to go with Rust for the website with Axum and the algorithm as well.

  • jadero@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    10 months ago

    Bluesky Social, or at least their PDS (personal data server) uses Go and their Docker package includes Caddy, a webserver written in Go.

    I don’t know what you’re doing, but I have difficulty accepting that Go cannot meet your performance requirements.

    • asudox@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      The webserver performance is not my main concern. It’s the speed of the algorithm.

      • jadero@programming.dev
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        10 months ago

        I didn’t suggest otherwise. I was merely pointing at a couple of examples where some pretty smart, pretty experienced people used Go to successfully implement entire collections of algorithms in some very performance-sensitive systems. It’s just by coincidence that I chose those examples because that is where my study is right now. Ask me in a year and I might point to your project as an example when the next person is asking for similar advice.

        If Go isn’t going to be fast enough to perform your task, then you’re probably going to be sorely disappointed when you finally get the performance you’re after and then have to stick it at the end of a wire with all kinds of stuff between you and your end users:

        Operating systems, databases, hardware, virtual machines, containers, webservers, firewalls, routers, HTML/CSS/whatever, DNS, certificate authorities, more routers and firewalls, ISPs, modems, more routers and firewalls, WiFi connected machines of all kinds, and random browsers implementing any of several different rendering engines.

        Quite frankly I can’t imagine a language that won’t offer enough performance to meet your needs in that environment.