How guilhermesob/java-advanced-topics works
Project type and purpose
• This is not a full‐stack app or microservice architecture. It’s an educational Java code repository containing sample programs that explore advanced Java backend topics (asynchronous programming, concurrent programming, Streams API, lambdas).
• Its “system” is really a set of example modules you compile and run on the JVM to demonstrate different features.
File structure
• Top level:
• Main.java – the entry point that can orchestrate or demonstrate the examples
• MultiThreadExample.java – specifically shows thread‐based concurrency and Futures
• README.md – describes topics (async, concurrency, Streams, lambdas)
• There’s no external configuration, no databases or web servers—just plain Java source.
README for additional insights
a. Asynchronous Programming (Futures, CompletableFuture)
b. Concurrent Programming (Thread, Runnable, ExecutorService)
c. Streams API (map, filter, reduce pipelines)
d. Lambda Functions (anonymous functions for brevity and readability)
Components
a. Main Components (rectangles):
1. Developer/Git Repo (source code host)
2. Build & Compile (javac or build tool)
3. Java Virtual Machine (JVM)
4. Example Modules (packages or classes):
– AsyncModule (Futures & CompletableFutures)
– ConcurrencyModule (Thread, Runnable, ExecutorService)
– StreamsModule (Stream pipeline)
– LambdaModule (functional interfaces)
5. OS / Thread Scheduler
– Developer → Git Repo (commit)
– Git Repo → Build & Compile (source checkout & compile)
– Build & Compile → JVM (class files loaded)
– JVM → Example Modules (calls Main → modules)
– Example Modules → OS / Thread Scheduler (spawning threads, scheduling tasks)
c. Architectural Patterns & Principles:
– Asynchronous callbacks vs. non‐blocking CompletableFuture pipelines
– Concurrent thread creation vs. managed ExecutorService
– Functional style data processing with Streams
– Use of lambdas to pass behavior as data
d. Key Technologies & Libraries:
– Java SE (javac, java)
– java.util.concurrent (Futures, CompletableFuture, ExecutorService)
– java.util.stream (Stream API)
– java.lang.Runnable, java.lang.Thread