r/JavaProgramming • u/javinpaul • Jul 12 '26
Difference between API Gateway and Load Balancer in Microservices Architecture?
r/JavaProgramming • u/javinpaul • Jul 12 '26
r/JavaProgramming • u/LowSet2041 • Jul 12 '26
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:
SendMessage is returned by a later ReceiveMessage, and DynamoDB PutItem / GetItem / Query return live data, so you test real round-trips.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.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.)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
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.
cloudstub-example).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 • u/aumiom • Jul 11 '26
r/JavaProgramming • u/Dry_Couple8852 • Jul 11 '26
how to fix this?
r/JavaProgramming • u/javinpaul • Jul 11 '26
r/JavaProgramming • u/LowSet2041 • Jul 11 '26
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:
SendMessage is returned by a later ReceiveMessage, and DynamoDB PutItem / GetItem / Query return live data, so you test real round-trips.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.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.)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.
cloudstub-example).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 • u/javinpaul • Jul 10 '26
r/JavaProgramming • u/crghhhhh • Jul 10 '26
Does anyone have access to this course? If so, please DM me.
r/JavaProgramming • u/Prestigious_Bee_7640 • Jul 10 '26
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 • u/Zar-23 • Jul 09 '26
r/JavaProgramming • u/hackster_io • Jul 09 '26
r/JavaProgramming • u/Prestigious_Bee_7640 • Jul 09 '26
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 • u/Automatic_Coconut676 • Jul 08 '26
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 • u/Technical-Line2260 • Jul 08 '26
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 • u/Spare_Dependent6893 • Jul 08 '26
r/JavaProgramming • u/javinpaul • Jul 08 '26
r/JavaProgramming • u/Prestigious_Bee_7640 • Jul 08 '26
Longest Palindromic Substring
r/JavaProgramming • u/QueasyHold400 • Jul 08 '26
r/JavaProgramming • u/Brinvik • Jul 08 '26
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 • u/Prestigious_Bee_7640 • Jul 07 '26
LeetCode 4 Media of Sorted Arrays
r/JavaProgramming • u/Sree_237566 • Jul 06 '26