On 3/25/07, ram <[EMAIL PROTECTED]> wrote:
> I've got a requirement to have our Pylons app act as an occasional
> proxy to a different web service. In one case, we're going to proxy to
> an instance of Microsoft report server to fetch the results of report
> runs. The service has a straightforward URL request mechanism that
> simply streams the bytes of the results (in our case, a PDF file) back
> to the caller.
>
> As you might imagine some of these results are rather large, and we'd
> rather not have the server get too involved in buffering the result,
> as it might consume all available memory, or having to write a disk
> version and then read that back to the originating client.
>
> Conceptually, I see this as two pipes that could simply be connected
> -- the client is an open socket that is reading, waiting for results.
> The proxied URL request is a socket that wants to pump out bytes. Is
> there any simple way to simply connect the two pipes and let the bytes
> flow without having to have the application do the work of moving
> bytes from one pipe to another?

There's proxying code in Paste to do this sort of stuff, but I tend to
rely on Apache for this.  That is, I have Apache in front of a bunch
of different apps, many of which are Pylons apps.  I'm sure other
Pasters will be online later to tell you more about using Paste's
proxying code if that's the route you wish to take.

Happy Hacking!
-jj

-- 
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to