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
node-app: A new node wrapper binary for cluster and such?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aikar  
View profile  
 More options Oct 17 2011, 4:01 pm
From: Aikar <ai...@aikar.co>
Date: Mon, 17 Oct 2011 13:01:33 -0700 (PDT)
Local: Mon, Oct 17 2011 4:01 pm
Subject: node-app: A new node wrapper binary for cluster and such?

Per: https://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 provides
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 pass
a config file to to load.

For example:

./myapp

#!/usr/bin/env node-app
{
  "name": "myapp"
  "app": {
    "main": "cluster",
    "cluster": {
      "master": "app/master.js",
      "workers": {
        "app/workers/worker1.js": "",
        "app/workers/worker2.js": "1"
      }
    }
  }

}

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aikar  
View profile  
 More options Oct 17 2011, 4:09 pm
From: Aikar <ai...@aikar.co>
Date: Mon, 17 Oct 2011 13:09:24 -0700 (PDT)
Local: Mon, Oct 17 2011 4:09 pm
Subject: Re: node-app: A new node wrapper binary for cluster and such?

and windows would be "C:\node\node-app.exe C:\MyApp\MyApp.json"

And ideally, would CWD into the dir of the .json file for execution, and let
the .json file specify a different CWD relative (using path.resolve based
off CWD of .json) to the .json file.

and if node-app is invoked without a first arg, it looks for package.json
(or maybe a diff filename if you guys feel is more appropriate) in current
directory

so cd /myApp/
node-app


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian  
View profile  
 More options Oct 17 2011, 4:28 pm
From: Brian <theturtl...@gmail.com>
Date: Mon, 17 Oct 2011 13:28:41 -0700
Local: Mon, Oct 17 2011 4:28 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

I really like this idea a lot!

Brian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Dahl  
View profile  
 More options Oct 18 2011, 4:44 pm
From: Ryan Dahl <r...@tinyclouds.org>
Date: Tue, 18 Oct 2011 13:44:43 -0700
Local: Tues, Oct 18 2011 4:44 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

No. We're going for simplicity.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aikar  
View profile  
 More options Oct 18 2011, 5:55 pm
From: Aikar <ai...@aikar.co>
Date: Tue, 18 Oct 2011 14:55:06 -0700 (PDT)
Local: Tues, Oct 18 2011 5:55 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

You wouldn't consider configuring advanced features such as cluster in a
JSON file simpler than appending magical keywords onto the binary?

Having a standardized ways of developing/configuring apps from node-core in
an already established JSON file method Id think would be ideal..

What happens when you guys consider another feature 'core worthy', so  we
make a munged special keyword that does both?

I'm just really afraid of putting keywords into the arguments (and before
the filename at that, hurting shebang simplicity) is going to limit future
progression of node.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Dahl  
View profile  
 More options Oct 18 2011, 6:20 pm
From: Ryan Dahl <r...@tinyclouds.org>
Date: Tue, 18 Oct 2011 15:20:15 -0700
Local: Tues, Oct 18 2011 6:20 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

On Tue, Oct 18, 2011 at 2:55 PM, Aikar <ai...@aikar.co> wrote:
> You wouldn't consider configuring advanced features such as cluster in a
> JSON file simpler than appending magical keywords onto the binary?

No.

> Having a standardized ways of developing/configuring apps from node-core in
> an already established JSON file method Id think would be ideal..
> What happens when you guys consider another feature 'core worthy', so  we
> make a munged special keyword that does both?
> I'm just really afraid of putting keywords into the arguments (and before
> the filename at that, hurting shebang simplicity) is going to limit future
> progression of node.

It'll be okay.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 18 2011, 6:29 pm
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 18 Oct 2011 15:29:22 -0700
Local: Tues, Oct 18 2011 6:29 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

On Tue, Oct 18, 2011 at 15:20, Ryan Dahl <r...@tinyclouds.org> wrote:
>> I'm just really afraid of putting keywords into the arguments (and before
>> the filename at that, hurting shebang simplicity) is going to limit future
>> progression of node.

How does that hurt shebangs?

#!/usr/bin/env node cluster
// runs in node cluster mode


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt  
View profile  
 More options Oct 18 2011, 10:42 pm
From: Matt <hel...@gmail.com>
Date: Tue, 18 Oct 2011 22:42:18 -0400
Local: Tues, Oct 18 2011 10:42 pm
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

I disagree that it hurts shebangs, but it does hurt app-level
configurability.

In Haraka for example I have nodes=N|cpus in a config file. If it is there
(and not zero) it runs "clustered" (I hate that term, but it is familiar for
now).

That's now really hard to do. You can't do it from within node any more.

Matt.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Олег Илларионов  
View profile  
 More options Oct 19 2011, 5:11 am
From: Олег Илларионов <o...@emby.ru>
Date: Wed, 19 Oct 2011 13:11:51 +0400
Local: Wed, Oct 19 2011 5:11 am
Subject: Re: [node-dev] node-app: A new node wrapper binary for cluster and such?

If you have an webserver - probably you have an configuration file, its how
things used to be.  It will be bad if node-cluster configuration and
application config will be in the different places, so the solution is the
default config provided by the node cluster and accessible from the
application.

On 19 October 2011 06:42, Matt <hel...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »