Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Server-to-Server Communication

Received: by 10.204.145.140 with SMTP id d12mr5541300bkv.6.1351362739800;
        Sat, 27 Oct 2012 11:32:19 -0700 (PDT)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.204.129.72 with SMTP id n8ls5524511bks.0.gmail; Sat, 27 Oct
 2012 11:32:01 -0700 (PDT)
Received: by 10.205.123.145 with SMTP id gk17mr5538415bkc.2.1351362721842;
        Sat, 27 Oct 2012 11:32:01 -0700 (PDT)
Received: by 10.205.123.145 with SMTP id gk17mr5538414bkc.2.1351362721814;
        Sat, 27 Oct 2012 11:32:01 -0700 (PDT)
Return-Path: <ja...@nodefly.com>
Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50])
        by gmr-mx.google.com with ESMTPS id v13si493025bkw.0.2012.10.27.11.32.01
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sat, 27 Oct 2012 11:32:01 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of ja...@nodefly.com) client-ip=209.85.215.50;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of ja...@nodefly.com) smtp.mail=ja...@nodefly.com
Received: by mail-la0-f50.google.com with SMTP id r15so2946366lag.9
        for <nodejs@googlegroups.com>; Sat, 27 Oct 2012 11:32:00 -0700 (PDT)
        d=google.com; s=20120113;
        h=mime-version:x-originating-ip:date:message-id:subject:from:to
         :content-type:x-gm-message-state;
        bh=g4HWydn3UVbNOm4fk1oDo4KKlMYvUel4cmGD9nG8rYc=;
        b=AMFnOAIW1nh5+rHis00epl7+TXN8g1cwCvhKhfRv2kycfg3fZ07d48X8byaRTNeNOS
         s5zz+tBbQ/QZFiKjsL+vtyiWfZPqktRxj9O54ZSubxPVccKSr7We+iSnb9G1ww8ZCklz
         Q0A5OE3FuhfzTih7RU/YCjhi8XznsoKKTdK+OI3PTareVpzLHp6xy9W9GdpOkb7cCzrm
         dmzxMUnbvZ5XMjqwRTbB5ncQiGANWeacMbAHxsRL9rzvsqKP2BW7n8ci6B4fz1Wt6fFU
         fAZFFNVcm8H5OPpfhF1mO9+Irow2Lbneb+EJg8i0lGRGZNtZaXmiUMCYvRmMiZYZiIff
         T6aQ==
MIME-Version: 1.0
Received: by 10.112.13.140 with SMTP id h12mr2463537lbc.12.1351362720792; Sat,
 27 Oct 2012 11:32:00 -0700 (PDT)
Received: by 10.114.13.201 with HTTP; Sat, 27 Oct 2012 11:32:00 -0700 (PDT)
X-Originating-IP: [70.68.115.131]
Date: Sat, 27 Oct 2012 11:32:00 -0700
Message-ID: <CAFzK5Ef1+iMsVdkGAWBtRoUnXy_PdvKnOEG9VAuzW36AnQV...@mail.gmail.com>
Subject: Server-to-Server Communication
From: Jacob Groundwater <ja...@nodefly.com>
To: nodejs@googlegroups.com
Content-Type: multipart/alternative; boundary=bcaec539654cef7f9804cd0ea6b0
X-Gm-Message-State: ALoCoQkWT2xD1+1KrDHHBr0rrpZphuxiVLNSH7H/LfGruqwvsq28U8Pmi2inmDZENmMNscCvnVv3

--bcaec539654cef7f9804cd0ea6b0
Content-Type: text/plain; charset=ISO-8859-1

I was wondering what others are using for communication between back-end
servers. Since I control all involved servers, I would rather not include
authentication at the application layer. Forwarding SSH ports is perfectly
acceptable.

On that note, my own research has lead me to three options, in order of
personal preference:

   1. a message queue (ZeroMQ)
   2. websockets (socket.io)
   3. synchronize against the database (MySQL or Redis)

ZeroMQ seems pretty awesome, but I am curious if anyone has tried it, and
what there experience was. For example, I stumbled across an article
discussing how their REQ/REP model can lock up
easily.<http://lucumr.pocoo.org/2012/6/26/disconnects-are-good-for-you/>
The
workaround is fairly simple, but I am interested in soliciting more
experience in the area.

Websockets seem like a "native" way, but I see them as living in the
client-server domain. For example, I would have to setup express and a
basic restful service on each back-end server. Websockets are also 1-to-1,
where as ZeroMQ supports N-to-N connections.

Synchronizing against the database would involve polling to achieve
real-time like events. I know Redis supports a pub/sub system, but does not
seem to have any RPC-like mechanisms.

In the end, I will make the decision best suited to our needs, but I am
sure I can gain from some discussion on the matter.

Thanks everyone,

- Jacob Groundwater

--bcaec539654cef7f9804cd0ea6b0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I was wondering what others are using for communication between back-end se=
rvers. Since I control all involved servers, I would rather not include aut=
hentication at the application layer. Forwarding SSH ports is perfectly acc=
eptable.<div>
<br></div><div>On that note, my own research has lead me to three options, =
in order of personal preference:</div><div><ol><li>a message queue (ZeroMQ)=
</li><li>websockets (<a href=3D"http://socket.io">socket.io</a>)</li><li>
synchronize against the database (MySQL or Redis)</li></ol><div>ZeroMQ seem=
s pretty awesome, but I am curious if anyone has tried it, and what there e=
xperience was. For example, I stumbled across an article discussing how the=
ir <a href=3D"http://lucumr.pocoo.org/2012/6/26/disconnects-are-good-for-yo=
u/">REQ/REP model can lock up easily.</a>=A0The workaround is fairly simple=
, but I am interested in soliciting more experience in the area.</div>
</div><div><br></div><div>Websockets seem like a &quot;native&quot; way, bu=
t I see them as living in the client-server domain. For example, I would ha=
ve to setup express and a basic restful service on each back-end server. We=
bsockets are also 1-to-1, where as ZeroMQ supports N-to-N connections.</div=
>
<div><br></div><div>Synchronizing against the database would involve pollin=
g to achieve real-time like events. I know Redis supports a pub/sub system,=
 but does not seem to have any RPC-like mechanisms.</div><div><br></div>
<div>In the end, I will make the decision best=A0suited=A0to our needs, but=
 I am sure I can gain from some discussion on the matter.</div><div><br></d=
iv><div>Thanks everyone,</div><div><br></div><div>- Jacob Groundwater</div>

--bcaec539654cef7f9804cd0ea6b0--