<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2006/02/cb7d30ceda032a7b784aefe7eb3b802a"
  from="Gerd Stolpmann &lt;info@g...&gt;"
  author="Gerd Stolpmann"
  date="2006-02-07T19:01:12"
  subject="Re: [Caml-list] Re: async networking"
  prev="2006/02/ae6f50d034714c0e8551bc0415d4cf42"
  next="2006/02/00d09a52e6daa7b06dc961b0f30d2b4e"
  prev-in-thread="2006/02/ae6f50d034714c0e8551bc0415d4cf42"
  next-in-thread="2006/02/8c0b2f7ae1934f13f6e2fe7f472b292c"
  prev-thread="2006/02/b801b6e1958639194014abd51a4747a3"
  next-thread="2006/02/1df604b17c7343a34edde8c4272eced3"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="async networking">
<msg 
  url="2006/02/97ace0c2a51e26bcec579188e650a0e3"
  from="Rick Richardson &lt;rick@e...&gt;"
  author="Rick Richardson"
  date="2006-02-05T08:52:13"
  subject="async networking">
<msg 
  url="2006/02/60ec1632c3246656d7b42c04b18ad63f"
  from="Gerd Stolpmann &lt;info@g...&gt;"
  author="Gerd Stolpmann"
  date="2006-02-05T17:32:21"
  subject="Re: [Caml-list] async networking">
<msg 
  url="2006/02/1b2095ecd7a2ec4b5bd81a466b1767ea"
  from="Bardur Arantsson &lt;spam@s...&gt;"
  author="Bardur Arantsson"
  date="2006-02-06T18:36:02"
  subject="Re: async networking">
<msg 
  url="2006/02/94a4dea725ed48b6b931f9224e2e9dfd"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-07T04:55:37"
  subject="Re: [Caml-list] Re: async networking">
<msg 
  url="2006/02/ae6f50d034714c0e8551bc0415d4cf42"
  from="Bardur Arantsson &lt;spam@s...&gt;"
  author="Bardur Arantsson"
  date="2006-02-07T17:45:31"
  subject="Re: async networking">
<msg 
  url="2006/02/cb7d30ceda032a7b784aefe7eb3b802a"
  from="Gerd Stolpmann &lt;info@g...&gt;"
  author="Gerd Stolpmann"
  date="2006-02-07T19:01:12"
  subject="Re: [Caml-list] Re: async networking">
<msg 
  url="2006/02/8c0b2f7ae1934f13f6e2fe7f472b292c"
  from="Bardur Arantsson &lt;spam@s...&gt;"
  author="Bardur Arantsson"
  date="2006-02-07T19:44:46"
  subject="Re: async networking">
<msg 
  url="2006/02/9de2330188f2388caa317c2fb0112441"
  from="Gerd Stolpmann &lt;info@g...&gt;"
  author="Gerd Stolpmann"
  date="2006-02-07T20:30:32"
  subject="Re: [Caml-list] Re: async networking">
</msg>
<msg 
  url="2006/02/49f627717d14a6d636ed4b42a4ed94bd"
  from="Remi Vanicat &lt;remi.vanicat@g...&gt;"
  author="Remi Vanicat"
  date="2006-02-07T20:51:17"
  subject="Re: [Caml-list] Re: async networking">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/00d09a52e6daa7b06dc961b0f30d2b4e"
  from="Rick Richardson &lt;rick@e...&gt;"
  author="Rick Richardson"
  date="2006-02-07T19:28:11"
  subject="Re: [Caml-list] Re: async networking">
</msg>
<msg 
  url="2006/02/e89bba942ce6fd287e9d3d72aaa93335"
  from="Rick Richardson &lt;rick@e...&gt;"
  author="Rick Richardson"
  date="2006-02-07T21:31:48"
  subject="Re: [Caml-list] Re: async networking">
<msg 
  url="2006/02/e9a18d1cb4053c82e47fc6c85ff98215"
  from="Jonathan Roewen &lt;jonathan.roewen@g...&gt;"
  author="Jonathan Roewen"
  date="2006-02-07T22:03:34"
  subject="Re: [Caml-list] Re: async networking">
<msg 
  url="2006/02/4c274ae5cdd22d113ed70a1f4b75149e"
  from="Rick Richardson &lt;rick@e...&gt;"
  author="Rick Richardson"
  date="2006-02-08T04:18:07"
  subject="Re: [Caml-list] Re: async networking">
<msg 
  url="2006/02/ffd3c37c09ea8166f8864f74f592246e"
  from="Markus Mottl &lt;markus.mottl@g...&gt;"
  author="Markus Mottl"
  date="2006-02-08T14:43:56"
  subject="Re: [Caml-list] Re: async networking">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/5e5554587406ae917e5112a1f20ca1af"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-08T04:29:27"
  subject="Re: [Caml-list] Re: async networking">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/1276c935a6702530a86debf1fa1627c5"
  from="Pierre Etchemaïté &lt;petchema@c...&gt;"
  author="Pierre Etchemaïté"
  date="2006-02-05T20:18:08"
  subject="Re: [Caml-list] async networking">
</msg>
</msg>
</thread>

<contents>
Am Dienstag, den 07.02.2006, 18:44 +0100 schrieb Bardur Arantsson:
&gt; skaller wrote:
&gt; &gt; On Mon, 2006-02-06 at 19:34 +0100, Bardur Arantsson wrote:
&gt; &gt; 
&gt; &gt;&gt; However, if you want very high-performance networking
&gt; &gt;&gt; you'd be better off with something closer to the metal, i.e. something
&gt; &gt;&gt; like a libevent wrapper 
&gt; &gt; 
&gt; &gt; Argg no. Libevent isn't a library, it doesn't control invert.
&gt; &gt; It is a monolithic framework. Therefore it is not very useful because
&gt; &gt; your code will no longer be composable. In particular,
&gt; &gt; there is no way to compose two such frameworks, for example
&gt; &gt; you cannot use it with an event driven GUI framework.
&gt; &gt; 
&gt; 
&gt; Note that I said 'high-performance'.
&gt; 
&gt; Point #1: select() and anything based on it (I believe Equeue still is 
&gt; though I haven't looked at it for quite a while) is woefully inadequate 
&gt; for high performance I/O except in very specific circumstances.

Yes, the default Equeue implementation bases simply on select(). It is,
however, possible to develop alternate implementations. Currently, there
are three of them which integrate into the event loops of labltk,
lablgtk1 and lablgtk2. One could, for example, easily add an
implementation for advanced kernel interfaces like epoll. Or one that
sits upon libevent. There is, however, the basic design decision that
all events pass the same queue. This mainly has a certain scheduling
effect (application-driven scheduling), and increases latency if the
queue gets too long, but shows good behaviour under high load.

select() is, as far as I know, only bad if the file descriptors are
linked with many different processes, because all that processes must be
waked up in order to check the descriptors (even if no I/O can happen).
But if you only have Internet sockets, I expect that select() performs
well.

&gt; Point #2: It is not customary for UI applications to require 
&gt; particularly high-performance I/O, thus rendering the non-composability 
&gt; issue moot.

There are many aspects of high performance, for example throughput,
latency, and whether a low or high number of descriptors are watched. UI
applications are often interested in low latency for a moderate number
of descriptors.

I think there is another point why it is a bad idea to distinguish
between, say UI and server applications. Network components should be
shareable between all types of applications. For example, an HTTP
component is useful for both, so why should we develop an extra one for
specific needs of high performance?

Gerd

&gt; I'm _not_ recommending libevent for general use, just if you want high 
&gt; performance with an easily switchable backend implementation.
&gt; 
&gt; Cheers,
&gt; 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Telefon: 06151/153855                  Telefax: 06151/997714
------------------------------------------------------------

</contents>

</message>

