Sprint Challenge

Overview

This sprint challenge is designed to assess your understanding of threads, metrics, and lambda expressions. You'll demonstrate your ability to implement and integrate these concepts in a realistic Java application.

Challenge Objectives

In this sprint challenge, you'll:

  • Implement a multi-threaded system with proper thread management
  • Create and use AWS CloudWatch metrics for application monitoring
  • Apply lambda expressions to improve code quality and readability
  • Utilize Stream API for efficient data processing

Challenge Description

For this challenge, you'll be enhancing an existing e-commerce order processing application to make it more efficient, observable, and maintainable. The application processes customer orders, manages inventory, and generates reports.

Part 1: Thread Implementation

Implement multi-threading to improve the application's performance:

  • Create a thread pool to manage order processing tasks
  • Implement synchronization to prevent race conditions when updating inventory
  • Use thread-safe collections for shared data structures
  • Add proper exception handling for threads

Part 2: CloudWatch Metrics

Implement CloudWatch metrics to monitor application performance:

  • Create custom metrics for order processing time
  • Track inventory levels with CloudWatch metrics
  • Implement percentile-based metrics for response times
  • Set up appropriate namespaces and dimensions

Part 3: Lambda Expressions

Refactor the application code using lambda expressions:

  • Replace anonymous classes with lambda expressions
  • Implement functional interfaces where appropriate
  • Use method references to simplify code
  • Apply Stream API for data processing operations

Evaluation Criteria

Your solution will be evaluated based on:

  • Proper implementation of thread management concepts
  • Effective use of synchronization to prevent data corruption
  • Correct implementation of CloudWatch metrics
  • Appropriate use of lambda expressions and functional interfaces
  • Code quality, readability, and maintainability
  • Implementation of proper error handling

Submission Instructions

To submit your sprint challenge:

  1. Fork the starter repository from your cohort's GitHub organization
  2. Implement your solution according to the requirements
  3. Commit and push your changes to your fork
  4. Submit a pull request to the original repository
  5. Include a README.md file explaining your implementation decisions

The submission deadline is [DATE] at [TIME].

Resources

You may use the following resources during the challenge:

  • Course materials and previous assignments
  • Java documentation and AWS CloudWatch documentation
  • Previous code-alongs and exercises

Remember that while you can refer to resources, your solution should be your own work.