From: james woodyatt <jhw@wetware.com>
To: The Trade <caml-list@inria.fr>
Subject: [Caml-list] ocaml and concurrency
Date: Thu, 29 Jan 2004 00:53:22 -0800 [thread overview]
Message-ID: <97908806-5238-11D8-8975-000393B8133A@wetware.com> (raw)
In-Reply-To: <200401282326.i0SNQntl004612@bismarck-chet.watson.ibm.com>
On 28 Jan 2004, at 15:26, Chet Murthy wrote:
>
> [...]
> "concurrency"! You ever tried to use Java threads to do anything
> meaningful? Check out the J2EE spec. It basically is BUILT around
> NOT sharing anything between threads.
>
> Oh, and y'know, we have a joke: "every Java bug is a connection-pool
> (or resource-pool) bug".
>
> Here's another: "When you arrive onsite, grep for synchronized, and
> if you see it, put your laptop back in your bag, tell 'em you're going
> to get coffee, and don't come back".
> [...]
In my current day job, I get paid to code on an application for the
VxWorks RTOS, a very multi-threaded environment. I've been around
multi-threaded programming environments for a long time now. Since the
late 1980's anyway. That's no joke about 'every bug being a
resource-pool bug'-- except in C/C++ (as well as Java probably), there
are also the other two kinds of bug: the 'unprotected critical section
bug' and the 'mutual exclusion deadlock bug'.
I've almost finished convincing myself that the main problem with the
Java Runtime Environment (which I don't have much experience with,
because I saw it as a train wreck waiting to happen back when the world
was all jazzed to be getting Java 1.0 someday soon, and I avoided it at
all costs) is that the multi-threaded programming environment itself
should be considered harmful and wrong and Just Say No, Kids.
But to write concurrent services without threads, you have to use a lot
of higher-order functions and non-blocking I/O functions. Hey, guess
what? Ocaml is a pretty good language for mixing functional
programming with imperative programming. What if the *right* way to
get concurrency really *is* the ancient Unix dogma of 1) use
heavyweight process switching and message passing between processes,
and 2) use monolithic event loops inside lightweight programs?
I'm still working on a demonstration of the concept. Please mind the
gap.
--
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-01-29 8:53 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 6:32 [Caml-list] ocaml killer Alexander Epifanov
2004-01-27 8:56 ` Alex Baretta
2004-01-27 9:43 ` Alexander Epifanov
2004-01-27 18:32 ` Shawn Wagner
2004-01-28 4:38 ` skaller
2004-01-28 5:30 ` james woodyatt
[not found] ` <40168498.6070708@tfb.com>
2004-01-27 19:10 ` Alex Baretta
2004-01-28 13:29 ` David Fox
2004-01-28 15:12 ` Eray Ozkural
2004-01-27 9:41 ` Alexander Danilov
2004-01-27 9:57 ` Alexander Epifanov
2004-01-27 16:43 ` Eric Stokes
2004-01-27 18:19 ` David Fox
2004-01-27 18:47 ` Richard Jones
2004-01-27 19:29 ` Eric Stokes
2004-01-28 13:30 ` Eray Ozkural
2004-01-28 23:26 ` Chet Murthy
2004-01-28 23:47 ` Martin Berger
2004-01-29 0:00 ` Chet Murthy
2004-01-29 0:04 ` Chet Murthy
2004-01-29 0:11 ` Martin Berger
2004-01-29 0:34 ` Chet Murthy
2004-01-29 0:47 ` [Caml-list] ocaml killer' Matt Gushee
2004-01-29 8:52 ` [Caml-list] ocaml killer Thomas Fischbacher
2004-01-29 16:20 ` fancy types (was Re: [Caml-list] ocaml killer) William Lovas
2004-01-29 17:13 ` james woodyatt
2004-01-29 17:26 ` Benedikt Grundmann
2004-01-29 17:17 ` Thomas Fischbacher
2004-01-29 17:41 ` Andreas Rossberg
2004-01-29 19:18 ` William Lovas
2004-01-30 10:36 ` Thomas Fischbacher
2004-01-31 3:39 ` William Lovas
2004-02-01 2:11 ` Vasile Rotaru
2004-02-02 11:08 ` Florian Hars
2004-01-29 18:33 ` Alex Baretta
2004-01-29 17:53 ` [Caml-list] ocaml killer skaller
2004-01-29 5:20 ` Brian Hurt
2004-01-29 6:36 ` Alexander Epifanov
2004-01-29 8:53 ` james woodyatt [this message]
2004-01-29 9:46 ` [Caml-list] ocaml and concurrency Vitaly Lugovsky
2004-01-29 10:37 ` Martin Berger
2004-01-29 11:51 ` Michael Hicks
2004-01-29 12:20 ` Alex Baretta
2004-01-29 12:43 ` Martin Berger
2004-01-29 15:42 ` Vitaly Lugovsky
2004-01-29 16:11 ` Martin Berger
2004-01-29 16:56 ` Andreas Rossberg
2004-01-29 17:19 ` james woodyatt
2004-01-29 17:43 ` Martin Berger
2004-01-29 17:54 ` Andreas Rossberg
2004-01-29 18:08 ` Martin Berger
2004-01-30 0:19 ` Lauri Alanko
2004-01-29 19:37 ` skaller
2004-01-30 0:05 ` Martin Berger
2004-01-30 6:52 ` Brian Hurt
2004-01-30 8:53 ` Issac Trotts
2004-01-30 20:45 ` skaller
2004-01-31 6:29 ` Brian Hurt
2004-01-30 20:12 ` skaller
2004-01-29 18:35 ` skaller
2004-01-29 9:56 ` Alex Baretta
2004-01-29 18:26 ` skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97908806-5238-11D8-8975-000393B8133A@wetware.com \
--to=jhw@wetware.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox