Menu

#69 Streaming interface

closed
5
2012-09-29
2008-10-27
Anonymous
No

Need to support really large (> 1G) packets. See the following email thread:

This can be done by using the HTTPClient library directly. The
HTTPClient streaming interface takes an OutputStream as a parameter, and
passes everything the client writes to that stream across as the POST
body. I haven't exposed it through the HTTPRequest interface since its
unclear how The Grinder would determine when the client had finished
writing to the stream (so it can record the time).

I suppose one alternative would be for the HTTPRequest to accept an
InputStream instead. The Grinder would then read from that stream and
write to the OutputStream until the InputStream was exhausted. Thus you
could do someting like:

myStream = FileInputStream("superBigFile.stuff")

request.POST('http://some.host.com/app/input', myStream)

If that sounds useful to you, please open a Feature Request.

  • Phil

Tuvell_Walter@emc.com wrote:

This reminds me of a problem I've seen, namely, how to send a
really large HTTP packet in Grinder.

The technique given by Marc works for reasonably-sized datafiles, but
when you try doing it with huge files (say 1G, for the sake of
concreteness) it blows the JVM out of the water (heap exhaustion).
I've tried adjusting -Xms/-Xmx, but have still found it to be a
problem (even though I have 8G RAM on my machine), as if the JVM
itself has some internal limit that I can't get around.

Anybody have a workaround for this? A streaming interface would be
nice, for example.


From: Marc Van Giel [mailto:marc.vangiel@xplore.be]
Sent: Friday, October 10, 2008 3:40 AM
To: grinder-use
Subject: Re: [Grinder-use] Xml data Post

Anil,

This is how you could do it:

    dataFile = open("data.xml","r")
    xmlData = dataFile.read()
    dataFile.close()

    test.POST('http://some.host.com/app/input', xmlData)

Cheers,
Marc.

On Fri, Oct 10, 2008 at 12:33 AM, <anil_jacob@comcast.net
<mailto:anil_jacob@comcast.net>> wrote:

    How can I do POST to a servlet data from an xml file?

    An example would be nice.

    Thanks
    Anil

Discussion

  • Philip Aston

    Philip Aston - 2008-11-16

    Implemented for the next release. SVN revison 3922.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.