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.

      • AlexWIWA@lemmy.ml
        link
        fedilink
        English
        arrow-up
        18
        arrow-down
        2
        ·
        edit-2
        8 months ago

        Rust is rapidly gaining popularity and it’s popular with the type of people who would use Lemmy. There aren’t contributors because there aren’t many users.

        Though like you said, time will tell

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

          For me i dont see any gains in popularity. Java IS popular right now, not in 10 years. Java is mature enough.

          • Nate Cox@programming.dev
            link
            fedilink
            English
            arrow-up
            14
            arrow-down
            3
            ·
            8 months ago

            It’s cool to like Java, I’m not hating on it, but it’s just silly to pretend that Rust isn’t popular today.

            Rust is used in fewer corporate environments, no doubt there, the Java inertia is strong… but a glance at any moderately recent dev survey should indicate pretty clearly that Rust is on a lot of devs minds and is well received.

            • Blaze@reddthat.com
              link
              fedilink
              English
              arrow-up
              7
              arrow-down
              6
              ·
              8 months ago

              Then how do you explain there is no major contributor to Lemmy besides the two main devs?

              • Nate Cox@programming.dev
                link
                fedilink
                English
                arrow-up
                11
                arrow-down
                1
                ·
                8 months ago

                Well, for one thing federated message boards are incredibly niche to start with, and the pool of people willing to work on one for free in their spare time is bound to be tiny aside from language concerns. I know we all want the fediverse to be the hot thing that everyone uses, but that ain’t reality.

                I’m not exactly seeing a massive contributor pool for sublinks here either.

                  • Nate Cox@programming.dev
                    link
                    fedilink
                    English
                    arrow-up
                    11
                    ·
                    8 months ago

                    … lemmy has like 100 contributors listed on GitHub. Just looking at the contributors list for the sublinks api vs the Lemmy main project it seems like Lemmy has far, far more contributions.

                    I think competition is a good thing, I hope sublinks gets like all the users and contributors and a dozen more projects spin up in all the languages of the rainbow—especially given they should all be contributing to one big pool of shared content— but it’s worth at least staying grounded in reality when making claims about the projects.

                    It’s super, super silly to be reactively defensive of one project or the other here. It really feels like what some people actually want is yet another language pissing contest more than anything else. All the languages are fine.

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

                At the scale of having a handful of contributors, it’s more likely random variance than due to the language you’ve chosen. The sample size is simply too small.

                I can speak for myself - I know Rust very well but I simply don’t have the time to contribute to Lemmy’s code (I’m also spending some time already being an admin for Feddit.dk and I feel that is all I can muster).

                Getting contributors to open source projects is never easy, regardless of programming language.

                But I mean… there is no problem with competition right. Maybe it’ll turn out that sublinks will have more development with more contributors. But it has yet to be shown, there are also only 1 or 2 developers working on sublinks at the moment, if you check the github contributor stats.

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

                    It could be - time will tell. But that has nothing to do with Rust vs Java.

                    Personally, I feel that if your goal was to make a clone of Lemmy with better structured tickets and a roadmap and all that… why don’t you just talk to the Lemmy devs about organizing their issues, creating a road map and contributing as a project manager? That is work and a skill that is often sorely lacking in open source development. That seems much easier and more iterative than trying to rewrite the whole thing in a different application.

              • AlexWIWA@lemmy.ml
                link
                fedilink
                English
                arrow-up
                4
                arrow-down
                1
                ·
                8 months ago

                Because people only contribute to projects they care about, can get clout from, or use and want to fix something that’s bugging them. Lemmy is just too niche right now.

                If in five years there’s still just the two devs then you may gloat and tell me I was wrong and I will accept the shame

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

              Popular? Objective C is still popular and more demanded than Rust.

              • Nate Cox@programming.dev
                link
                fedilink
                English
                arrow-up
                10
                ·
                8 months ago

                Yep. The job market isn’t as strong for rust, which is what that chart is showing you. Corporate acceptance != popularity.

                Rust is #6 on the Stack Overflow developer survey in popularity. https://survey.stackoverflow.co/2023

                Again, I don’t know why the community is insisting on making this a dick measuring contest for languages. People love rust. People love Java. I know people who still love Perl. I know one guy who really seems to look fondly on his Fortran days. they’re all fine.

                Just be happy that someone is excited enough to write some code to make the fediverse a little more diverse and maybe cool.

                • Blaze@reddthat.com
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  ·
                  8 months ago

                  Just be happy that someone is excited enough to write some code to make the fediverse a little more diverse and maybe cool.

                  Sounds like the most positive approach.

                  The thread from a month ago was really negative towards Java, it was surprisingly aggressive

                  • Nate Cox@programming.dev
                    link
                    fedilink
                    English
                    arrow-up
                    6
                    ·
                    8 months ago

                    I remember. It is a very annoying and negative trait that the dev community can’t seem to shake, the insistence on making hating certain tech (or even just like coding styles in general) part of their whole identity.

                    I remember thinking Clojure was stupid and people who used it were stupid because all of my peers told me so and made fun of the parenthesis relentlessly. Then I grew up a little, read a Clojure book, and fell in love with it. Plus learning to code in a brand new way made me a better dev overall.

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

                  Correct. But those accusations that java was a bad choice i just cant have it. This isnt “I love Rust” or “I love XYZ Programming language” it was “F*ck you for using java”.

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

                    Isn’t it more like the other way around? Lemmy was written in Rust, then this clone is in Java - isn’t that more like “damn you for using Rust”?

      • Rooki@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        9
        arrow-down
        10
        ·
        8 months ago

        In terms of maintainability its an upgrade. Can you read the code from the current lemmy as a non rust coder? no. Now look into any file in sublinks can you read that? Probably yes.

        Maintainability is gained too with the more possible contributors that have more knowledge about java and can improve more and more the code

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

          Now look into any file in sublinks can you read that?

          No I can’t - I’m not a Java dev and I find Java to be insanely verbose honestly. I find Rust much more parseable.

          But seriously, debating readability of languages is such a subjective thing. What is not subjective is Rust’s reliability and static analysis.

          • Dark Arc@social.packetloss.gg
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            3
            ·
            8 months ago

            You don’t need any of that for a web server… There should be minimal state to synchronize between threads (the assignment of a request to a thread) all handled by your web framework. Asynchronous IO can be much more significant which you can do in both Rust and Java equally safely. I haven’t kept up but Java was working on a threading model that allows old school threads to act like fibers or real threads effectively allowing dumb parallelism to scale like crazy for blocking IO with minimal code changes as well.

            Java should be just as good if not better (by the nature of being a VM that doesn’t have unsafe blocks) when it comes to the memory safety side of things. Java also optimizes quite well for long running applications like web servers.

            It’s really not a bad language and it continues to get better.

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

              You don’t need any of that for a web server

              I disagree - any software is better with more reliability. Static analysis becomes more and more important as the code base grows.

              Java should be just as good if not better (by the nature of being a VM that doesn’t have unsafe blocks) when it comes to the memory safety side of things. Java also optimizes quite well for long running applications like web servers.

              (Safe) Rust and Java are both memory safe. I don’t think any is better than the other in this aspect. Many projects use #[forbid(unsafe)] to make sure they only use safe Rust. Unsafe Rust is not necessary in 99.9% of cases, certainly never for a web server like Lemmy.

              It’s really not a bad language and it continues to get better.

              It’s subjective obviously. I don’t like it personally, some people do. To be fair I think there are worse languages out there - Python for instance. At least Java has static typing, which is nice. We’ll just have to wait and see what happens with the different fediverse forum implementations.

              • Dark Arc@social.packetloss.gg
                link
                fedilink
                English
                arrow-up
                2
                arrow-down
                1
                ·
                edit-2
                8 months ago

                any software is better with more reliability. Static analysis becomes more and more important as the code base grows.

                You’re saying static analysis and reliability like they’re things Rust objectively has that Java doesn’t.

                The only things Rust has at a fundamental level are a borrow checker and value types.

                Value types can be nice for performance in certain situations (which aren’t nearly as important for a web server as fibers/coroutines). The borrow checker is nice for threading (which isn’t an issue in a restful web server design as previously stated). That’s about it.

                (Safe) Rust and Java are both memory safe. I don’t think any is better than the other in this aspect.

                It’s not possible to write (memory) unsafe Java code. All Java code is memory safe. Most rust code is memory safe.

                Of course that’s not entirely true because of the possibility for bugs in the Rust compiler or the JVM.

                Java and Rust both can call out to C libraries as well which of course… You get what you get.

                Python for instance. At least Java has static typing

                Python can have static typing these days as well. It’s just optional and controlled by the project.

    • daddyjones@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      arrow-down
      6
      ·
      8 months ago

      I disagree - Java seems like the ideal choice for this. I might be in the minority in that view, though. Java seems to get a lot of hate.

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

        Java seems to get a lot of hate

        Well, lots of people don’t like it. Actually according to StackOverflow’s 2022 survey, more people who have used Java don’t want to keep using it than those who do want to keep using it (54% vs 46% roughly). So yea, you are in the minority in that way.

        Meanwhile Rust is well-liked by most people who use it (roughly 87%).

        • Dark Arc@social.packetloss.gg
          link
          fedilink
          English
          arrow-up
          9
          arrow-down
          2
          ·
          8 months ago

          Lots of people are taught a decades old version of Java as their only experience with the language in college.

          • AlexWIWA@lemmy.ml
            link
            fedilink
            English
            arrow-up
            5
            ·
            8 months ago

            My hottest take is that PHP isn’t that bad, it’s just that the PHP most people have worked with was written by a teenager in a week and somehow grew into a whole company that they now have to maintain.

            I loved cakephp.

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

            That could be part of the explanation, but I don’t think it upweighs the ~40% difference between Java love and Rust love. That is quite a large gap.

            • BURN@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              ·
              8 months ago

              People who seek out rust are likely people who want to use rust. Java is still a huge player in enterprise dev, where a significant portion of active developers are. So not everyone using Java wants to use Java, but nearly everyone using rust wants to use rust.

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

                I do think the developer experience with Rust is better in general though, so even if Rust was used elsewhere, it would still be liked more than Java, I would guess.

                But we won’t know who’s right for another 10 years maybe :P

            • Dark Arc@social.packetloss.gg
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              edit-2
              8 months ago

              I’d give it a few more years before announcing the death of all other languages in favor of Rust.

              Everything is tradeoffs and Rust is still quite new compared to Java, C++, or Python (all languages that continue to evolve). Stack overflow didn’t exist to run popularity contests when they were getting off the ground.

              The new big thing always becomes a bit … too big and gets applied to areas it really doesn’t help with.

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            2
            ·
            8 months ago

            I was taught Java in High School, then had one course on it in uni, then in my professional life ended up learning C#, Python, and Typescript and building servers with them before now coming back to Java 17 / Spring Boot thinking “oh this will be pretty similar to C# from what I remember”, and instead I’ve found myself cursing out Java / Spring Boot many many times.

            Java’s insistence on everything being object oriented is a huge hindrance to it as a language. It forces it to be ridiculously verbose in so many cases. Not every concept in code is a Noun, there are lots of times where it makes more conceptual sense to think of them as Verbs, but as a language Java still doesn’t fully support that.

            Give me a nice easy to follow functional Express.js chain any day, over jumping around a million magically connected ______ProviderBuilderProvider classes.

            • Dark Arc@social.packetloss.gg
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              8 months ago

              You can write functions… A static function is not particularly different from a free function written in a namespace. You can even use a static import to allow yourself to call it without qualification.

              ______ProviderBuilderProvider

              No idea what this is in reference to. I have a feeling your issue is more with the frameworks you’ve worked with than Java itself.

              • masterspace@lemmy.ca
                link
                fedilink
                English
                arrow-up
                2
                arrow-down
                2
                ·
                edit-2
                8 months ago

                You can write functions… A static function is not particularly different from a free function written in a namespace. You can even use a static import to allow yourself to call it without qualification.

                I’m referring to functional programming concepts like anonymous functions and functions as parameters. Java finally added support for this with Lambda expression in Java 8, but because it took them so long, most libraries and frameworks that wanted to support backwards compatibility didn’t use them and still forced everything into classes and objects, meaning that most Java code bases you find are purely object oriented.

                ______ProviderBuilderProvider

                idea what this is in reference to. I have a feeling your issue is more with the frameworks you’ve worked with than Java itself.

                It’s in reference to the fact that unlike basically every other modern programming language, Java doesn’t let you do stuff like have default parameters for functions, instead forcing you to overload them:

                In Javascript / C# you just have:

                function DoSomething(int  howManyTimes = 10){
                    //something
                }
                

                In Java you have:

                function DoSomething() {
                    int howManyTimes = 10;
                    //something
                }
                function DoSomething(int howManyTimes) {
                    //something
                }
                

                Which then leads you to recommendations of using the Builder Pattern, and now you’ve got the function / class you care about rewritten three times, plus a whole a builder class and a bunch of building specific functions, all of which are basically just a whole bunch of unnecessary verbose bullshit to approximate default parameters that are expressed more clearly with 2 additional characters in other languages.

                • Dark Arc@social.packetloss.gg
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  arrow-down
                  1
                  ·
                  edit-2
                  8 months ago

                  Sounds like you’re working with some bad libraries and writing some bad code IMO.

                  Java 8 was released over a decade ago. Lambdas in Java are in great shape. Java’s streaming API makes heavy use of them.

                  Builders should not be used all that much, certainly not in place of default arguments.

                  The correct way to write that is simply:

                  void doSomething() {
                      int howManyTimes = 10;
                      doSomething(howManyTimes);
                  }
                  void doSomething(int howManyTimes) {
                      //something
                  }
                  

                  Is it more lines that a default argument? Sure. It’s not that bad though. It also resolves some ABI complexity issues that come into play with default arguments. If you use default arguments in C++ anything calling that code needs to be rebuilt if the default argument is updated. In Java because it’s part of the definition of the function not the call site the default is updated by replacing the library. I don’t know how C# handles this, perhaps they create the overload implicitly. It’s not a problem for JavaScript or Python because they’re interpreted.

                  Bonus points, you can use an interface to provide a default overload like that even if you’re dealing with something that’s abstract.

                  I’m also mildly concerned by how you’re using JavaScript like function declarations in your examples with C# like naming scheme to demonstrate why Java is bad.

                  As your own link the builder pattern is an alternative to the factory pattern. Neither of which Java or any other language requires you to use. Note there is not a single “Builder” in the entire sublinks Java codebase.

                  Late edit: Also going to add in https://rust-unofficial.github.io/patterns/patterns/creational/builder.html

                  • masterspace@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    2
                    arrow-down
                    2
                    ·
                    8 months ago

                    Sounds like you’re working with some bad libraries and writing some bad code IMO.

                    Yes, the Java language encourages it, as do popular frameworks like Spring / Boot.

                    Is it more lines that a default argument? Sure. It’s not that bad though.

                    Yes it is. You’re adding and entire new function block for every single optional parameter. Add three more optional params and you’ve got a page of text to express a single line in other languages.

                    Bonus points, you can use an interface to provide a default overload like that even if you’re dealing with something that’s abstract.

                    That’s great, you can in C# and Typescript too but you don’t have to.

                    I’m also mildly concerned by how you’re using JavaScript like function declarations in your examples with C# like naming scheme to demonstrate why Java is bad.

                    Lmao, I’m mildly concerned that you don’t understand the concept of pseudo code.

                    Note there is not a single “Builder” in the entire sublinks Java codebase.

                    That’s awesome, it will be the first Java project I’ve encountered where that’s the case.

      • AlexWIWA@lemmy.ml
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        8 months ago

        I’d love to hear your reasoning. I don’t meet many java devs, so my opinion has definitely been formed in an echo chamber.

    • delirious_owl@discuss.online
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      2
      ·
      8 months ago

      I used to think that until I realized Maven requires PGP signatures on all packages. So the supply chain is wayy more secure than rust or python or basically every other language.

      Lemmy is a disaster from a security perspective