this post was submitted on 23 Jan 2024
281 points (95.5% liked)

Fediverse

28213 readers
1153 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 !moderators@lemmy.world!

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
 

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
[–] twistypencil@lemmy.world 111 points 9 months ago (11 children)
[–] SnotFlickerman@lemmy.blahaj.zone 68 points 9 months ago (2 children)

I see you woke up and chose violence.

load more comments (2 replies)
[–] Corngood@lemmy.ml 60 points 9 months ago (12 children)

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<Community> allCommunitiesBySearchCriteria(CommunitySearchCriteria communitySearchCriteria);

}

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

[–] MeanEYE@lemmy.world 34 points 9 months ago

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

[–] pineapple_pizza@lemmy.dexlit.xyz 24 points 9 months ago (6 children)

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

load more comments (6 replies)
load more comments (10 replies)
[–] magic_lobster_party@kbin.social 23 points 9 months ago* (last edited 9 months ago) (3 children)

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.

[–] originalucifer@moist.catsweat.com 15 points 9 months ago (6 children)

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

load more comments (6 replies)
load more comments (2 replies)
[–] dylanTheDeveloper@lemmy.world 17 points 9 months ago (3 children)

There's nothing wrong with java

[–] remotelove@lemmy.ca 10 points 9 months ago

There is nothing inherently wrong with Java I would speculate, but it can be a royal pain in the ass to manage if you just need one application to work.

I know the basics of the language, but from what I have seen managing it, I don't like it. Just from being in security, I constantly hit barriers with devs because of versioning issues. There is always some ancient app running on a version of Java that can't be updated, for whatever reason. Version management is always a pain, but with Java? Goddamn.

I admit ignorance about the details of Java and how awesome it is for job security. There is no way in hell I could even debate anyone who has watched a single video on YouTube about Java. However, from what I have seen, it either works great or it fails explosively with billions of randomly allocated threads attempting to suck memory from every other server within 50 miles.

If it's awesome to code with, cool. I am just a little salty from my experiences, as you can tell.

load more comments (2 replies)
[–] mark@programming.dev 12 points 9 months ago (2 children)

Lol how about one written in NodeJS? 😆

load more comments (2 replies)
load more comments (6 replies)
[–] deegeese@sopuli.xyz 73 points 9 months ago (3 children)

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.

[–] spaduf@slrpnk.net 46 points 9 months ago (3 children)

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.

[–] cosmic_slate@dmv.social 24 points 9 months ago (2 children)

IMO slow development isn’t necessarily a bad thing.

I like that there was a two month period for apps to adopt the new login mechanism and that they smoke test releases for a fair bit on lemmy.ml before releasing to the world.

That said, a few months ago I wanted to do a light fork of Lemmy to proof out a few very minor things on my mental wishlist but just haven’t had the free time to meddle with Rust.

[–] spaduf@slrpnk.net 22 points 9 months ago* (last edited 9 months ago) (1 children)

IMO slow development isn’t necessarily a bad thing.

Sure but even just recently there was the example of breaking federation over Christmas. Some of those issues persist through 0.19.3 which came out today

Similarly scaled sort would have made a huge difference for small communities in the period directly after the migration.

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)
[–] skullgiver@popplesburger.hilciferous.nl 21 points 9 months ago* (last edited 9 months ago) (2 children)

[This comment has been deleted by an automated system]

[–] deegeese@sopuli.xyz 15 points 9 months ago (1 children)

I’m a Java developer and I would much rather pick up Rust to join an active project than try to rebuild something that already works using a less-marketable language.

[–] sik0fewl@kbin.social 12 points 9 months ago (4 children)

Sure, but it’s a lot more work for you to get to a point where you can be an active contributor.

load more comments (4 replies)
load more comments (1 replies)
load more comments (1 replies)
[–] bdonvr@thelemmy.club 52 points 9 months ago (5 children)

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?

[–] Ghostalmedia@lemmy.world 38 points 9 months ago (14 children)

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.

[–] Amaltheamannen@lemmy.ml 24 points 9 months ago (4 children)

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

[–] Undaunted@feddit.de 11 points 9 months ago (5 children)

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)
[–] 0x1C3B00DA@kbin.social 17 points 9 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

load more comments (3 replies)
[–] kawa@reddeet.com 47 points 9 months ago (13 children)

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

[–] loutr@sh.itjust.works 46 points 9 months ago* (last edited 9 months ago) (6 children)

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.

[–] 0x1C3B00DA@kbin.social 20 points 9 months ago (3 children)

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.

[–] BURN@lemmy.world 14 points 9 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 (2 replies)
load more comments (5 replies)
load more comments (12 replies)
[–] bc1@lemmy.l0l.city 39 points 9 months ago (3 children)

Competition is good. We need to take the web back

load more comments (3 replies)
[–] AlexisFR@jlai.lu 34 points 9 months ago* (last edited 9 months ago) (12 children)

Java backend? What year is it?

[–] Blaze@discuss.online 24 points 9 months ago (10 children)

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@sh.itjust.works 17 points 9 months ago

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

load more comments (9 replies)
load more comments (11 replies)
[–] sentient_loom@sh.itjust.works 26 points 9 months ago (1 children)

I didn't know Lemmy was written in Rust.

[–] can@sh.itjust.works 12 points 9 months ago (1 children)
[–] sentient_loom@sh.itjust.works 20 points 9 months ago

This actually makes me want to contribute to lemmy.

[–] hamid@lemmy.world 25 points 9 months ago (1 children)

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.

[–] hansl@lemmy.world 14 points 9 months ago (2 children)

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 (2 replies)
[–] cupcakezealot@lemmy.blahaj.zone 23 points 9 months ago (18 children)

an alternative Java-based backend

kill it with fire

[–] MashedTech@lemmy.world 18 points 9 months ago (1 children)

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)
[–] kameecoding@lemmy.world 17 points 9 months ago (6 children)

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 (6 replies)
[–] Stamets@lemmy.world 14 points 9 months ago (1 children)

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

load more comments (1 replies)
[–] stown@sedd.it 11 points 9 months ago (9 children)

Forget the backend! I just want the frontend not to crap itself whenever it can't fetch the site icon!

[–] jgrim@discuss.online 12 points 9 months ago

A new front-end is coming too. We need a new front-end to support all the new features we’re adding.

load more comments (8 replies)
load more comments
view more: next ›