Goal: Improve efficiency in writing, debugging, and testing code.
- Review Java 8+ features (Streams, Lambdas, Optional) → Code small examples.
- Practice Multithreading (Executors, CompletableFuture).
- Debug Java code using breakpoints & stack traces in IntelliJ.
- Implement Java 8+ features (Streams, Lambdas, Optional).
- Write a multithreaded program using Executors & CompletableFuture.
- Debug Java code using breakpoints & stack traces in IntelliJ.
✔️ Java programs demonstrating Streams, Optional, and CompletableFuture. ✔️ A multithreaded program that correctly handles tasks asynchronously. ✔️ Ability to debug stack traces and pinpoint errors.
- Create a list of 1000 random integers, filter items < 100, double them then sort asc, take the first 4 numbers
- Create a callable task that return a string, print the result from the main thread
- Create two mock apis that return strings or throw an error. Use completable future to create a joined string from the two results in the order of string 1 + string 2. In the case of exception, return an empty string for each task. Use
exceptionally
public static String mockApi1() throws Exception {
int sleepTime = random.nextInt(5) + 1; // 1 to 5 seconds
TimeUnit.SECONDS.sleep(sleepTime);
if (random.nextBoolean()) { // 50% chance to throw an exception
throw new Exception("Mock API 1 failed");
}
return "String1";
}
public static String mockApi2() throws Exception {
int sleepTime = random.nextInt(5) + 1; // 1 to 5 seconds
TimeUnit.SECONDS.sleep(sleepTime);
if (random.nextBoolean()) { // 50% chance to throw an exception
throw new Exception("Mock API 2 failed");
}
return "String2";
}
- Build a simple CRUD API (Spring Boot, JPA, H2/PostgreSQL).
- Handle request validation (@Valid, @NotNull).
- Write unit tests with JUnit & Mockito.
- Test API using Postman (GET, POST, PUT, DELETE).
- Build a simple CRUD API (Spring Boot, JPA, H2/PostgreSQL).
- Implement request validation (@Valid, @NotNull).
- Write unit tests with JUnit & Mockito.
- Test API using Postman.
✔️ A working REST API with CRUD operations. ✔️ Validation logic properly rejecting invalid input. ✔️ Postman requests showing API responses. ✔️ Unit tests passing successfully.
- Create a CRUD API with spring mvc for a task management app
- User can login with user name and password
- user can add and remove tasks
- users cannot remove other people's tasks
- There is an admin role where user can remove all other users' tasks
- Have unit test for adding, removing tasks
- Add structured logging using SLF4J, Logback.
- Practice debugging API response issues.
- Add structured logging using SLF4J, Logback.
- Practice debugging API response issues.
✔️ Application logs showing structured request-response flow. ✔️ Debugging session where an issue is identified and fixed. ✔️ Hibernate query optimization reducing unnecessary DB calls.
- Create a new java project, add logback, slf4j for logging
- Set different log levels for different packages
- Read SOLID principles and apply them to your code.
- Explore common design patterns (Factory, Singleton, Builder).
- Review your past PRs, find areas for improvement. [Optional]
- Read and apply SOLID principles.
- Refactor code to use common design patterns (Factory, Singleton, Builder).
- Review past PRs and note improvement points.
✔️ Refactored code applying SOLID principles. ✔️ Improved design using appropriate patterns. ✔️ Constructive feedback on past PRs.
- Read this article about SOLID: https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design#interface-segregation-principle
- Create code using Builder, Singleton (thread safe), Builder, Proxy, Visitor patterns
Goal: Learn to write efficient queries, avoid performance pitfalls, and optimize API response times.
- Write JOIN queries, Indexing, Transactions.
- Learn Hibernate Lazy vs. Eager Loading.
- Experiment with @Query, @Modifying, and EntityGraph.
- Write JOIN queries, Indexing, Transactions.
- Learn Hibernate Lazy vs. Eager Loading.
- Experiment with @Query, @Modifying, and EntityGraph.
✔️ Optimized SQL queries performing well. ✔️ Hibernate fetch strategy correctly fetching required data. ✔️ No unnecessary queries in API logs.
Create a relational schema in PostgreSQL with at least 3 tables:
users (id, name, email, role_id)
roles (id, name)
orders (id, user_id, total_amount, created_at)
Write JOIN queries:
- Fetch all users with their roles.
- Fetch users along with their total orders.
- Fetch users who have never placed an order.
Create a Service Method in Spring Boot:
- Implement a method that transfers money between two users.
- Ensure ACID compliance using @Transactional.
Introduce a failure:
- Simulate a failure (e.g., throw an exception) in the middle of the transaction.
- Verify whether partial updates happen or if rollback works.
Modify the Schema:
Use JPA to define User, Role, and Order entities. Define relationships (@OneToMany, @ManyToOne). Fetch Strategies Experiment:
Set @OneToMany(fetch = FetchType.LAZY) and observe queries. Change to FetchType.EAGER and analyze the difference. Detect & Fix N+1 Queries:
Check API logs for unnecessary queries. Optimize using @EntityGraph.
- Enable Hibernate SQL logging → Analyze generated queries.
- Use Redis or Caffeine caching to optimize read performance.
- Measure API response time with Spring Actuator & Postman.
🎯 Expected Output ✔️ Logs showing optimized Hibernate queries. ✔️ API responses using cache for faster access. ✔️ Spring Actuator displaying API response times.
- Learn Propagation & Isolation levels in Spring Transactions.
- Handle common transactional pitfalls (deadlocks, lost updates).
- Improve error handling using @ControllerAdvice + Custom Exception Handling.
- Learn Propagation & Isolation levels in Spring Transactions.
- Handle transactional failures with retry mechanisms.
- Implement @ControllerAdvice for centralized error handling.
✔️ Application handling transaction failures gracefully. ✔️ Properly configured transaction isolation preventing data issues. ✔️ Centralized error-handling strategy in place.
- Enable Hibernate SQL logging.
- Implement Redis or Caffeine caching.
- Measure API response time with Spring Actuator.
✔️ Logs showing optimized Hibernate queries. ✔️ API responses using cache for faster access. ✔️ Spring Actuator displaying API response times.
- Identify slow queries and optimize.
- Refactor API to improve database interactions.
- Write integration tests using TestContainers.
- Identify and optimize slow DB queries.
- Refactor API to improve database interactions.
- Write integration tests using TestContainers.
✔️ Database queries are optimized and fast. ✔️ Code refactored for better DB interaction. ✔️ Passing integration tests using TestContainers.
Goal: Secure APIs, understand CI/CD, and deploy apps efficiently.
- Implement JWT Authentication (Spring Security + JWT).
- Add Role-Based Access Control (RBAC).
- Prevent common security threats (CORS, CSRF, SQL Injection).
- Implement JWT Authentication.
- Add Role-Based Access Control (RBAC).
- Prevent CORS, CSRF, SQL Injection vulnerabilities.
✔️ API secured with JWT Authentication. ✔️ Access properly restricted by user roles. ✔️ Security vulnerabilities mitigated.
- Learn Maven vs. Gradle and build an executable JAR.
- Write a Dockerfile and containerize a Spring Boot app.
- Deploy app using Docker Compose.
- Build an executable JAR using Maven/Gradle.
- Write a Dockerfile and containerize the Spring Boot app.
- Deploy app using Docker Compose.
✔️ Working Docker container running the application. ✔️ Build and deployment scripts ready for CI/CD. ✔️ Automated deployment workflow.
- Use Spring Boot Actuator for monitoring health/status.
- Set up centralized logging with ELK Stack (Elasticsearch, Logstash, Kibana).
- Learn API rate limiting (Spring Boot + Redis).
Use Spring Boot Actuator for monitoring. Set up ELK Stack (Elasticsearch, Logstash, Kibana). Implement API rate limiting using Redis.
✔️ API health monitoring via Spring Boot Actuator. ✔️ Logs centralized in ELK Stack. ✔️ Rate-limiting working correctly.
- Use JMeter to simulate 100+ requests per second.
- Tune JVM settings & connection pooling (HikariCP).
- Implement circuit breaker (Resilience4J, Hystrix) to handle failures.
Simulate 100+ requests per second using JMeter. Tune JVM settings & connection pooling (HikariCP). Implement circuit breaker (Resilience4J, Hystrix).
✔️ Performance metrics before & after optimization. ✔️ API can handle high loads efficiently. ✔️ Circuit breaker preventing system failures.
Goal: Work on real-world problems, optimize existing skills, and build confidence.
- Explore Event-Driven Architecture with Kafka/RabbitMQ.
- Implement simple producer-consumer using Kafka.
Learn Event-Driven Architecture with Kafka/RabbitMQ. Implement a simple producer-consumer using Kafka.
✔️ Kafka message producer and consumer running correctly. ✔️ Logs confirming message delivery between services.
- Learn Spring Cloud basics (Config Server, Service Discovery).
- Understand API Gateway & Load Balancing.
- Explore Spring Cloud basics (Config Server, Service Discovery).
- Implement API Gateway & Load Balancing.
✔️ Microservice communication via Service Discovery. ✔️ API Gateway routing traffic correctly.
- Use Spring Boot, PostgreSQL, Docker, and Redis.
- Implement authentication (JWT), caching (Redis), and pagination.
Use Spring Boot, PostgreSQL, Docker, and Redis. Implement authentication (JWT), caching (Redis), and pagination.
✔️ A working end-to-end API with security & optimizations. ✔️ API properly handling large-scale requests.
- Review past PRs & refactor old code.
- Write a blog post or documentation summarizing what you learned.
- Plan the next roadmap (e.g., GraphQL, Spring Cloud, Serverless).
Review past PRs & refactor old code. Write a blog post or documentation summarizing the journey. Plan next roadmap (e.g., GraphQL, Spring Cloud, Serverless).
✔️ Improved and optimized past code. ✔️ A blog post/documentation summarizing key learnings. ✔️ Clear roadmap for further learning.