Received: by 10.204.129.9 with SMTP id m9mr832332bks.1.1352438432169; Thu, 08 Nov 2012 21:20:32 -0800 (PST) X-BeenThere: erlang-programming@googlegroups.com Received: by 10.204.131.72 with SMTP id w8ls4641829bks.3.gmail; Thu, 08 Nov 2012 21:20:31 -0800 (PST) Received: by 10.204.6.19 with SMTP id 19mr831833bkx.8.1352438431776; Thu, 08 Nov 2012 21:20:31 -0800 (PST) Received: by 10.204.6.19 with SMTP id 19mr831832bkx.8.1352438431757; Thu, 08 Nov 2012 21:20:31 -0800 (PST) Return-Path: Received: from hades.cslab.ericsson.net (hades.cslab.ericsson.net. [192.121.151.104]) by gmr-mx.google.com with ESMTP id l1si2562493bka.2.2012.11.08.21.20.31; Thu, 08 Nov 2012 21:20:31 -0800 (PST) Received-SPF: pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) client-ip=192.121.151.104; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) smtp.mail=erlang-questions-boun...@erlang.org; dkim=neutral (body hash did not verify) header...@gmail.com Received: from hades.cslab.ericsson.net (hades [192.121.151.104]) by hades.cslab.ericsson.net (Postfix) with ESMTP id 7973D5C0A6; Fri, 9 Nov 2012 06:20:21 +0100 (CET) X-Original-To: erlang-questi...@erlang.org Delivered-To: erlang-questi...@erlang.org Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by hades.cslab.ericsson.net (Postfix) with ESMTP id 5E2E25C00B for ; Fri, 9 Nov 2012 06:20:19 +0100 (CET) Received: by mail-ie0-f181.google.com with SMTP id 16so5493479iea.40 for ; Thu, 08 Nov 2012 21:20:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ww95MlfsBRa5C15gUp/xespdiNrJHJb1lKg9vxUWu38=; b=nuQh1v6PAT+P3DqLsoadSmSmyJ3lUj0Ab6drasrdkUccMBQ/iB8+I9P5v/YmbkEx2i wdApku95RFarFP5DO45E5UEoOasKG650XXSYAlxEMHyAHH9s//JydMinyeG1VEuJSt3D g/EGb16iLnpkklUJ/JAQK4md9bLSCFX00Dy24jPlNUIcCmDaoeYA4SstgBa9zgprkNAb 99mCV+zU2eCxqOZ83UedyqkJuGMdRZMBWNba/7daU/7AJ6VnoTPCTPn8HDZMa+tjP6nO r0oqbjwVRj1OBSmyq4nDRHH1JDTtaEUx9HIAp+wRQ61Wm8SUYsqGEpXOUusXzhJX0Q16 wQzA== MIME-Version: 1.0 Received: by 10.43.132.65 with SMTP id ht1mr9106301icc.1.1352438418320; Thu, 08 Nov 2012 21:20:18 -0800 (PST) Received: by 10.64.107.67 with HTTP; Thu, 8 Nov 2012 21:20:18 -0800 (PST) Date: Fri, 9 Nov 2012 08:20:18 +0300 Message-ID: From: Joshua Muzaaya To: erlang-questi...@erlang.org Subject: [erlang-questions] { ProcessName, NodeName } ! Message VS rpc:call/4 VS HTTP/1.1 across Erlang Nodes X-BeenThere: erlang-questi...@erlang.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Erlang/OTP discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2670320530201197312==" Errors-To: erlang-questions-boun...@erlang.org Sender: erlang-questions-boun...@erlang.org --===============2670320530201197312== Content-Type: multipart/alternative; boundary=20cf307cff04812f0004ce091bdb --20cf307cff04812f0004ce091bdb Content-Type: text/plain; charset=ISO-8859-1 I have a setup in which two nodes are going to be communicating a lot. On Node A, there are going to be thousands of processes, which are meant to access services on Node B. There is going to be a massive load of requests and responses across the two nodes. The two Nodes, will be running on two different servers, each on its own hardware server. I have 3 Options: HTTP/1.1 , rpc:call/4 and Directly sending a message to a registered gen_server on Node B. Let me explain each option. *HTTP/1.1* Suppose that on Node A, i have an HTTP Client like Ibrowse, and on Node B, i have a web server like Yaws-1.95, the web server being able to handle unlimited connections, the operating system settings tweaked to allow yaws to handle all connections. And then make my processes on Node A to communicate using HTTP. In this case each method call, would mean a single HTTP request and a reply. I believe there is an overhead here, but we are evaluating options here. The erlang Built in mechanism called webtool, may be built for this kind of purpose. *rpc:call/4* I could simply make direct rpc calls from Node A to Node B. I am not very sure how the underlying rpc mechanism works , but i think that when two erlang nodes connect via net_adm:ping/1, the created connection is not closed but all rpc calls use this pipe to transmit requests and pass responses. Please correct me on this one. *Sending a Message from Node A to Node B * I could make my processes on Node A to just send message to a registered process, or a group of processes on Node B. This too seems a clean option. *Q1.* Which of the above options would you recommend and why, for an application in which two erlang nodes are going to have enormous communications between them all the time. Imagine a messaging system, in which two erlang nodes are the routers :) ? *Q2.* Which of the above methods is cleaner, less problematic and is more fault tolerant (i mean here that, the method should NOT have single point of failure, that could lead to all processes on Node A blind) ? *Q3.* The mechanism of your choice: how would you make it even more fault tolerant, or redundant? *Assumptions: * The Nodes are always alive and will never go down, the network connection between the nodes will always be available and non-congested (dedicated to the two nodes only) , the operating system have allocated maximum resources to these two nodes. Thank you for your evaluations --20cf307cff04812f0004ce091bdb Content-Type: text/html; charset=ISO-8859-1

I have a setup in which two nodes are going to be communicating a lot. On Node A, there are going to be thousands of processes, which are meant to access services on Node B. There is going to be a massive load of requests and responses across the two nodes. The two Nodes, will be running on two different servers, each on its own hardware server.

I have 3 Options: HTTP/1.1 , rpc:call/4 and Directly sending a message to a registered gen_server on Node B. Let me explain each option.

HTTP/1.1

Suppose that on Node A, i have an HTTP Client like Ibrowse, and on Node B, i have a web server like Yaws-1.95, the web server being able to handle unlimited connections, the operating system settings tweaked to allow yaws to handle all connections. And then make my processes on Node A to communicate using HTTP. In this case each method call, would mean a single HTTP request and a reply. I believe there is an overhead here, but we are evaluating options here. The erlang Built in mechanism called webtool, may be built for this kind of purpose.

rpc:call/4

I could simply make direct rpc calls from Node A to Node B. I am not very sure how the underlying rpc mechanism works , but i think that when two erlang nodes connect via net_adm:ping/1, the created connection is not closed but all rpc calls use this pipe to transmit requests and pass responses. Please correct me on this one.

Sending a Message from Node A to Node B

I could make my processes on Node A to just send message to a registered process, or a group of processes on Node B. This too seems a clean option.

Q1. Which of the above options would you recommend and why, for an application in which two erlang nodes are going to have enormous communications between them all the time. Imagine a messaging system, in which two erlang nodes are the routers :) ?

Q2. Which of the above methods is cleaner, less problematic and is more fault tolerant (i mean here that, the method should NOT have single point of failure, that could lead to all processes on Node A blind) ?

Q3. The mechanism of your choice: how would you make it even more fault tolerant, or redundant?

Assumptions: The Nodes are always alive and will never go down, the network connection between the nodes will always be available and non-congested (dedicated to the two nodes only) , the operating system have allocated maximum resources to these two nodes.

Thank you for your evaluations





--20cf307cff04812f0004ce091bdb-- --===============2670320530201197312== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ erlang-questions mailing list erlang-questi...@erlang.org http://erlang.org/mailman/listinfo/erlang-questions --===============2670320530201197312==--