[Flask] REST based File Sharing server Implementation in Flask

G.S.Vijay Raajaa gsvijayraajaa at gmail.com
Sun Jun 25 14:06:16 EDT 2017


Sure, Thanks for pointing out to stackoverflow. Let me try Tornado out and
see the performance of concurrent requests.

Regards,
Vijay Raajaa GS

On Sun, Jun 25, 2017 at 11:31 PM, ub at artfacts.net <ub at artfacts.net> wrote:

> On 25.06.2017 19:31, G.S.Vijay Raajaa wrote:
> > The number of non-block servings will correspond to the max number of
> workers in that case? Hypothetically if one user uploads multiple files
> that keeps all the workers busy, I am blocked when rest of the users online
> trying to upload files. Any thoughts to delegate it asynchronously?
> deployment with Tornado might be interesting for you as pointed it out
> in the answer here:
> https://stackoverflow.com/questions/18525856/flask-alternati
> ves-to-achieve-true-multi-threading?noredirect=1&lq=1
>
>
> >
> > Regards,
> >
> > Vijay Raajaa GS
> >
> > On 25.06.2017 18:43, G.S.Vijay Raajaa wrote:
> >
> >>/Hi UB, />//>/Thanks for the idea. I shall probe more into the same. But
> I have quick />/clarifications, even with mongo/gridfs and having the
> connectionI/O />/delegated to the database driver makes the transaction
> blocking? Kindly />/correct me if I am wrong. Is there a async way of
> handling the upload to />/mongo and keep flask serve other incoming
> request? /well, there will be workers. if you deploy your app in uwsgi or
> gunicorn,
> > you set the number of workers in you config. these will then handle
> > requests (more or less) indepently.
> > pymongo will have a connection pool to also handle multiple connections.
> [2]
> >
> >
> >>/On the same note, w.r.t mongodb-gridFS, how do you think the write
> />/performance is when compared to storing them directly on the filesystem,
> />/same w.r.t to read for serving? /i guess here's the bad news. it might
> be slower than writing directly to
> > the file system, but it might be better when you have app and storage
> > separated and need to write your files over the network. but you need to
> > consult benchmarks to be sure.
> >
> >>/I like to idea of scalability when you have file store within DB. /i
> think here's the upside. also seems, mongodb can help you to store and
> > organize 8search) file metadata. if that is a concern at all.
> >
> > [2]
> > http://api.mongodb.com/python/current/faq.html#how-does-conn
> ection-pooling-work-in-pymongo
> >
> >
> >
> > _______________________________________________
> > Flask mailing list
> > Flask at python.org
> > https://mail.python.org/mailman/listinfo/flask
> >
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20170625/572386a3/attachment.html>


More information about the Flask mailing list