Starting out with a little prototype for internal enterprise web
services. Read the docs and can do basic rendering examples but how do
you, in a RESTful way I guess,
* download a large file to the client
* serve a delayed response to a client (like a result of a db query)
* maybe run some things on a server, while a client can pull job
status, and render results?
The first one is the most pressing, but if you can point me to
anything mojolicious on the other two bullets, I would also much
appreciate.
On Sun, 27 May 2012, �~Rик�~Bо�~@ Т�~C�~@�~Aкий wrote:
> 2012/5/27 mojon00b <vitaly.kup...@gmail.com>:
> > * download a large file to the client
> Maybe "Mojolicious::Plugin::RenderFile" (
> https://metacpan.org/module/Mojolicious::Plugin::RenderFile ) will be
> useful for this purpose.
That does look interesting. Has anybody done something similar for reading from another process (pipe)?
> * serve a delayed response to a client (like a result of a db query)
> * maybe run some things on a server, while a client can pull job
> status, and render results?
I did implement something like this - but in reverse. client uploads a large file and it gets processed on server chunk by chunk and sent back to the client.
I am not extremely happy with it, and the tests aren't complete but it seems to work (uses fork)
But there are two issues with that:
1) I wanted the client to be able to close the webserver and get the results later
2) Project is currently not funded, and hence somewhat deprioritized.
Ben
--
Ben Hitz Senior Scientific Programmer ** Saccharomyces Genome Database ** GO Consortium
Stanford University ** h...@stanford.edu
For downloading large files particularly in prod Xsendfile could be a viable option. You just need to activate the option(s) in your webserver(either of
apache or nginx), set the xsendfile header from your controller and
serve the response using Mojo::Asset::File module.
> > Spasibo, Viktor, I'll try it out. I see also that in a prior
> > discussion sri points to Controller::render streaming example, I'll
> > try that too.
> > On May 26, 3:00 pm, Виктор Турский <koorc...@gmail.com> wrote:
> > > 2012/5/27 mojon00b <vitaly.kup...@gmail.com>:> * download a large file to the client
> > -- > > You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> > To post to this group, send email to mojolicious@googlegroups.com.
> > To unsubscribe from this group, send email to mojolicious+unsubscribe@googlegroups.com.
> > For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.