Asynchronous File Upload in Java using Akka and Pl

2019-05-10 04:48发布

I want to upload files in an asynchronous manner. I am using Play Framework with Java.

I found a number of ways to upload files asynchronously. The files are a part of multipart form data

1) The Akka way: Give the file handling to an actor

2) The Play way: Use Promise to do the upload

3) The Java way: Asynchronous file channel

How should I proceed?

a) Use Akka actors only inside play controllers.

b) Use Akka actors inside an asynchronous methods of play framework that returns Promise

  • with this, asynchronous actors of akka are inside another asynchronous method of Play which might be an overkill

What is the best way if i am to use java and not scala?

0条回答
登录 后发表回答