Erlang/OTP Forums

Author Message

<  Erlang Web mailing list  ~  [Erlangweb-users] streaming data

jeffm
Posted: Mon Apr 19, 2010 3:16 am Reply with quote
User Joined: 29 Sep 2008 Posts: 43
Is it possible to stream data from, or to trigger streaming from a
controller model in erlang-web? The motivation behind this is that in a
test project I'm playing around with I have large (static) files which
should only be accessible once you authenticate as a user which is
allowed access to these files. Standard stuff really. Copying these
large files into memory in one block to send to the browser is wasteful
of memory. A quick inspection of the doco for both inets and yaws says
that they support this feature, but I can't find the doco on the allowed
return values for the controller modules. If I've missed it please point
me to it.

Jeff.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist
View user's profile Send private message
mich569
Posted: Mon Apr 19, 2010 7:24 am Reply with quote
Joined: 21 Jul 2008 Posts: 2
Hi Jeffm,

Here is the link to controller return-tuples doc: http://wiki.erlang-web.org/Eptic/ServerTuples.

There is one called {custom, Val} and using it lets you return anything accepted by the server (Val will go directly to HTTP server).

However, once I migrated old system (written in yaws) to ErlangWeb, and there was already yaws module for streaming, so I simply check authorization and set a session on ErlangWeb side and then redirected to yaws module (to do it you need also another appmod defined for this module).



----- "Jeffm" <jeffm@ghostgun.com> wrote:

> Is it possible to stream data from, or to trigger streaming from a
> controller model in erlang-web? The motivation behind this is that in
> a
> test project I'm playing around with I have large (static) files which
>
> should only be accessible once you authenticate as a user which is
> allowed access to these files. Standard stuff really. Copying these
> large files into memory in one block to send to the browser is
> wasteful
> of memory. A quick inspection of the doco for both inets and yaws says
>
> that they support this feature, but I can't find the doco on the
> allowed
> return values for the controller modules. If I've missed it please
> point
> me to it.
>
> Jeff.
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Erlangweb-users mailing list
> Erlangweb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> http://www.erlang-web.org/

--
Michal Zajda

Erlang Solutions Ltd.
http://www.erlang-solutions.com
---------------------------------------------------

---------------------------------------------------

WE'VE CHANGED NAMES!

Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.

www.erlang-solutions.com


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist
View user's profile Send private message
jeffm
Posted: Mon Apr 19, 2010 12:40 pm Reply with quote
User Joined: 29 Sep 2008 Posts: 43
Just a quick reply. I'll have to look at that page tomorrow obviously
missed it in my search. I found the tuples in the source code by
grepping for "{template" after I sent the email and saw the {custom,
Val} option, but figured that there must be another option that I was
missing. As elrlangweb supports different web servers including those
that support ewgi I thought that there might be a server independent
manner in which to do things. Is such a thing planned?

As I said above just a quick reply hope it makes sense.

Jeff.

Michal Zajda wrote:
> Hi Jeffm,
>
> Here is the link to controller return-tuples doc: http://wiki.erlang-web.org/Eptic/ServerTuples.
>
> There is one called {custom, Val} and using it lets you return anything accepted by the server (Val will go directly to HTTP server).
>
> However, once I migrated old system (written in yaws) to ErlangWeb, and there was already yaws module for streaming, so I simply check authorization and set a session on ErlangWeb side and then redirected to yaws module (to do it you need also another appmod defined for this module).
>
>
>
>


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum