System Architecture

Sudoku Processing Flow

  1. User upload a Sudoku Image through a web interface.
  2. The image is processed by OpenCV to detect the outer border of the sudoku puzzle and crop the image to focus on the puzzle only.
  3. The cropped image is then uploaded to S3 for further processing.
  4. Textract is used to recognized and extract number from the image in S3 bucket, and sends the recognized result back to EC2 instance.
  5. Base on the recognized number and location of each number, EC2 instance creates sudoku grip to be displayed on the screen.
  6. When “Solve” button is pressed, EC2 receives the sudoku grid as a input and arrange it as a matrix 9x9.
  7. A Backtracking algorithm is applied to find the solution of the sudoku puzzle.
  8. The solution is sent back and displayed on the screen, with the original input numbers and the solution numbers is separated by color.

AWS Cloud Architecture

The diagram below presents infrastructure of sudoku project on AWS Cloud. This basic architect can keep with reliable and scaling ability. The service is used contain of: Route53, WAF, CloudFront, ALB, EC2, S3, Textract.

AWS Cloud Architecture