aspose file tools*
The moose likes Threads and Synchronization and the fly likes Erlang and parallelrisim Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Erlang and parallelrisim" Watch "Erlang and parallelrisim" New topic
Author

Erlang and parallelrisim

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

How does Erlang make it easier to right parallel systems ? Why is it used with telecom domain, can we use it in non-telecom projects ? I read that is is programming langauge, how do we integrate with existing code in some other langauge say java ?


Groovy
Alain O'Dea
Greenhorn

Joined: Nov 16, 2010
Posts: 9
How does Erlang make it easier to right parallel systems ?

I find Erlang makes it easier to make correct complex concurrent systems by using actors and having no shared memory. The benefit of actors is that you structure a system how you'd structure a collaborative workload among people. The benefit of no shared memory is that failures occur within single processes and those failures can be consistently managed using OTP supervisors.

Why is it used with telecom domain, can we use it in non-telecom projects ?

It is used in the telecom domain because Ericsson built it for that purpose. Erlang can be used for anything you want to use it for. I used it to build http://verafin.com/ with Zotonic, the Erlang CMS.

I read that is is programming langauge, how do we integrate with existing code in some other langauge say java ?

Erlang is indeed a programming language. As these two articles from my blog show, Erlang can be integrated with Java fairly easily using the JInterface library:
http://concise-software.blogspot.com/2009/08/concise-howtos-message-from-java-to.html
http://concise-software.blogspot.com/2009/08/concise-howtos-message-from-erlang-to.html
Richard Carlsson
author
Greenhorn

Joined: Nov 07, 2010
Posts: 9
Pradeep bhatt wrote:How does Erlang make it easier to right parallel systems ? Why is it used with telecom domain, can we use it in non-telecom projects ? I read that is is programming langauge, how do we integrate with existing code in some other langauge say java ?


First, see my answers to this question: http://www.coderanch.com/t/517451/threads/java/Erlang-OTP

Erlang is a general purpose programming language, and you can use it for pretty much anything. (I do!) There are several ways of integrating with code in C, Java, or any other language - our book contains several chapters about integration, and explain it in detail. For example, you can run an external program via an Erlang "port" and communicate over stdio (which is useful for running things like OS commands), or you can integrate a library function in C as a "Natively Implemented Function" (NIF), you can hook up to a Java program as a "Java node" using Jinterface, or you can simply communicate via TCP/IP using some suitable protocol.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Sorry for the typo. I meant write ,not right.

What are the alternatives to Erlang?
Eric Merritt
author
Greenhorn

Joined: Nov 08, 2010
Posts: 6
Pradeep bhatt wrote:Sorry for the typo. I meant write ,not right.

What are the alternatives to Erlang?


That depends on what you mean by alternatives. Erlang is a general purpose language so in that sense it can fit in where any other language can fit in. However, if you mean what are the alternatives that provide process isolation, message passing, massive concurrency, etc. Well there really isn't any. None that provide a similar combination of features as Erlang.

There are others that provide Massive Concurrency (Haskell, Gambit Scheme, Mozart-Oz, etc), but not that have this same unique combination of features.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Thanks author.
 
 
subject: Erlang and parallelrisim