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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 7D76BBBAF for ; Mon, 21 Dec 2009 20:55:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEAADBhL0vRVdzVkGdsb2JhbACECpcFPwEBAQEJCQwHEwOsG4FbhE6IKQECAwWBKoItUgSLMA X-IronPort-AV: E=Sophos;i="4.47,432,1257116400"; d="scan'208";a="39140865" Received: from mail-fx0-f213.google.com ([209.85.220.213]) by mail2-smtp-roc.national.inria.fr with ESMTP; 21 Dec 2009 20:55:27 +0100 Received: by fxm5 with SMTP id 5so5579897fxm.8 for ; Mon, 21 Dec 2009 11:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=RjCpGw/5tufLVnZ7ORogLbA54HQABq3Srs932tXN0sg=; b=LNwCn67gmq7/0g/Gc68cBHx69C5J2dGqyi9eug6WypvJRmVG1ahT/xHFUgceWYGErl bKgGj41y4lD++6V0TUhUab6Y1q1Q8wEDTzoPzephwxMEKHv+3Zy3uX05mguDaW4q1Pn6 Aa57alusFU5CVh1FEiPq3iiDqubS3p4XtEwLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=wqQZXOCu5lbnjh4wGEAcuLLfd2bot1/jdGEn2+dvXs8Kh2b/JLZX3UO/G5gEgitwnM 3NAPTu/BcIpfZG2Gv5h4KZgyA97poIt1m6xwSPipYF5Pu8qjhsISjORdr3TSER1XmQS0 kg0wA0DUjkaL+Q+edNimpbFNfe5ZHl1/+ADsM= MIME-Version: 1.0 Sender: rigtorp@gmail.com Received: by 10.223.145.129 with SMTP id d1mr1924961fav.99.1261425326635; Mon, 21 Dec 2009 11:55:26 -0800 (PST) In-Reply-To: <1261325906.6545.39.camel@flake.lan.gerd-stolpmann.de> References: <1261325906.6545.39.camel@flake.lan.gerd-stolpmann.de> Date: Mon, 21 Dec 2009 20:55:26 +0100 X-Google-Sender-Auth: c199125e26c00ed9 Message-ID: Subject: Re: [Caml-list] OCaml is broken From: Erik Rigtorp To: Gerd Stolpmann Cc: caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocaml:01 gerd:01 stolpmann:01 gerd:01 minimized:01 parallelism:01 minimized:01 ocaml:01 runtimes:01 erlang:01 erlang:01 parallelism:01 partitioned:01 runtimes:01 20,:98 On Sun, Dec 20, 2009 at 17:18, Gerd Stolpmann wrot= e: > As you mention order books and soft-realtime, I guess your main concern > are minimized latencies. Well, you need then a style of parallelism that > focuses on a certain processing path for a single data item, and where > the latency is minimized by using several cores. I think ocaml is > unsuited for this type of task, but please don't call ocaml "broken" It is actually perfectly suitable for this, as long as you can run multiple runtimes and share data via low latency message passing. This is kind of how Erlang does it, with a separate heap for each lightweight thread (called process in Erlang). > because of this. Other types of parallelism can be well supported, > especially when you can accept multi-processing, and when you focus on > larger processing paths and partitioned data sets. I agree, but fork() and pipe() has problems. 1. Latency is high ~10=C2=B5s when tuned on Solaris, substantially higher >100=C2=B5s on Linux. 2. Runtimes don't share memory so data has to be copied. This is fine for small datasets or streaming data, like passing order book updates around. Even if I want to process a dataset and partition it and sends the work to multiple processes there is no framework in OCaml for me to use. Erik