352
submitted 5 months ago by [email protected] to c/[email protected]

Seems like an interesting effort. A developer is building an alternative Java-based backend to Lemmy's Rust-based one, with the goal of building in a handful of different features. The dev is looking at using this compatibility to migrate their instance over to the new platform, while allowing the community to use their apps of choice.

top 50 comments
sorted by: hot top controversial new old
[-] [email protected] 137 points 5 months ago
[-] [email protected] 84 points 5 months ago

I see you woke up and chose violence.

[-] [email protected] 31 points 5 months ago

I just self host and avoid Java like the plague due to how annoying it is to manage

load more comments (4 replies)
[-] [email protected] 73 points 5 months ago

Browsing the code makes me angry at how bloated Java projects are:

package com.sublinks.sublinksapi.community.repositories;

import com.sublinks.sublinksapi.community.dto.Community;
import com.sublinks.sublinksapi.community.models.CommunitySearchCriteria;
import com.sublinks.sublinksapi.post.dto.Post;
import com.sublinks.sublinksapi.post.models.PostSearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;

public interface CommunitySearchRepository {

  List allCommunitiesBySearchCriteria(CommunitySearchCriteria communitySearchCriteria);

}

Every file is 8 directories deep, has 20 imports, and one SQL statement embedded in a string literal. 😭

[-] [email protected] 44 points 5 months ago

Yup. Welcome to the world of Java where such things are not only silly but encouraged.

[-] [email protected] 29 points 5 months ago

Most IDEs will handle the imports for you and auto collapse them

load more comments (6 replies)
load more comments (22 replies)
[-] [email protected] 32 points 5 months ago

There's nothing wrong with java

load more comments (7 replies)
[-] [email protected] 26 points 5 months ago* (last edited 5 months ago)

Who cares? If it works, it works.

The biggest strength of Java is that many programmers has years or even decades of experience in it.

[-] [email protected] 17 points 5 months ago

i know right! same thing with PHP! many progs decades experience hahaha

load more comments (7 replies)
load more comments (6 replies)
load more comments (9 replies)
[-] [email protected] 86 points 5 months ago

I have a hard time believing that rewriting the backend from scratch would be faster than getting PRs approved on the main project.

Forks like this with one guy who "knows best" usually die a slow quiet death as they get left behind by the main project.

[-] [email protected] 57 points 5 months ago

I think how quickly this project has gotten to near feature parity is a testament to how slow Lemmy development has been. Think about scaled sort (a feature that has been hotly requested since the migration) and how long that took to get merged in. A sort should not by any means be slow to implement.

load more comments (2 replies)
load more comments (2 replies)
[-] [email protected] 65 points 5 months ago

Why Java though ? Like really ? It's... Better than any other compiled language ?

[-] loutr 71 points 5 months ago* (last edited 5 months ago)

Because modern Java is an OK language with a great ecosystem to quickly build web backends. And there are lots of java devs which means more potential contributors.

[-] [email protected] 27 points 5 months ago

Exactly. It's also using Spring Boot, Hibernate, and Lombok. It looks just like projects at work. It might be the first fediverse project I contribute regularly to.

[-] [email protected] 16 points 5 months ago

+1 same

I tried to contribute to Lemmy, spent a few hours really confused by rust and gave up. I can meaningfully contribute to a Java/Spring project, not a rust one.

load more comments (3 replies)
load more comments (13 replies)
load more comments (20 replies)
[-] [email protected] 61 points 5 months ago

What missing features are so important that you decide to recreate the entire backend of Lemmy because you think the devs aren't fast enough?

[-] [email protected] 54 points 5 months ago

Java instead of Rust is going to be a big thing for a lot of people who would like to contribute in their spare time. Yeah, Rust is cool, but every CS grad and their mother knows Java.

Back during the migration surge a few months ago, you commonly saw a LOT of comments from folks saying they would love to help eat away at the project’s backlog, but they just didn’t have the time or energy to learn Rust at the moment.

[-] [email protected] 34 points 5 months ago

Any recent CS grad is obsessed with rust, trust me. It's not hard to learn either with that background.

[-] [email protected] 20 points 5 months ago

I'm not saying that rewriting he backend is a good choice, but for me specifically, I'd like Lemmy to be written in Java. Why? I'm a Java software engineer for nearly 7 years now and I'd like to contribute. Yes, I could learn Rust, like I did learn Go, C, C++ and other languages during my cs studies. But I really don't have the free time and motivation to do that after I already worked 8-10 hours at my computer. If I could use my existing Java knowledge to quickly fix some small bugs or whatever, I'd love to do that. But the hurdle to learn a new language (including other paradigms and best practices) just to contribute to this one project is just too high for me.

load more comments (5 replies)
load more comments (3 replies)
load more comments (13 replies)
[-] [email protected] 24 points 5 months ago

Lemmy doesn't have to have missing features for someone to want to write their own implementation. And in a decentralized system you want multiple implementations to exist. This is a good thing

[-] [email protected] 18 points 5 months ago

It seems to be more language focused than hard to PR against the main repo.

Java is much more widely known than Rust, which means a much larger pool of developers. I never contributed to the original Lemmy server because I couldn’t wrap my head around a full production scale rust project. I’ll very likely contribute to this because I work with production Java code daily. Im sure I’m not the only other dev who has run into this.

Also maybe there’s just too many disagreements with the Lemmy owners, who are a bit extreme for a lot of people.

load more comments (3 replies)
[-] [email protected] 55 points 5 months ago

Competition is good. We need to take the web back

load more comments (3 replies)
[-] [email protected] 49 points 5 months ago* (last edited 5 months ago)

Java backend? What year is it?

[-] [email protected] 43 points 5 months ago

2024, Java is still the 2nd language on GitHub with 11,7% of the total code hosted, while Rust is number 13 with 1,8%

https://madnight.github.io/githut/#/pull_requests/2023/4

[-] zalgotext 19 points 5 months ago

Java has been around for decades longer than Rust, comparing total code numbers doesn't tell the whole story

load more comments (10 replies)
load more comments (11 replies)
[-] [email protected] 39 points 5 months ago

Having a frontend rewrite seemed more critical than trying reimplementing the backend in a different language.

Remember, Lemmy had 4 years of development to iron out bugs, and this is essentially promising to make something in months that has a fully compatible backend to support all the third party apps, while adding features on top of what Lemmy has, and with a better front end with better mod tools to boot, with a complete rewrite of everything.

The scope of this project has planned for is already unviable. Suppose that Sublinks does reach feature parity to the current version of Lemmy, congratulations, the backend or mod tools is not something a regular user is going to notice or care about at all, all they will know is that suddenly, there are weird bugs that wasn't there before, and that causes frustration.

And this project is going to get more developer traction because... Java?

I'd like to be proven wrong, but I'm very sceptical about the success of Sublinks, because it look like a project that was started out of tech arrogance to prove a point than out of a real need, I don't work in tech, but the general trajectory of these kind of projects is that "enthusiasm from frustration" can only take you so far before the annoyance of dealing with mundane problems piles up, and the project fizzles out and ends with a whimper.

[-] [email protected] 17 points 5 months ago

I have higher hopes. Java is three times more developers than Rust (https://www.statista.com/statistics/793628/worldwide-developer-survey-most-used-languages/), and you can see in this thread a number of people saying they could contribute as they know Java and not Rust.

Let's hope for the best.

[-] [email protected] 21 points 5 months ago

Java is a corporate language that most devs hate. Rust (Lemmy) is more popular as a hobby language that devs enjoy hacking in for fun.

load more comments (32 replies)
load more comments (11 replies)
[-] [email protected] 16 points 5 months ago

Lemmy had 4 years of development to iron out bugs

Lemmy had 4 years to accrue technical debt and make foot-guns first-class features. A rewrite is probably exactly what it needs.

load more comments (13 replies)
load more comments (2 replies)
[-] [email protected] 37 points 5 months ago

an alternative Java-based backend

kill it with fire

[-] [email protected] 20 points 5 months ago

Next step, is to remake Lemmy in JavaScript. Pure JavaScript, no typescript, only express, nothing else

load more comments (1 replies)
load more comments (17 replies)
[-] [email protected] 29 points 5 months ago

Based on all the other threads and cross posts it just seems like this software is being created because Jason Grim doesn't like the lemmy devs or their politics. I guess that's as good of a reason to fork as any. I'm happy with the way lemmy is and how its being created so I have been doing monthly donations to them for its development.

[-] [email protected] 22 points 5 months ago

It’s not a fork though. It’s a complete rewrite in another programming language. That’s way more effort than a petty project.

The truth is, this might succeed based on developer reach. I love Rust, but I know it won’t have the reach (yet) that Java can, and more developers mean faster progress.

In the end, between this, Lemmy or another project which may be a fork of either, the success will be due to efforts of everyone involve at every stage. This wouldn’t exist without Lemmy, and Lemmy wouldn’t exist with ActivityPub.

load more comments (6 replies)
[-] sentient_loom 28 points 5 months ago

I didn't know Lemmy was written in Rust.

load more comments (2 replies)
[-] [email protected] 28 points 5 months ago* (last edited 5 months ago)

a missed opportunity to name it Jemmy

I'm just here for the joke

EDIT: sentence structure

[-] [email protected] 21 points 5 months ago

I like this, I will contribute to this, I think a lot of Java haters in this thread fail to realize just how massive Java is compared to everything else.

Rust might be the latest, hottest, bestest Java killer out there and it might be a completely superior language to Java, doesn't matter, it's dwarfed in terms of how many people actually use it for real projects, projects that should run for years and years. Even if Rust is the true Java killer, it's gonna take a good few more years for it to kill java, measured in decades, there is just way too many projects and critical stuff out there that is running on Java, that means lots of jobs out there for java, still and still more.

This means there are a lot of senior Java programmers out there with lots of years of experience to contribute to this project.

Plus Lemmy itself having alternatives and choices is just a good thing.

load more comments (7 replies)
[-] [email protected] 18 points 5 months ago

I've been hearing a lot of good things for a while. Lookin forward to it.

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 23 Jan 2024
352 points (96.8% liked)

Fediverse

26724 readers
93 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to [email protected]!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 1 year ago
MODERATORS