couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Redfield <dennis.lee.redfi...@gmail.com>
Subject Re: couchdb .NET 4.0 client
Date Thu, 03 Nov 2011 12:34:24 GMT
I am running on Windows XP 32 bit and am making my own calls to couchdb
using Framework 4.0 and they are very fast.  Nothing as slow as the number
you are reporting.  I am thinking it problem is with the library not the
underlying system - Why not write your own calls like:

 HttpWebRequest myRequest =( HttpWebRequest ) WebRequest.Create( requestURL
);
               myRequest.MaximumAutomaticRedirections = _MaxRedirect;
               myRequest.MaximumResponseHeadersLength = _MaxHeadersLen;
               response = ( HttpWebResponse ) myRequest.GetResponse( );
               Stream receiveStream=response.GetResponseStream( );
               StreamReader readStream = new StreamReader( receiveStream,
Encoding.UTF8 );//we shall see if this is right
               return readStream.ReadToEnd( );

Hope this helps.

On Wednesday, November 2, 2011, daniel williams <daniel.williams@gmail.com>
wrote:
> Hi,
>
> I posted an question the other day in regard to latency leveraging the
> Redbranch Hammock library on windows.  The codebase leverage the .NET 4.0
> HttpWebRequest class which seems to have some serious issues in it's
> communication with CouchDB.  I've noticed in a tcpdump on Mac with code
> compiled in mono that a PUT/Save takes roughly 1~4ms total.  The same code
> run on Mono or .NET takes about 200 ms and in analyzing the tcpdump on
> windows (through mono or .NET making the execution) that after the Http
> Continue 100 is received the .NET/Mono code on Windows 64 bit will wait
> 200ms roughly before sending the ACK to receive the response payload.  See
> below, I've changed the machine names:
>
> 10:03:04.552113 IP machine > server:5984: P 1:190(189) ack 1 win 256
> E...X.@.......oX..o....`.eQ.Ug.bP...7\..PUT
> /test/TestEntity-8cdddd58-1860-429e-90
> 10:03:04.554113 IP server:5984 > machine: P 1:26(25) ack 190 win 65346
> E..AI.@...zC..o...oX.`..Ug.b.eR.P..B....HTTP/1.1 100 Continue
>
>
> 10:03:04.554220 IP machine > server:5984: P 190:602(412) ack 26 win 256
> E...X.@
>
.......oX..o....`.eR.Ug.{P...8;..{"Foo1":"foo","Foo2":"foo","Foo3":"foo","F
> 10:03:04.558000 IP server:5984 > machine: P 26:351(325) ack 602 win 64934
> E..mI.@...y...o...oX.`..Ug.{.eTDP.......HTTP/1.1 201 Created
> Server: CouchDB/1.1.
> 10:03:04.751642 IP machine > server:5984: . ack 351 win 255
> E..(X.@.......oX..o....`.eTDUg..P...6...
> 10:03:04.752131 IP server:5984 > machine: P 351:461(110) ack 602 win 64934
> E...I.@
>
...y...o...oX.`..Ug...eTDP....Y..{"ok":true,"id":"TestEntity-8cdddd58-1860-
>
> In doing a test in isolation on Windows 64 bit and .NET 4.0 I wrote a
> TcpClient implementation that meets HTTP standards and I was able to PUT
> 4000 records successfully in less than 40 secs.  Does anyone out there
know
> of a more efficient library that can be used to communicate with the
> CouchDB API on Windows 64 bit servers running .NET 4.0?  Looking at the
> results of my tests run it would seem the most efficient to do straight
> socket communication.
>
> Thanks.
>
> dan
>

-- 
Trust No One

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message