doulvyi2172 2017-09-05 03:22
浏览 37

Queue&Events的工作? CSV文件导入和处理

I need to add functionality allowing a user to upload a .csv file (+- 300 rows of data), then process the file ... the steps are:

  1. The user uploads a .csv file
  2. The .csv file is saved to S3
  3. Each row in the .csv file is validated and imported into a database table (+- 300 rows)
  4. Individual PDF reports are generated and saved to S3 (one for each row of data imported into the database) ie. +- 300 PDF reports generated and saved to S3.
  5. Zip all the PDF's into a single file and save to S3
  6. The user is notified when the job is done (and can download the zip). In your experience, what would be the most efficient way to achieve this if using 3rd party services was out of the question (other than those provided by AWS)

I'm leaning towards ... after the .csv file is uploaded and saved to S3, queue all the other tasks and send the user an email when the job is fully completed? How can I handle all these. User can just upload the csv file and start the process and it should be noticed when the job is done.

Feedback greatly appreciated.

Thanks.

  • 写回答

1条回答 默认 最新

  • doushi3803 2017-09-05 04:02
    关注

    AWS has some great tooling for this type of situation. To start with, you should use S3 bucket triggers with AWS Lambda. It will run code upon the file being uploaded. From there you can either do all of the work or use SQS or other messaging solution to fanout messages to be processed in parallel. Each of these tasks can then be bundled up into a zip file using a separate process if desired and an email, SMS, or push notification can be sent using SNS or SES.

    Both AWS SWF and StepFunctions could be used to orchestrate all of the steps and workflow.

    评论

报告相同问题?

悬赏问题

  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python