Skip to content

hensby/report_generation_system_aws

Repository files navigation

Evaluation project

Hengchao Wang

What I did in Configure AWS and DB:

  • create my own AMAZON SQS.

    Excel_Request_Queue, Excel_Responce_Queue, PDF_Request_Queue, PDF_Responce_Queue

  • create my own AMAZON SNS.

    reporting_topic

  • create my own AMAZON S3(Simple Storage Service, Buckets).

    evaluation-bucket-file-excel, evaluation-bucket-file-pdf

  • generate AWS secret key access key.

  • edit the AWS and MYSQL DB configuration in all three application.properties files.

what I did in functional part:

  • Edit ExcelServiceImpl.java in ExcelService to implement S3 storage (ExcelServiceImpl line 50)

    Add S3client, save file in S3. sent the S3 location back to client server.

  • Edit the download function in clientService to implement download Excal file from S3 (ReportServiceImpl line45, line194)

    Modified download Excel function.

  • Change the sendDirectRequests method to parallel process using Threadpool, ExecutorService. (ReportServiceImpl line 83)

    create newScheduledThreadPool(2) and add two Callable object into thread pool. Implemented the multitasking of this method

  • Implemented Delete report function (ReportServiceImpl line214, reportController line77, app.js line76, line86)

    When client click delete button,frontend will send a DELETE request to clientService "/report/content/{reqId}" (using AJAX). Design Restful API in reportController to handle DELETE requests. Design the deleteReport method in ReportServiceImpl to do the logic part. Delete the report from S3 and local DB

  • Design GlobalExceptionHandler for three services to handle exceptions. (GlobalExceptionHandler1, GlobalExceptionHandler2, GlobalExceptionHandler3)

    Design GlobalExceptionHandler for three services to handle different exceptions type of Exception

  • Edit ExcelGenerationServiceImpl in ExcelService to create temporary files (ExcelGenerationServiceImpl line 103)

    create a temporary file in "_temp" folder instead of create a new file in root location. Easy to upload and delete.

  • Edit frontend JS file in ClientService to order result set (app.js line 7)

    keep the displayed results are ordered by CreateTime. User - friendly

Test

  • Design API unit test by using Junit5 (APITest PDFAPITest ExcelAPITest)

    Design API test to test all RestFul API in client services, to make sure all request is correct.

  • Add AWS test in Excel and PDF services (AwsTest)

    Add three AWS test in Excel and PDF services to make sure S3 services are available in all services.

Contributor

Hengchao Wang

About

-Personal project. Design a file format conversion backend system to handle request and transfer xml file into Excel and pdf file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors