From: Shiv S. D. <shi...@gm...> - 2016-03-17 15:12:19
Hi,
Say I want to write a distributed blob store on top of hdfs using
libhdfs. CppCMS will be used for authentication and other validation
purposes for example file size and type.
If I reverse proxy this behind Nginx then do I need to specifically
take care about asynchronous IO?
--
Respect,
Shiv Shankar Dayal
From: Artyom B. <art...@gm...> - 2016-03-17 15:58:06
> Hi,
>
> Say I want to write a distributed blob store on top of hdfs using
> libhdfs. CppCMS will be used for authentication and other validation
> purposes for example file size and type.
>
> If I reverse proxy this behind Nginx then do I need to specifically
> take care about asynchronous IO?
>
> --
> Respect,
> Shiv Shankar Dayal
>
File uploading is performed in asynchronous event loop
independently and automatically.
In CppCMS 1.0.x you'll get notification about uploaded
file only once it is ready - so no special stuff needed.
But CppCMS 1.1 (future 1.2) provides much improved interface
to handle uploads:
http://cppcms.com/wikipp/en/page/cppcms_1_2_filtering
It would allow you to improve file handling significantly:
1. Allow performing authentication/authorization before the entire
file gets uploaded
2. Process file content during the process and for example validate it.
So if you want to you can use it.
2nd is make sure Nginx does not cache incoming POST data but transfers
it directly to CppCMS process.
Artyom