Let’s say we don’t care about the backend<>frontend interconnection we see in most JS frameworks. We just want to program the backend. What would be the language of your choice?

  • stevecrox@kbin.run
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    I would be looking to dockerise it.

    The front end is effectively staric files so I would probably choose Apache or Express (whichever is smaller).

    For the backend I would choose Java for Spring Boot. An Alpine image with OpenJDK and the app is tiny. Spring has a library for every kind of interface making them trivial to implement but the main reason is hibernate.

    Hibernate (now Spring Data) was the first library for being able to switch out databases without having to change code (its all config). A lot of mastodon instances struggle with the resource requirements of elastic search so letting small instances use something like postgres would seem ideal.