From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 60FBCBBAF for ; Sun, 24 Oct 2010 18:18:20 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYBAJ/4w0zRVditkGdsb2JhbAChXggVAQEBAQkJDAcRAx+fYYtvhSuJBQEBAwWFQwSBWoJ6hXmJGA X-IronPort-AV: E=Sophos;i="4.58,232,1286143200"; d="scan'208";a="63442208" Received: from mail-qy0-f173.google.com ([209.85.216.173]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 Oct 2010 18:18:20 +0200 Received: by qyl33 with SMTP id 33so790739qyl.18 for ; Sun, 24 Oct 2010 09:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=33hbYHdNVSnoY0MZNtDFtO0KvKmO8X57XieUAHSSpg8=; b=EPhsimDXDJRoccD3HZcAi7reTp0ycQYVG8CmwtC7vcyCUecT2mOWecjNHI0i9aokrn IiGtS1/6oNqH/8jZEXiGJFN3xUZqabnm0T7AsCgwqOgrLdwAidTbkJX0nNXNf3Yxk6Ay ZnyJBlGZKDyOo5yvY8ZWX7cDYyiNg9gZFKIao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=pWvBOUYnrR9iYeXlEunSlgHbodM0VoR1TJZy5lkqBxEmMlJwhkgvWIJcbF46fZEwDW fyTaSZ6Y9gesDQ3xziX89NzOvdR9QaQBrjk7eJ9GCds7g0qhM1EnKx40o8L3bnIT1BwJ jTcF3Sbz0+cM0whDmRjV6iDvCLeXKOtTYYUZQ= Received: by 10.229.237.129 with SMTP id ko1mr5328305qcb.4.1287937098902; Sun, 24 Oct 2010 09:18:18 -0700 (PDT) MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.229.187.83 with HTTP; Sun, 24 Oct 2010 09:17:58 -0700 (PDT) In-Reply-To: <044101cb7367$10f94b30$32ebe190$@com> References: <044101cb7367$10f94b30$32ebe190$@com> From: Jake Donham Date: Sun, 24 Oct 2010 09:17:58 -0700 X-Google-Sender-Auth: EvUrrB3wTA6kcqcFVmBwcpGDkzY Message-ID: Subject: Re: [Caml-list] Asynchronous IO programming in OCaml To: Jon Harrop Cc: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016364ec9bc45ed8604935f3948 X-Spam: no; 0.00; ocaml:01 ocaml:01 threads:01 threads:01 wrote:01 wrote:01 caml-list:01 handles:03 handles:03 asynchronous:03 programming:03 asynchronous:03 programming:03 tutorial:03 tutorial:03 --0016364ec9bc45ed8604935f3948 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Oct 24, 2010 at 3:34 AM, Jon Harrop wrote: > Is there a tutorial on using something like LWT for asynchronous > programming > in OCaml? I'm looking for an example like an echo server that handles > clients concurrently without blocking threads, so it can handle thousands > of > clients without significant performance degradation. > Not a tutorial, but here is a minimal TCP server in LWT: http://github.com/avsm/ocaml-cohttpserver/blob/master/server/http_tcp_server.ml Jake --0016364ec9bc45ed8604935f3948 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Oct 24, 2010 at 3:34 AM, Jon Harrop <jon@ffconsultancy.com> wrot= e:
Is there a tutorial on using something like LWT for asynchronous programmin= g
in OCaml? I'm looking for an example like an echo server that handles clients concurrently without blocking threads, so it can handle thousands o= f
clients without significant performance degradation.
<= br>
Not a tutorial, but here is a minimal TCP server in LWT:


Jake

--0016364ec9bc45ed8604935f3948--