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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 502ABBBAF for ; Sun, 24 Oct 2010 14:52:22 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcJAM/Iw0xii1veZWdsb2JhbACDHpAijjkNCgkHESSoGTyCF4UgiQUBBAQBgR2DMnQEhFSIfw X-IronPort-AV: E=Sophos;i="4.58,231,1286143200"; d="scan'208";a="84281709" Received: from nm22-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.222]) by mail1-smtp-roc.national.inria.fr with SMTP; 24 Oct 2010 14:52:21 +0200 Received: from [98.139.91.63] by nm22.bullet.mail.sp2.yahoo.com with NNFMP; 24 Oct 2010 12:52:20 -0000 Received: from [98.139.91.35] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 24 Oct 2010 12:52:20 -0000 Received: from [127.0.0.1] by omp1035.mail.sp2.yahoo.com with NNFMP; 24 Oct 2010 12:52:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 33198.51705.bm@omp1035.mail.sp2.yahoo.com Received: (qmail 90609 invoked by uid 60001); 24 Oct 2010 12:52:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1287924739; bh=zsDCIZ/bhd5MhI82ANTIAGIjPaXz2ju4YBPz5pmmlyQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UktIQlWWGoSsUrM+a3JgM5pwq9X5Kh1CH4g0nKcmx3iM/p9va1I4PTCoOPK0r7xWknCd2C41+Rx3oGF4na+TOtFuryIHmzIiu5qu7zNByo/5JmqEgzSTDUWbaSkIwZnoFCEsrsCegy1b7fG4IvQG/qbzsxJbVEwZ/D5divexaE8= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Uu1uuAk4R1U066hcqsxBh8bu+NldpNdRawzTOxZar+nZH02fJwy/s0gAK9do63C4DQptbDuEF949z6PX3LcnFneQ5ejhPHwi8q/l8uCufsvbVqlN10ISL11y9ccETLNb29RU7v+o5rULFa/jR7oF2zBTiBd5KieBsuCj9QmECm0=; Message-ID: <748375.89908.qm@web111514.mail.gq1.yahoo.com> X-YMail-OSG: dvb4SwMVM1noUhlqMQKYW6GTII9Zlsyxr8kn_D.kak_E7dV PdcEaj9U4vBKjr4zaGTr1GVVWNUCo1BWzBVj9j7cT0ZszaxWWBuaW3T6OyTD YpAqdArzPF5BIdAfii48v4sTRbBnhlBdoS32NJLaAtEfm98HLHic8B1KIUWA NKznYMqP4cZXTIVvTA4DK8oazcO4Ytf65xFKzXL9IVsimm.KxJTXGjPCluqN NpfDL5u7TMoNeH4WMcuYnBqnCc_Kk8lQRjU3Nt3mhuAUQmqTvJr5J34.tX.u 25WyfXJBWYM3gPUyojo7Zqamqx4YGNUK4ZxADGAFzwpZQdpAYhhrXm00u7FN FVI.MqWjWssc- Received: from [213.205.70.193] by web111514.mail.gq1.yahoo.com via HTTP; Sun, 24 Oct 2010 05:52:19 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.107.284920 Date: Sun, 24 Oct 2010 05:52:19 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Asynchronous IO programming in OCaml To: caml-list@yquem.inria.fr, Jon Harrop In-Reply-To: <044101cb7367$10f94b30$32ebe190$@com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocaml:01 ocaml:01 real-world:01 monadic:01 threads:01 caml-list:01 handles:03 asynchronous:03 programming:03 asynchronous:03 programming:03 tutorial:03 blocking:04 echo:05 style:93 Hi,=0A=0A> Is there a tutorial on using something like LWT for asynchronous= =0A> programming in OCaml? I'm looking for an example like an echo server= =0A> that handles clients concurrently without blocking threads, so it can= =0A> handle thousands of clients without significant performance degradatio= n.=0A=0ALwt comes with a manual, which should be enough to get you started.= =0AIf you are looking for real-world examples, then the source of the=0AOcs= igen server is the most obvious place to look.=0A=0A(Lwt was my first expos= ure to the monadic style of programming; this=0Acaused some head-scratching= in the beginning, but after a while it=0Abecame second nature. I reckon t= his experience might be common to=0Aother Lwt users).=0A=0AHope that helps,= =0ADario Teixeira=0A=0A=0A=0A