Today I learned about Sublinks (here), an open-source project that aims to be a drop-in replacement for the backend of Lemmy, a federated link aggregator and microblogging platform. Sublinks is designed to be initially API-compatible with Lemmy, allowing existing Lemmy clients, such as Lemmy-UI, to integrate seamlessly.

The project is written in Java, which may introduce some overhead but is chosen for its maintainability and familiarity among a wider pool of developers. The Sublinks team prioritizes a more inclusive and less toxic development environment, and the project has already attracted more developers than Lemmy.

While Sublinks is starting with 1:1 compatibility, future plans include implementing additional features that the Lemmy developers have not pursued. This could lead to a divergence in functionality between the two platforms as Sublinks evolves beyond its initial compatibility phase.


README

GitHub stars GitHub tag (latest SemVer) gradle workflow GitHub issues License

Sublinks

A decentralized, censorship-resistant, and privacy-preserving social network.

About

Sublinks, crafted using Java Spring Boot, stands as a state-of-the-art link aggregation and microblogging platform, reminiscent yet advanced compared to Lemmy & Kbin. It features a Lemmy compatible API, allowing for seamless integration and migration for existing Lemmy users. Unique to Sublinks are its enhanced moderation tools, tailored to provide a safe and manageable online community space. Embracing the fediverse, it supports the ActivityPub protocol, enabling interoperability with a wide range of social platforms. Sublinks is not just a platform; it’s a community-centric ecosystem, prioritizing user experience, content authenticity, and networked social interaction.

Features

  • Open source, MIT License.
  • Self hostable, easy to deploy.
  • Clean, mobile-friendly interface.
    • Only a minimum of a username and password is required to sign up!
    • User avatar support.
    • Live-updating Comment threads.
    • Full vote scores (+/-) like old Reddit.
    • Themes, including light, dark, and solarized.
    • Emojis with autocomplete support. Start typing :
    • User tagging using @, Community tagging using !.
    • Integrated image uploading in both posts and comments.
    • A post can consist of a title and any combination of self text, a URL, or nothing else.
    • Notifications, on comment replies and when you’re tagged.
      • Notifications can be sent via email.
      • Private messaging support.
    • i18n / internationalization support.
    • RSS / Atom feeds for All, Subscribed, Inbox, User, and Community.
  • Cross-posting support.
    • A similar post search when creating new posts. Great for question / answer communities.
  • Moderation abilities.
    • Public Moderation Logs.
    • Can sticky posts to the top of communities.
    • Both site admins, and community moderators, who can appoint other moderators.
    • Can lock, remove, and restore posts and comments.
    • Can ban and unban users from communities and the site.
    • Can transfer site and communities to others.
  • Can fully erase your data, replacing all posts and comments.
  • NSFW post / community support.
  • High performance.

Contact

Contributing

Support / Donate

Sublinks is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project.

  • Mwalimu@baraza.africa
    link
    fedilink
    English
    arrow-up
    86
    arrow-down
    5
    ·
    4 months ago

    Something feels off with this post. It comes off as “we are better than Lemmy” as if there is any competition and awards to be won. To say Lemmy’s development is “toxic” and this project is “more inclusive and less toxic” without backing it up with evidence is unfair.

  • Lvxferre@mander.xyz
    link
    fedilink
    English
    arrow-up
    19
    ·
    edit-2
    4 months ago

    I hope that this project survives and thrives. Even if only the first milestone (feature parity) and a tiny bit of the second one (moderation) are reached, it’s already a big improvement for the “Fediverse forums”.

    And as mox said ITT it makes it less reliant on any particular dev team. I also wish that MBin was a bit more popular.

    I won’t comment on maintainability because I’m neither a programmer nor an assumer.

  • mox@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    15
    ·
    4 months ago

    Despite disliking Java, I’m glad to see another implementation of the platform we’re all using, as it makes this part of the fediverse less dependent on any particular development team.

    Why in the world did you enclose the readme in a code fence, though? It would be so much better to let the markdown do its job. My eyes are burning.

    • ChasingEnigma@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      4 months ago

      Why in the world did you enclose the readme in a code fence, though? It would be so much better to let the markdown do its job. My eyes are burning.

      I wanted to use a quote to differentiate it a bit from the post but Lemmy-ui only quotes the first line.

      • mox@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        4 months ago

        I see. Code fences are really for computer code, though, not general quoting. They defeat word wrap, markdown, and proportional fonts.

        Unformatted text quotes are best done by inserting > at the start of each paragraph.

        For something that’s already formatted with markdown, like this, I would probably just put a horizontal rule under whatever I wrote, and paste the markdown beneath that. It’s done with --- on its own line, if I remember correctly.

  • imaqtpie@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    15
    ·
    4 months ago

    Since people in this thread seem to be more knowledgeable about programming languages than me, I’m curious how you all feel about PieFed.

    It’s a similar project, describes itself as

    a Lemmy/kbin clone written in Python with Flask

    Promising? Potential concerns?

    • SorteKanin@feddit.dk
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      3
      ·
      4 months ago

      Python started as a scripting language and I wish people would’ve let it be like that. Using Python for large systems is a nightmare. Especially if you want to juggle random contributions from indviduals that you have to vet carefully because god knows what some small change might break - Python for sure won’t tell you.

      • spaduf@slrpnk.net
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 months ago

        I think this is an incredibly outdated take. Python is just about the best general-purpose interpreted language out there right now.

        • SorteKanin@feddit.dk
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 months ago

          Python is just about the best general-purpose interpreted language out there right now.

          I agree with you actually - I think Python is better than Ruby and much better than JavaScript.

          But dynamically typed interpreted languages is just not what you want when building large systems. As the code base grows, static analysis becomes exponentially more important and Python provides roughly 0 static analysis. A thousand lines of Python is easy to manage. Ten thousand lines of Python is… questionable, but perhaps barely managable, if you’re careful. 100 thousand or even more? It’s impossible to keep track of.

          Just as a basic example, if you have a million lines of Python and you make some change somewhere in your code, Python won’t help you in any way to find out where you need to update things to handle that change.

          Meanwhile, if you do the same in with a million lines of Rust, the Rust compiler will point to every single place where you need to update your code to make it work again.

          I don’t know if you’ve worked with large Python code bases, but I have and it’s not fun.

    • ericjmorey@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 months ago

      The biggest thing that PieFed has done is get up and running on public data with new accounts open to the public. This trial by fire will make it fail fast or become much improved. It seems that the main developer is quite experienced and has thought about architecture and improvements that have already been implemented. I think it’s promising for all of these reasons.

      My biggest potential concern is that moderation tools have not been implimented yet (unless the were very recently).

      As far as Python being difficult in larger systems, this can be mitigated by experience and good practice. But I tend to agree that Python is typically not the ideal choice for a large project.

    • db0@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      4 months ago

      I love the idea of piefed. Don’t listen to the python haters below. Most of them don’t know what they’re talking about. Almost all machine learning is done on python for a reason. I’ve designed and run a python service serving thousands per day, from scratch, without issues. Python is perfectly capable of making a service like lemmy and a great choice due to how easy it is to use for development.

      I wish I had more free time and I would contribute to it

      • imaqtpie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 months ago

        Okay, thanks for the alternate perspective. I’m rooting for PieFed for sure, made an account over there the first time I saw it linked and personally felt that everything worked surprisingly well.

    • magic_lobster_party@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      4 months ago

      The good thing about Python is that it’s widely used. Easier to find people who can contribute in Python than Rust, which Lemmy is using.

      Downside is that Python isn’t ideal for large scale systems. Other languages like Java is better at protecting the programmer against common pitfalls that come when building larger applications. Python is more ideal for smaller scripts.

      • db0@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 months ago

        Not at all. if you want protection and strict typing, you can have it just as well with python.

    • stevecrox@kbin.run
      link
      fedilink
      arrow-up
      4
      arrow-down
      4
      ·
      4 months ago

      I wouldn’t get massively excited.

      Python is a scripting language, its shines when you want to write a stand alone file which takes an input and performs a task. Scripting languages are great to learn as a first language and so python is wonderful for non developers.

      The issue you hit is the build management solutions for Python are kind of broken and these help support and encourage good development practice so a lot of Python projects end up a collection of scripts rather than a mature project. You can have good projects but…

      In raw benchmarks Java has 90% of the performance of C/C++, but in reality Java is more performant because developers get bogged down in memory management on C/C++ and they get more time to optomise in Java as a result. I’m not sure where Rust will come out to be honest.

      Python benchmarks at 50% the performance of Java, in reality I’ve found code ends up slightly worse because Python is procedural, library support and streaming is poorly supported.

      Take library support, Spring really rose to prominese because of ‘hibernate’ which was a way to abstract talking to different databases through objects, you could switch from PostgreSQL to Oracle through config. Spring data has dumbed this down so I define a plain old Java object and Spring will generate everything I need.

      Python expects you to hand craft SQL statements and every database extends SQL slightly differently, so i need to write SQL for every operation and manage/own it. So the win in being able to quickly read/write to a database (since you don’t have to learn anything about Spring) is quickly ruined because of the all the boilerplate and error handling you now have to write.

      • db0@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        5
        ·
        4 months ago

        Python expects you to hand craft SQL statements

        That is completely untrue and you thinking that completely undermines your authority on speaking for python. One word: sqlalchemy

      • dwalin@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        And dont forget about graalvm if you really want small binaries and lots of performance

      • imaqtpie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        4 months ago

        Great response 👍

        It’s nice to have other projects going on, but it seems like Lemmy is far ahead of everyone else at this point. Which is great because Lemmy is bae

  • Blaze@reddthat.com
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    edit-2
    4 months ago

    It was intensively discussed a month ago, have a look at this thread if you are interested: https://lemmy.world/post/11061890 (you can copy paste the link in your search to find it on your instance)

    Most of the pro/cons of the initiative have been discussed there

    Personally I find it very promising, curious to see what it will look like once they reach feature parity with Lemmy

  • Fal@yiffit.net
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    12
    ·
    4 months ago

    Imagine choosing to write something in java versus rust. Amazing

    • stevecrox@kbin.run
      link
      fedilink
      arrow-up
      20
      arrow-down
      2
      ·
      4 months ago

      Every programming languages has communities built around them.

      Its becoming clear Rust solves a lot of C/C++ type problems and the embedded communities are definitely shifting over.

      Apache is the primary community for Java, a quick look at their project list shows it’s entirely web servers, data engineering and clustered projects for distributed computing.

      Personally if you asked me to solve this problem I would use Spring Boot with various Spring libraries for talking to the caddy, user control, etc… Looking at the project, its exactly what they have done

      • asdfasdfasdf@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        2
        ·
        edit-2
        4 months ago

        Rust is a general purpose language which is excellent for API servers and many other things. I’d say it’s definitely a direct competitor to Java. The only difference is in the ecosystem of libraries.

        Rust’s type system is really just about enforcing correctness, which is very important in a general sense. Memory safety is just a subset of correctness.

        You can see this is in practice since there are a TON of devs like myself coming to Rust from JavaScript.

        • magic_lobster_party@kbin.social
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          4 months ago

          As you said, the difference is in the ecosystem of libraries. This is where Java has the edge. It has a more mature ecosystem when it comes to web server backends. This includes the number of frameworks, programmers and information sources.

          Unless Rust clearly solves common problems people currently have with Java backends, Java will remain the dominant alternative. I believe this is unlikely, because Rust is mainly designed to overcome common memory problems people have with low level C systems without the overhead of garbage collectors.

          • asdfasdfasdf@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            4 months ago

            Rust is mainly designed to overcome common memory problems people have with low level C systems without the overhead of garbage collectors

            So you didn’t read my comment then.

            A concrete example of what my comment means is opening files. When you open a file handle, you can read from it, write to it, but then you should close it. After you close it you shouldn’t be ready to or write from it again. If you do, bad things can happen.

            Rust is the only language where you cannot. It’s a compile time error. This has nothing to do with low level systems programming. Using file handles is very high level.

            Same goes for thread safety. Web servers often can benefit from multithreading. Java does not enforce thread safety at compile time. If you send some data across threads and you don’t already understand what is thread safe and what isn’t, you’ll end up with data races, which is a form of memory safety violation. This is not possible in Rust, but it is in Java.

            Rust also isn’t subject to “the billion dollar mistake” since it doesn’t have the concept of null references. It also doesn’t support exceptions, which are the exact same issue as null references. These are also general programming problems and not specific to low level systems.

            Regarding frameworks, I’ve used Spring before and, although Rust doesn’t do some things Java frameworks do, IMO that’s a very good thing, and the web frameworks I’ve used in Rust have been a far better experience than what I saw from Spring.

          • expr@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            4 months ago

            Rust does a lot more than that. It has a far more powerful, flexible, and higher-level type system than Java all while being much more performant.

            Every single time I’ve heard people cite Java’s ecosystem, I’ve yet to see them using anything that Rust doesn’t have a better alternative to. Java’s ecosystem is massive, but most of the time, you don’t actually need it. Unless you are doing a lot of third party integrations that have Java sdks or something, there’s not a lot it buys you. If you’re just making typical web applications with a database, Rust has you completely covered and will do a better job of it to boot.

    • Otter@lemmy.ca
      link
      fedilink
      English
      arrow-up
      9
      ·
      4 months ago

      I asked about that earlier today, and this is the explanation

      It’s in Java, so there’s that overhead. But mostly, it’s less about “efficiency at all costs” and more about maintainability, being easier to contribute to / review, and having a less toxic development community. It’s got more developers working on it than Lemmy, and it’s in a language more people are familiar with (Java). It’s roadmap is also not constrained by the viewpoints of a small group of fairly, uh, controversial figures.

      After the 1:1 compatibility phase is over, they’re both free to and planning to implement more features that the Lemmy devs either won’t or can’t be arsed to do.

      The comment: https://lemmy.ca/comment/7677015

      • SorteKanin@feddit.dk
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        1
        ·
        edit-2
        4 months ago

        I can understand the argument about more developers knowing Java (right now) and the controversy of the current main lemmy devs.

        However for maintainability, I really don’t see it. Java has the billion dollar mistake with null references, forces you into an object oriented programming style and uses exception-based error handling, which is far inferior to errors as sum types like in Rust.

        Often when Rust compiles, it works. This is a big strength when maintaining a large system. You can’t say the same about Java.

        Lastly, Java doesn’t seem… Future-proof if you can call it that. It’s certainly an older language and it’s not likely to keep getting bigger. Rust is still growing a lot and is being adopted extremely heavily by the largest technology companies. It’s not unreasonable to think that there will at some point be more Rust devs than Java devs. Though that day could still be a long way off, to be fair.

        • Carighan Maconar@lemmy.world
          link
          fedilink
          English
          arrow-up
          14
          arrow-down
          6
          ·
          4 months ago

          However for maintainability, I really don’t see it. Java has the billion dollar mistake with null references, forces you into an object oriented programming style and uses exception-based error handling, which is far inferior to errors as sum types like in Rust.

          None of these are a problem to experienced Java developers however, of which there is a huge ocean. Compared to a relatively tiny handful of Rust developers that also can get very highly paid industry jobs that keep them busy, so there’s even less of them available for hobby projects.

          I can totally see it. Makes perfect sense in fact, you want people to help with development, you cast the widest net possible.

          • Fal@yiffit.net
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            2
            ·
            4 months ago

            None of these are a problem to experienced Java developers however

            You’re kidding, right?

            • Rooki@lemmy.worldM
              link
              fedilink
              English
              arrow-up
              6
              arrow-down
              6
              ·
              4 months ago

              That is true, if you develop your java application correct, then you have no issues of any kind.

                • magic_lobster_party@kbin.social
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  3
                  ·
                  edit-2
                  4 months ago

                  It’s more that you can avoid many mistakes by programming defensively and having good discipline. For example, you can avoid many memory allocation if you follow RAII and use smart pointers.

                  Null references can be avoided by avoiding using null (and prefer using optional where it makes sense).

              • SorteKanin@feddit.dk
                link
                fedilink
                English
                arrow-up
                5
                arrow-down
                3
                ·
                edit-2
                4 months ago

                if you develop your java application correct, then you have no issues of any kind.

                No issues of any kind? That’s absurd. The idea that you can “just” write “correct” code in any language and then you won’t have “any issues of any kind” is not any developer’s experience ever. Humans are just not reliable enough for that.

                • Rooki@lemmy.worldM
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  arrow-down
                  3
                  ·
                  4 months ago

                  Yeah because of that i said IF you develop your java application correct…

                  If that is correct, than you have no issues of any kind. That statement is correct. But like you said, no one is perfect, but rust would be a more difficult language than java and less documented. For a stable, predictable and reliable software your programming language needs maturity, stability and a community to support it. Most of it rust doesnt have.

          • SorteKanin@feddit.dk
            link
            fedilink
            English
            arrow-up
            5
            arrow-down
            1
            ·
            4 months ago

            Well time will tell. As far as I can see on https://github.com/sublinks/sublinks-api/graphs/contributors it really doesn’t look like more than two active developers right now… So not any better than Lemmy.

            Also, when it comes to hosting stuff as volunteers, server costs are actually quite important, as its basically 100% of the expenses. So Rust’s efficiency is actually a more significant advantage than you may think.

            • Rooki@lemmy.worldM
              link
              fedilink
              English
              arrow-up
              4
              arrow-down
              2
              ·
              4 months ago

              Java is already mature enough and i dont think the current smaller-medium instances experience that lemmy is on 100% cpu allways, so we can expect that it is a bit less optimal, but not before 5% cpu and after it 100% cpu, lemmy is a mess in performance, 0.18 instances gets ddosed by dead 0.19 instances, that retry always failed federation. So lemmy itself is the danger here.

              • SorteKanin@feddit.dk
                link
                fedilink
                English
                arrow-up
                3
                arrow-down
                1
                ·
                4 months ago

                When it comes to servers, memory is often the pricy point. And Java is a lot more memory-hungry than Rust.

                • Rooki@lemmy.worldM
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  3
                  ·
                  4 months ago

                  Good, then find some guys to develop lemmy faster, reliably and bigger. With lemmys pace of features, it will be taken over by faster developing platforms, where they can have more and more features ready and deployed where the lemmy devs still wait until they get enough donation to implement any crucial feature.

                  Sublinks decision was based on: How fast and reliably can they build a lemmy backend replacement, java is the only possible option there. There are many devs, Language is mature, reliable and not a hipster language like rust.

                  Of course if they did that in rust they would be same level, but then would be the question why not contributing to lemmy directly.

                  If performance and memore is so dramatically NASA rocket computer limited, than why not use assembly. Its the fastest, memory efficient and speaks directly to the computer.

            • mac@programming.dev
              link
              fedilink
              English
              arrow-up
              2
              ·
              4 months ago

              Theres more than just the api repo and pull requests are squashed in some of them making it show as less

      • Fal@yiffit.net
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        4
        ·
        4 months ago

        Rust is way easier to read than java in many cases. Terrible argument.

        • Bjornir@programming.dev
          link
          fedilink
          English
          arrow-up
          8
          arrow-down
          2
          ·
          4 months ago

          There are probably a hundred time more Java developers than rust developers. I think that is the whole point of choosing Java.

        • Rooki@lemmy.worldM
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          6
          ·
          4 months ago

          Rust is terrible to read. Java is easy if you name your functions and variables correct.

          • SorteKanin@feddit.dk
            link
            fedilink
            English
            arrow-up
            7
            ·
            4 months ago

            This is a very subjective take. I think Rust is much easier to read than Java. It’s really just a matter of what you’re used to (and that can easily change by just learning the other language).

            • Rooki@lemmy.worldM
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              4 months ago

              Yes like you said, everybody understands their favorite language better than others.

        • Ptsf@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 months ago

          Common is the enemy of correct. As for other languages, feel free to use anything memory safe! At least, that’s what I’ll be doing when exposing my overpowered calculator to 7+ billion humans.

      • Rooki@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        3
        ·
        4 months ago

        Its more easier than to write it in a language not made for a RestAPI.

        • SorteKanin@feddit.dk
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          2
          ·
          edit-2
          4 months ago

          There are plenty of very nice Rust web frameworks, like axum and actix-web (which lemmy uses). They are very ergonomic. Rust is perfectly fine for REST APIs. It’s not like Java was made expressly for the purpose of REST APIs either.

    • SorteKanin@feddit.dk
      link
      fedilink
      English
      arrow-up
      7
      ·
      4 months ago

      Not sure if genuinely asking but there are no instances currently as it’s still being developed. I believe they will make it so Lemmy apps are compatible? But unsure for how long this will be true.

      • mac@programming.dev
        link
        fedilink
        English
        arrow-up
        10
        ·
        4 months ago

        All lemmy apps are sublinks apps, it has api compatibility

        The demo site also isn’t an instance for accounts, its a demo