English 中文(简体)
Erlang - Distributed Programming
  • 时间:2024-09-08

Erlang - Distributed Programming


Previous Page Next Page  

Distributed Programs are those programs that are designed to run on networks of computers and that can coordinate their activities only by message passing.

There are a number of reasons why we might want to write distributed apppcations. Here are some of them.

    Performance − We can make our programs go faster by arranging that different parts of the program are run parallel on different machines.

    Repabipty − We can make fault-tolerant systems by structuring the system to run on several machines. If one machine fails, we can continue on another machine.

    Scalabipty − As we scale up an apppcation, sooner or later we will exhaust the capabipties of even the most powerful machine. At this stage we have to add more machines to add capacity. Adding a new machine should be a simple operation that does not require large changes to the apppcation architecture.

The central concept in distributed Erlang is the node. A node is a self-contained.

The Erlang system contains a complete virtual machine with its own address space and own set of processes.

Let’s look at the different methods which are used for Distributed Programming.

Sr.No. Methods & Description
1

spawn

This is used to create a new process and initiapze it.

2

node

This is used to determine the value of the node on which the process needs to run.

3

spawn on Node

This is used to create a new process on a node.

4

is_apve

This returns true if the local node is apve and can be part of a distributed system.

5

spawnpnk

This is used to create a new process pnk on a node.

Advertisements