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 62D6A94CD for ; Wed, 2 Nov 2011 21:17:09 +0000 (UTC) Received: (qmail 97462 invoked by uid 500); 2 Nov 2011 21:17:07 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 97429 invoked by uid 500); 2 Nov 2011 21:17:07 -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 97421 invoked by uid 99); 2 Nov 2011 21:17:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 21:17:07 +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 daniel.williams@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 21:17:02 +0000 Received: by wye20 with SMTP id 20so854971wye.11 for ; Wed, 02 Nov 2011 14:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=8kOzwWbbpnhh5Ga0Rx/jwjHiamH3Qb4tSkBCenR52co=; b=Wm9Pxf36lBn5j/2EqBjjdm8g9YBvXpcKBZpJqi5E/jdWMEeIGgrBY4OZPSdrZAwUEW taJJYGKfAkg8TdrICkz3FG46huNO1Gy6CoDhWWXhjrvo0GslOHSKHW+q26jAlkJhj3+J 6b/G+KEzKjmsVXmQwWgi4/HjBrtTjRv0etYOo= MIME-Version: 1.0 Received: by 10.227.197.69 with SMTP id ej5mr8059001wbb.1.1320268600922; Wed, 02 Nov 2011 14:16:40 -0700 (PDT) Received: by 10.227.195.4 with HTTP; Wed, 2 Nov 2011 14:16:38 -0700 (PDT) Date: Wed, 2 Nov 2011 15:16:38 -0600 Message-ID: Subject: couchdb .NET 4.0 client From: daniel williams To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015174c137ef751f304b0c6fc9b --0015174c137ef751f304b0c6fc9b Content-Type: text/plain; charset=ISO-8859-1 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 --0015174c137ef751f304b0c6fc9b--