Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5AB9A7D12 for ; Thu, 3 Nov 2011 12:34:52 +0000 (UTC) Received: (qmail 13089 invoked by uid 500); 3 Nov 2011 12:34:50 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 13053 invoked by uid 500); 3 Nov 2011 12:34:50 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 13045 invoked by uid 99); 3 Nov 2011 12:34:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 12:34:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dennis.lee.redfield@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 12:34:45 +0000 Received: by ggnv2 with SMTP id v2so1718345ggn.11 for ; Thu, 03 Nov 2011 05:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=uRrJVp2BLhLrd0SN/4UfCVbOCy6JoQP5QvLNNsljzTg=; b=tlUnTYojD1+jhTUXZ30ezhGUgKHTuMjAYiIK8so8sAvr6XWIqysD8nbfaggXjoFlbf ODz9Vw04pO+wtfXk8V3Z8RSo529Bm5eL+bvGPZDujYFENi0qwF/tJ+SN2Bb3Exg9pN+c ZZkmlSa99JgIFoHwG7UQuzo1N2CDERH8SYtR8= MIME-Version: 1.0 Received: by 10.43.52.136 with SMTP id vm8mr8006317icb.26.1320323664164; Thu, 03 Nov 2011 05:34:24 -0700 (PDT) Received: by 10.42.164.1 with HTTP; Thu, 3 Nov 2011 05:34:24 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Nov 2011 08:34:24 -0400 Message-ID: Subject: Re: couchdb .NET 4.0 client From: Dennis Redfield To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=bcaec529a051fdb5fc04b0d3ced9 --bcaec529a051fdb5fc04b0d3ced9 Content-Type: text/plain; charset=ISO-8859-1 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 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 --bcaec529a051fdb5fc04b0d3ced9--