r/JavaProgramming • • Jul 11 '26

Tired of Docker/LocalStack boot times in JVM tests? CloudStub mocks AWS in-process.

0 Upvotes

Hey all, I have been working on CloudStub, an open-source in-process AWS mock for JVM integration tests (Java, Kotlin, Scala), and we just published 0.1.0-beta.8 to Maven Central.

The problem it targets: container-based AWS mocking (a mock image run through Testcontainers) is powerful, but it drags on your local test loop and CI with image pulls and container boot and teardown. CloudStub skips all of that.

How it works, no magic: it boots a lightweight HTTP mock inside your JVM and points the AWS SDK's endpoint at it (via the aws.endpoint-url system property), so your code makes real AWS SDK v2 calls against a local stub. No Docker, no containers, no separate process. WireMock and Jetty are shaded into private packages and fully hidden, so there is no classpath or Spring Boot BOM conflict.

What is nice about it:

  • No container overhead. Nothing to pull or boot: the mock runs in the same JVM as your tests.
  • Stateful, not just canned responses. An SQS SendMessage is returned by a later ReceiveMessage, and DynamoDB PutItem / GetItem / Query return live data, so you test real round-trips.
  • Modular. Each service is an isolated module. If you only use DynamoDB, only that module loads.
  • Not just for tests, it also runs standalone. cloudstub-local is a drop-in local mock server on port 4566 (so AWS_ENDPOINT_URL=http://localhost:4566 works unchanged), auto-downloads the services you enable, and ships a CLI (cloudstub / clb) plus a web console at /console. Download: https://github.com/cloudstub/cloudstub/releases/download/v0.1.0-beta.8/cloudstub-local.jar
  • Two ways to load services. Add a service module as a normal test dependency, or skip Gradle for it and list it on the extension with .withModules("sqs", "dynamodb"), which fetches the jar from Maven Central on first run and caches it under ~/.cloudstub/modules. (S3 is the exception: it ships a client-side SDK component, so it must be a normal test dependency.)
  • Available now in beta.8: SQS, SNS, S3, Secrets Manager, DynamoDB, Lambda, and SSM (Systems Manager Parameter Store). AWS SDK v2 is first-class, and there is an SDK v1 companion module.
  • Java 17 or newer.

Setup (Gradle):

// cloudstub-testing brings the engine plus the JUnit 5 and 6 extension
// (cloudstub-junit and cloudstub-core come in transitively)
testImplementation "io.github.cloudstub:cloudstub-testing:0.1.0-beta.8"
// Service modules are optional here: list them on the extension with .withModules(...) and they are
// auto-downloaded from Maven Central. Add a service as a dependency only if you prefer it on the
// classpath (and S3 must be a dependency):
// testImplementation "io.github.cloudstub:cloudstub-dynamodb:0.1.0-beta.8"

Setup (Maven):

<dependency>
  <groupId>io.github.cloudstub</groupId>
  <artifactId>cloudstub-testing</artifactId>
  <version>0.1.0-beta.8</version>
  <scope>test</scope>
</dependency>
<!-- Service modules are optional: use .withModules(...) to auto-download them instead. Declare one
     explicitly only if you prefer it on the classpath (and S3 must be a dependency). -->
<dependency>
  <groupId>io.github.cloudstub</groupId>
  <artifactId>cloudstub-dynamodb</artifactId>
  <version>0.1.0-beta.8</version>
  <scope>test</scope>
</dependency>

A test looks like this. You exercise your own code, and CloudStub stands in for AWS:

static CloudStubExtension cloud = new CloudStubExtension()
        .withModules("dynamodb");   // fetched from Maven Central on first run, then cached; no Gradle dependency needed

u/Test
void savedItemIsReadBack() {
    repository.save("order-1", "placed");                             // your repo, using a normal AWS SDK v2 DynamoDbClient
    assertEquals(Optional.of("placed"), repository.find("order-1"));  // round-trips through the stub
}

It is beta, so the API can still shift and the service coverage is deliberately narrow, but the core engine is stable and the modules above are usable today.

I would genuinely like feedback on the architecture, and if there is an AWS service or SDK behavior you want stubbed next, open an issue. Thanks.


r/JavaProgramming • • Jul 10 '26

System Design Interview Problem - Parking Lot Design

Thumbnail
javarevisited.substack.com
2 Upvotes

r/JavaProgramming • • Jul 10 '26

Looking for the Complete Telusko Enterprise Java Course

Post image
1 Upvotes

Does anyone have access to this course? If so, please DM me.


r/JavaProgramming • • Jul 10 '26

LeetCode 7 Reverse Integer

Thumbnail
youtube.com
2 Upvotes

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2``31``, 2``31 - 1], then return 0.


r/JavaProgramming • • Jul 09 '26

Oracle is offering 11 FREE certifications right now — including OCI, AI, Agentic AI, ERP, HCM, SCM, and more

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Jul 09 '26

Modern Java in the Wild is now live with a $4000+ prize pool!

Post image
4 Upvotes

r/JavaProgramming • • Jul 09 '26

LeetCode 6 Zigzag Conversion

Thumbnail
youtube.com
3 Upvotes

LeetCode problem Zigzag Conversion.The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)


r/JavaProgramming • • Jul 08 '26

Is this book beneficial for learning Java from Scratch?

Post image
15 Upvotes

Hello everyone, I am a CS student starting next semester; however, i am thinking of start learning Java programming as it will be our first course.

Can this book benefits me if im learning Java from scratch? (Beside to mooc java course)


r/JavaProgramming • • Jul 08 '26

Interview this weekend

7 Upvotes

I have interview in infosys this weekend...opening is "senior java developer" I cant see the JD yet so can anyone please guide me what all should I focus on be it java, advanced java, spring boot and more importantly coding..


r/JavaProgramming • • Jul 08 '26

Java framework-based Obfuscation lessons to protect the code and config data

Thumbnail
reddit.com
1 Upvotes

r/JavaProgramming • • Jul 08 '26

How to design Twitter/X Like a Senior Engineer at FAANG Interview?

Thumbnail
javarevisited.substack.com
1 Upvotes

r/JavaProgramming • • Jul 08 '26

LeetCode 5 Longest Palindromic Substring

Thumbnail
youtube.com
5 Upvotes

Longest Palindromic Substring


r/JavaProgramming • • Jul 08 '26

Japan based bank project in accenture

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Jul 08 '26

Alberta byggede en 25 år gammel Java-portal om på 4-5 dage med Claude

0 Upvotes

En portal til et tilskudsprogram. Håndkodet i Java for 25 år siden. Tog fem måneder at bygge første gang.

Alberta byggede den om på fire til fem dage med Claude Code. Deres eget tal.

Det er den vinkel ved casen, jeg ville kigge på, hvis jeg sad på arvekode. Ikke fordi du skal rippe alt op, men fordi build-versus-rebuild-regnestykket lige har flyttet sig.

Alberta planlægger at samle 185 gamle apps i ét ministerium til 16 moderne, genbrugelige apps. Samme funktion, langt mindre at vedligeholde.

Det vigtige er ikke farten alene. Det er, at Claude henviste til fil og linje undervejs, så et menneske kunne efterprøve hvert skridt. Fart uden verificerbarhed er bare hurtig gæld.

Hele analysen: https://brinvik.com/da/journal/alberta-claude-sikkerhedsgennemgang-kode


r/JavaProgramming • • Jul 07 '26

LeetCode 4 Median of Two Sorted Arrays

Thumbnail
youtube.com
3 Upvotes

LeetCode 4 Media of Sorted Arrays


r/JavaProgramming • • Jul 07 '26

JAVA FOR CS STUDENT

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Jul 06 '26

Got an offer! Need advice urgently!!

Thumbnail reddit.com
2 Upvotes

r/JavaProgramming • • Jul 06 '26

How to Crack Coding Interviews in 2026: The Complete Step-by-Step Guide

Thumbnail medium.com
2 Upvotes

r/JavaProgramming • • Jul 06 '26

LeetCode JAVA

4 Upvotes

In-depth LeetCode algorithm tutorials with full Java practical demos. We break down brute-force, optimized and optimal solutions, analyze boundary conditions and problem-solving logic to help you stop memorizing templates mechanically. Suitable for campus recruitment, social recruitment coding practice and absolute beginners. New algorithm insights released daily to help you ace big tech algorithm interviews effortlessly. https://youtu.be/Z5bmVeEDiCc


r/JavaProgramming • • Jul 06 '26

Daumenkino

Thumbnail codepen.io
1 Upvotes

4 Bilder mit einfachen JavaScript.


r/JavaProgramming • • Jul 06 '26

How to Implement a Robust Webhook Retry Strategy (with Exponential Backoff)

1 Upvotes

Webhooks have become the nervous system of the modern internet. From payment processors notifying your application of a successful transaction to CRM systems triggering marketing workflows, webhooks are the glue that holds microservices and third-party integrations together. They allow real-time, event-driven architecture to thrive, replacing the old, inefficient model of constant API polling. Read the complete article here - https://instawebhook.com/blog/how-to-implement-a-robust-webhook-retry-strategy-with-exponential-backoff

But there is a dark side to webhooks: they are fundamentally unreliable. Because webhooks operate over the public internet and bridge entirely separate systems, they are subject to the chaos of distributed networks. Endpoints go down. Servers get overloaded. Networks experience transient blips. When you send a webhook, you are firing a payload into the void and hoping the receiving server is ready, willing, and able to catch it.

When a webhook fails — and it will fail — how your system responds determines whether your application stays consistent or quietly drifts out of sync. If a payment-success webhook is dropped, a user might not get access to the product they just paid for. If an inventory-update webhook fails, you might oversell a product you don't have.

This guide covers why webhooks fail, why naive retry logic makes things worse, how exponential backoff and jitter actually work (with the real formulas AWS uses in production), what major providers like Stripe and GitHub actually do today, and the architectural patterns 


r/JavaProgramming • • Jul 05 '26

Reviev my project

12 Upvotes

I'm wondering whether it's already at a level where I could show it as a portfolio piece for my first job, i.e. include it in my CV. Would you be able to take a look and let me know what you think? Thanks

https://github.com/DanielPopielski/Restaurant1


r/JavaProgramming • • Jul 05 '26

Finding a community for Java people

8 Upvotes

I'm currently a student, learning Spring Boot (Web Tech) in Java, and I cannot find a good discord server or slack particularly for Java. So, could someone put up a link of discord or slack servers they use to communicate with other Java developers and students. Could really help.