[Beowulf] Which is better GNU C or JAVA (for network programing)

Douglas Eadline, Cluster World Magazine deadline at linux-mag.com
Wed Jan 21 22:28:36 EST 2004


> 
> Lest we get too enamored with CCLISP, there's also:
> (roll of drums)
> "Concurrent Prolog"
> (Crash of cymbals, choir of angels)
> 
> Having not actually looked at anything in Prolog for the last 15+ years, I 
> thought it would be interesting to repeat a short program here. (I have no 
> idea if it would work, since I don't recall CP Syntax)
> 
> quicksort([X|Xs],Ys):-
>    partition (Xs?,X,Smaller,Larger),
>    quicksort (Smaller?,Ss),
>    quicksort (Larger?,Ls),
>    append(Ss>,[X|Ls?],Ys).
> quicksort([],[]).
> 
> partition([Y|ln],X,[Y|Smaller],Larger):-
>    X>=Y|partition(ln?,X,Smaller,Larger).
> partition([Y|ln],X,Smaller,[Y|Larger]):-
>    X<Y|partition(ln?,X,Smaller,Larger).
> partition([],X,[],[]).
> 
> append([X|Xs],Ys,[X|Zs]):-
>    append(Xs?,Ys,Zs).
> append([],Xs,Xs).
> 
> There is a scribbled note (not in my handwriting) that mentions the following:
> - => indicates communications
> name? => readonly variable, process waits until there is a value in the 
> name before proceeding (presumably this is some sort of barrier sync?)

I had actually helped write a parallel version of Prolog that would
automatically execute the standard Prolog quicksort in parallel. It had a
very interesting run-time system that automatically load balanced the
parallelization - at least I thought it was cool in a "self organizing 
Sante Fe Institute kind of way".

There was (and still is to some degree) a good argument for such
languages. For those who do not understand (or hate) Prolog, it operates
by interpreting the program using a "resolution mechanism". The resolution
mechanism is total transparent to the user. So if you parallelize the
resolution mechanism, you have parallelized all Prolog programs (which
does not necessarily mean they will run faster by the way). Indeed, it is
even possible (and quite simple) to write meta-interpreters in Prolog to
interpret Prolog in parallel - and thus play with the parallel resolution
mechanism.  The runtime performance issue has also been solved so that
Prolog programs can run quite fast. The trouble is that it is very
difficult for most programmers to get their mind around Prolog, but once
you do, it can provide a very expressive and concise language in which to
program (particularly database stuff).  There is a gnu Prolog compiler
that works rather well (plus a few other free versions as well).

Alas, most discussions of "high level" approaches are not well received 
these days. Seems there is certain fashion to computer languages. 
Finally, if you are interested, some old papers on this subject 
can found at http://www.clusterworld.com/deadline.html.

Doug

> 
> ----------
> 
> In all of this, they make the very appropriate comments along the lines of: 
> sure it's horribly inefficient, but, you've got:
> a) tons of computer power potentially available (I mean, you could have 128 
> of those 8 MHz 286's spinning away)
> b) you've got a moderately transparent way to distribute the load across 
> those processors without worrying too much about subtlety
> c) human hours expensive|machine hours cheap
> d) The computers WILL get faster, so don't agonize about CPU resources too 
> much.. time and the market will improve performance per dollar or wall 
> clock hour much faster than toiling  over a hot keyboard ekeing out 
> algorithm tuning improvements.  Spend your time on better high level 
> algorithms to solve "your problem".
> 
> Hey, this was in 1986,1987 or so.. In the last 15 years, I don't think much 
> has really changed, philosophically.
> 
> 
> 
> 
> 
> 
> 
> James Lux, P.E.
> Spacecraft Telecommunications Section
> Jet Propulsion Laboratory, Mail Stop 161-213
> 4800 Oak Grove Drive
> Pasadena CA 91109
> tel: (818)354-2075
> fax: (818)393-6875
> 
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> 

-- 
----------------------------------------------------------------
Editor-in-chief                   ClusterWorld Magazine
Desk: 610.865.6061                            
Cell: 610.390.7765         Redefining High Performance Computing
Fax:  610.865.6618                www.clusterworld.com


_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list