tag:blogger.com,1999:blog-3773144963927368838.post4059148557961161799..comments2022-11-06T20:45:13.094-08:00Comments on hackerdashery: How Not to Handle StreamsSteven Hazelhttp://www.blogger.com/profile/16132606068051543995noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-3773144963927368838.post-64487974759140665262008-06-23T19:51:00.000-07:002008-06-23T19:51:00.000-07:00I feel like the last ASP developer on the planet. ...I feel like the last ASP developer on the planet. S3 sample code and free libraries for ever platform under the sun except vbscript.<BR/><BR/>Yes there is loads for DOTNET, I have nothing against DOTNET I just don't like it for web development.<BR/><BR/>I have dozens of web based production applications in ASP. It would be nice to be able to add new S3 based features without having to migrate them dotnet.Lonecrowhttps://www.blogger.com/profile/16982821711272109702noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-24997073993036978062008-05-31T05:12:00.000-07:002008-05-31T05:12:00.000-07:00Didn't try Perl, huh? My first transfer of a 4+ G...Didn't try Perl, huh? My first transfer of a 4+ GB file worked fine.Gabrielhttps://www.blogger.com/profile/18148404599195651582noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-2670387737359924672008-05-16T11:13:00.000-07:002008-05-16T11:13:00.000-07:00Zed,Thanks for pointing out http11_parser, that mi...Zed,<BR/><BR/>Thanks for pointing out http11_parser, that might be useful sometime. <BR/><BR/>I also thought it was interesting that the problem I encountered with Mongrel's API was caused by API problems further down. I look forward to seeing your C lib!Steven Hazelhttps://www.blogger.com/profile/16132606068051543995noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-13994387669494175592008-05-16T10:18:00.000-07:002008-05-16T10:18:00.000-07:00mads,That's exactly the read/write inversion I was...mads,<BR/><BR/>That's exactly the read/write inversion I was talking about. I don't want to pass in a file and have boto read from it; I want the key object to allow me to write data as I have it ready.Steven Hazelhttps://www.blogger.com/profile/16132606068051543995noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-27465765850462495012008-05-16T09:24:00.000-07:002008-05-16T09:24:00.000-07:00Did you look at send_file? As far as i can tell it...Did you look at send_file? As far as i can tell it allows you to stick it a file-like object, which it then read's from self.BufferSize bytes at a time.Mads Sülau Jørgensenhttps://www.blogger.com/profile/06437465740581063528noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-10232728946285012042008-05-16T08:39:00.000-07:002008-05-16T08:39:00.000-07:00mads,Looks like boto beat me to the fix. I was us...mads,<BR/><BR/>Looks like boto beat me to the fix. I was using 1.0a, which lacks that functionality. 1.2a provides the API you mentioned, as well as a more generic read() method. <BR/><BR/>That puts it ahead of AWS::S3. But, it looks like it still doesn't provide a file-like interface on the sending side. Perhaps the authors aren't aware that the Content-MD5 header is optional?Steven Hazelhttps://www.blogger.com/profile/16132606068051543995noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-53112670243947661082008-05-16T02:38:00.000-07:002008-05-16T02:38:00.000-07:00Clearly you haven't done you homework properly. fr...Clearly you haven't done you homework properly. <BR/><BR/>from boto import s3<BR/>conn = s3.connection.S3Connection('key', 'secret')<BR/>bucket = conn.get_bucket('foobar')<BR/>key = bucket.get_key('key')<BR/><BR/>for bytes in key:<BR/> other_fp.write(bytes)Mads Sülau Jørgensenhttps://www.blogger.com/profile/06437465740581063528noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-60743555685603473952008-05-16T00:08:00.000-07:002008-05-16T00:08:00.000-07:00have you looked at the TwistedMatrix library for P...have you looked at the TwistedMatrix library for Python. I think it has what you are looking for.Unknownhttps://www.blogger.com/profile/01178130625755310885noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-71071591130537367262008-05-15T22:56:00.000-07:002008-05-15T22:56:00.000-07:00Try the lazy bytestring version of the Haskell HTT...Try the lazy bytestring version of the Haskell HTTP library:<BR/><BR/>http://www.dtek.chalmers.se/~tox/site/http.php4<BR/><BR/>It's not yet merged into the main HTTP library, and the problem with not closing is a pain to work around.<BR/><BR/>Nevertheless I've used it to build a web crawler, and to build some analysis tools for video streams (Hogg). It's pretty efficient.Anonymoushttps://www.blogger.com/profile/15413914110610213900noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-7339774801713379032008-05-15T19:36:00.000-07:002008-05-15T19:36:00.000-07:00Hey, Mongrel author here, the full streaming fancy...Hey, Mongrel author here, the full streaming fancy HTTP library is available for you to use just the same way mongrel does. No need to use the whole server since it seems you are just looking to do some streaming. Take a look at the heavily documented http11_parser stuff in ext.<BR/><BR/>Additionally, there's a client version of the same parser I wrote in the rfuzz.rubyforge.org project you can also use, and it handles chunked encoding.<BR/><BR/>Finally, I'm currently working on a new C lib and potential server that unifies the above parsers into a single super nice, correct, and *streamable* API.<BR/><BR/>For the record, the reason that Mongrel has to do tempfiles or StringIO is that Ruby's broke ass cgi.rb is not stream capable and insists on having the whole thing around to parse mime-types out. Otherwise, the API I wrote is fully capable of doing what you want.<BR/><BR/>ZedUnknownhttps://www.blogger.com/profile/00769382854387732028noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-85209852817640868332008-05-15T19:25:00.000-07:002008-05-15T19:25:00.000-07:00Okay, I've set up Disqus. Unfortunately, they don...Okay, I've set up Disqus. Unfortunately, they don't convert old posts.Steven Hazelhttps://www.blogger.com/profile/16132606068051543995noreply@blogger.comtag:blogger.com,1999:blog-3773144963927368838.post-49946759445239258982008-05-15T18:31:00.000-07:002008-05-15T18:31:00.000-07:00That's where the uncool kids impress me.$fp = fope...That's where the uncool kids impress me.<BR/><BR/>$fp = fopen($_REQUEST['url'], 'r', false);<BR/>// Your little bit of processing.<BR/>fpassthru($fp);<BR/><BR/>P.S. Blogger "identity" thing and CAPTCHA seriously sucks. Can't you use Disqus?Unknownhttps://www.blogger.com/profile/05505537018806401033noreply@blogger.com