Message from discussion
node-app: A new node wrapper binary for cluster and such?
Received: by 10.204.144.135 with SMTP id z7mr514061bku.1.1318970686711;
Tue, 18 Oct 2011 13:44:46 -0700 (PDT)
X-BeenThere: nodejs-dev@googlegroups.com
Received: by 10.204.146.137 with SMTP id h9ls1181117bkv.1.gmail; Tue, 18 Oct
2011 13:44:43 -0700 (PDT)
Received: by 10.204.140.67 with SMTP id h3mr512828bku.3.1318970683528;
Tue, 18 Oct 2011 13:44:43 -0700 (PDT)
Received: by 10.204.140.67 with SMTP id h3mr512827bku.3.1318970683512;
Tue, 18 Oct 2011 13:44:43 -0700 (PDT)
Return-Path: <coldredle...@gmail.com>
Received: from mail-bw0-f45.google.com (mail-bw0-f45.google.com [209.85.214.45])
by gmr-mx.google.com with ESMTPS id a16si518184bku.3.2011.10.18.13.44.43
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 18 Oct 2011 13:44:43 -0700 (PDT)
Received-SPF: pass (google.com: domain of coldredle...@gmail.com designates 209.85.214.45 as permitted sender) client-ip=209.85.214.45;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of coldredle...@gmail.com designates 209.85.214.45 as permitted sender) smtp.mail=coldredle...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by bkat2 with SMTP id t2so1387824bka.4
for <nodejs-dev@googlegroups.com>; Tue, 18 Oct 2011 13:44:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:sender:in-reply-to:references:date
:x-google-sender-auth:message-id:subject:from:to:content-type
:content-transfer-encoding;
bh=kzfytLAn1D9+Tl1b1AKCED7r1JRFskZabf5N35ilkDI=;
b=gWz17F8AJPJ6GInrtuzqSGh8lBMWy6TfE4+6k1i8gGDLyp2C2ay5twPykbg12PBtp4
C+3++IfQ9ATsqemN0cS53cZhYaCIgE4rBHe1Izmw7/wK/9maa+s9ycaN7v4f7SZlHbcz
foqV1XOzz3AzhUJnRzXuJzxq1/NWDdy+kQYug=
MIME-Version: 1.0
Received: by 10.223.77.71 with SMTP id f7mr6200705fak.33.1318970683051; Tue,
18 Oct 2011 13:44:43 -0700 (PDT)
Sender: coldredle...@gmail.com
Received: by 10.223.144.133 with HTTP; Tue, 18 Oct 2011 13:44:43 -0700 (PDT)
In-Reply-To: <12596820.1600.1318881693948.JavaMail.geo-discussion-forums@vbmh5>
References: <12596820.1600.1318881693948.JavaMail.geo-discussion-forums@vbmh5>
Date: Tue, 18 Oct 2011 13:44:43 -0700
Message-ID: <CA+fPNJWNXzqViFLbMzmo3HJLFS1iWjybWZAx=A3yToitoQj...@mail.gmail.com>
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?
From: Ryan Dahl <r...@tinyclouds.org>
To: nodejs-dev@googlegroups.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Mon, Oct 17, 2011 at 1:01 PM, Aikar <ai...@aikar.co> wrote:
> Per:=C2=A0https://github.com/joyent/node/pull/1879#issuecomment-2424882
> Some concerns have been raised about the new cluster functionality built
> into core.
> I personally feel this kind of functionality should be special outside of
> the node-core binary, but still be part of the node package.
> I propose a node-app (or similar named) binary, that wraps node and provi=
des
> the extra functionality such as cluster, and leaving room for future
> expansion into configuring "apps" of node instead of libraries, before we=
go
> down the road of node --foo --bar --baz --cluster-main myApp.js
> --cluster-workers worker.js
> I propose we continue to expand on package.json, and have a binary you pa=
ss
> a config file to to load.
> For example:
> ./myapp
>
> #!/usr/bin/env node-app
> {
> =C2=A0 "name": "myapp"
> =C2=A0=C2=A0"app": {
> =C2=A0=C2=A0=C2=A0=C2=A0"main": "cluster",
> =C2=A0=C2=A0=C2=A0=C2=A0"cluster": {
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"master": "app/master.js",
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"workers": {
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"app/workers/worker1.js":=
"",
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"app/workers/worker2.js":=
"1"
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
> =C2=A0=C2=A0=C2=A0=C2=A0}
> =C2=A0=C2=A0}
> }
>
> Under this idea, node binary would continue to serve as a single VM, and =
the
> node-app binary would be where all "core approved" magic would live.
> What do you guys think?
No. We're going for simplicity.