Is Clojure for multicores or distributed systems?

200 views
Skip to first unread message

ssecorp

unread,
Jul 3, 2008, 4:24:16 PM7/3/08
to Clojure
Clojure is partly created to handle concurrency if I have understood
it correct.

But does that mean it is meant for programming large concurrent/
distributed systems OR does it man it is made for programming
multicore-processors?

ssecorp

unread,
Jul 3, 2008, 4:38:00 PM7/3/08
to Clojure
And is languages that are good for concurrent systems good for
multiple core programming?

Stephen C. Gilardi

unread,
Jul 3, 2008, 4:39:27 PM7/3/08
to clo...@googlegroups.com
On Jul 3, 2008, at 4:24 PM, ssecorp wrote:

Clojure is partly created to handle concurrency if I have understood
it correct.

But does that mean it is meant for programming large concurrent/distributed systems OR does it man it is made for programming multicore-processors?

Clojure's current concurrency features are geared toward handling concurrency on a single machine with a shared address space, not for distributed systems.

More info:



--Steve

ssecorp

unread,
Jul 3, 2008, 4:30:45 PM7/3/08
to Clojure
Clojure was created for concurrency right?

But for programming concurrent/distributed systems or multicore
processors?


Is concurrency in those different areas achieved in a similar way or
does it take different approaches?

Rastislav Kassak

unread,
Jul 4, 2008, 4:35:41 AM7/4/08
to clo...@googlegroups.com
I'm not sure, what do you mean actually.
Everything, what is suitable for distributed environment, could be
used on multicore systems. Take an example of Erlang in previous
releases without inherent support for SMP - you could start more nodes
on the same machine.
Clojure has better support of multi-core systems with the concept of
STM. It's much more effective in environment with shared RAM, it's for
sure.

OTOH, if you have support for asynchronous communication
processes/actors/agents, you can always build distributed system. And
Clojure does, maybe not so sofisticated as Erlang (I'm not sure, don't
know Clojure so much), nevertheless it's just a matter of good
libraries.
Language supports everything to build library with good interface -
macros, HOF, you name it. It's lisp after all.

Mark H.

unread,
Jul 6, 2008, 12:35:17 AM7/6/08
to Clojure
On Jul 3, 1:30 pm, ssecorp <circularf...@gmail.com> wrote:
> But for programming concurrent/distributed systems or multicore
> processors?
>
> Is concurrency in those different areas achieved in a similar way or
> does it take different approaches?

In practice it often _does_ take different approaches. OpenMP tends
to be a shared-memory solution rather than a cluster solution, for
example. Sometimes people will use MPI for communicating between
nodes, and then parallelize on a single node with OpenMP or something
like that. Others use single-solution approaches, such as languages
(e.g., UPC, Titanium, Co-Array Fortran) or libraries (e.g., Global
Arrays) that provide a shared-memory abstraction. Still others prefer
to leave their MPI codes as they are and use an MPI backend that knows
to use the memory for communication rather than the network card, when
communicating between processors on the same node.

mfh
Reply all
Reply to author
Forward
0 new messages