r/java

▲ 29 r/java

I wrote own efficient Maven scheduler to build modules with max parallelism

While inspecting Maven multi-module builds performance I've figured out the fundamental limitation: for any two modules depending on each other (moduleB depends on moduleA, in any scope), Maven will first execute all phases and goals of moduleA, and only then schedule the building of moduleB. Independent dependency branches can be executed in parallel, but directly/transitively dependent - only sequential.

In real projects running tests is usually the most time-consuming part, so this significantly limits possible parallelism.

To address this problem I made an extension providing a custom scheduler (in Maven it's called "builder") https://github.com/maven-turbo-reactor/maven-turbo-builder . When it is enabled, Maven schedules downstream dependencies right after the our module JAR is packaged, and then runs tests of our module and downstream module build in parallel (this way utilizing the multi-core CPUs much more):

default vs turbo builder scheduling

The extension also does two things:

  • reorder package and test phases (run tests after package, not before as default), so we can schedule downstream dependencies earlier
  • prioritize building modules with the highest number of downstream dependencies - this way reducing the chance of unloaded Maven worker threads

It's easy to set up - add to .mvn/extensions

<extensions>
    <extension>
        <groupId>com.github.seregamorph</groupId>
        <artifactId>maven-turbo-builder</artifactId>
        <version>1.3</version>
    </extension>
</extensions>

And then define on the CLI or .mvn/maven.config (to make it default):

-bturbo
-T1C

In real projects the boost is approximately 35% in clock time, also this extension is complementary with build caching.

I used this extension for more than a year in various mission-critical projects and received positive feedback from other organizations, so I believe it's quite stable.

reddit.com
u/Level_Yak_87 — 11 days ago
▲ 2 r/java+3 crossposts

I really need an Abroad job or internship or atleast a few interviews

TL;DR: I'm a 19-year-old CS student (CGPA: 9.5) with ~1.5 years before graduation. I built a scripting language from scratch in Java to better understand interpreters and language runtimes. My goal is to get hired abroad, both for my career and to build a future with the girl I love. I'd really appreciate honest feedback on whether I'm heading in the right direction.

Hi everyone,

I'm a Computer Science student from India with around 1.5 years left before graduation.

My biggest goal is to land a software engineering job abroad. It's not just for career growth—I also hope to build a future and eventually marry the girl I love, so I'm incredibly motivated to make these next 18 months count.

Instead of building another CRUD app, I decided to challenge myself by building FilzaLang, a small interpreted scripting language completely from scratch in Java, without using parser generators or compiler frameworks.

Current features include:

  • Custom interpreter & execution engine
  • Runtime value system
  • Automatic type inference
  • Variables & constants
  • Arithmetic & comparison operators
  • If statements
  • Loops
  • User input

GitHub Repository:

https://github.com/Peshimam-Ashar-Mohammed/Filza-Interpreter

I've documented the syntax, architecture, and implementation details in the README. If you have a few minutes, I'd really appreciate it if you could take a look and let me know what you think.

A few questions:

  1. Would this project make you more likely to interview a student for an internship or junior backend role?
  2. What are the biggest weaknesses in my portfolio right now?
  3. If you had only 18 months before graduating and wanted to maximize your chances of getting hired abroad, what would you focus on next?

I'm looking for honest criticism rather than encouragement. I'd rather know what I'm missing now than after I graduate.

Thank you for taking the time to read this—I genuinely appreciate any feedback.

u/AsharPeshimam — 12 days ago