[nodejs] [JOB] Senior JavaScript Engineer - Silicon Valley

2012-02-16 Thread OSS
I'm conducting a stealth search for a Senior JavaScript (jQuery, AJAX) Engineer with strong node.js or backbone.js for a Silicon Valley client paying to 140k + benefits. If you are interested in finding out more, please submit your resume to opensourcestaffing|AT|gmail.com in the strictest of confi

[nodejs] Re: EC2 machine inexplicably ramped up to 100% CPU

2012-02-16 Thread Christopher Jeffrey
This might be an ec2 problem. Are you sure it was 100% cpu and not just a 1.00+ system load? ec2 had a problem where node would get thrown into the uninterruptible sleep state forever, waiting on io. It made the scheduler eat itself and would make the machine unresponsive. Sometimes the kernel woul

[nodejs] Re: EC2 machine inexplicably ramped up to 100% CPU

2012-02-16 Thread Chris
I had something similar happen. I've got a very low traffic express app (no other modules) running on a micro instance. After leaving it overnight the app would be unresponsive and the node process using 100% CPU / requiring a kill -9. Other EC2 instance sizes do not have the same problem - only m

[nodejs] Re: REPL crash in production

2012-02-16 Thread Jeroen Janssen
Hi, I recently watched some of the NodeConf 2011 talks and I think one of the talks also mentioned using repl in production (I believe it was http://blip.tv/jsconf/nodeconf-2011-matt-ranney-5951153 ). If I understand correctly, he adds 'hooks' that you can inject stuff in from a repl, but he has t

[nodejs] Re: testing a simple app.get call

2012-02-16 Thread tjholowaychuk
http://www.devthought.com/2011/12/22/a-string-is-not-an-error/ On Feb 16, 10:58 am, fent wrote: > Take a look at zombie.js  http://zombie.labnotes.org/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received thi

[nodejs] Re: testing a simple app.get call

2012-02-16 Thread tjholowaychuk
dont throw strings On Feb 16, 10:58 am, fent wrote: > Take a look at zombie.js  http://zombie.labnotes.org/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to

Re: [nodejs] Looking to Join Open Source Project using Node

2012-02-16 Thread Srirangan
Here's what you need to do: 1. Create a profile on GitHub.com 2. Search / browser / find some project you are interested in 3. "Fork" the project and now you have a repository for that project 4. Clone this newly forked project on to your hard drive 5. Fix some bugs, make some improvements etc. No

[nodejs] Looking to Join Open Source Project using Node

2012-02-16 Thread Brent Lingle
I've been doing web development for about a year. I'm average at JavaScript and a beginner at Node. I'm looking to become part of an open source project, to help me learn both better. I learn quick and am eager to help. I can dedicate about an hour+ each night to the project. If your intereste

[nodejs] Re: monit and node

2012-02-16 Thread Angelo Chen
That's a good idea, so I added a tcp port in the app: resizer.js: var server = net.createServer(function (socket) {   socket.end('resizer\n') }); server.listen(8081, "127.0.0.1"); then monitor it in monit: (monitrc) check host resizer with address localhost if failed port 8081 typ

[nodejs] Re: EC2 machine inexplicably ramped up to 100% CPU

2012-02-16 Thread Kris Walker
The box is running Node.js 0.6.1 The node process is a webserver running a web application. I'm not using express, it's simple enough that I hand rolled the application. It is also not doing websockets or long polling, or anything fancy. It is making HTTP requests to an outside CouchDB service, HT

Re: [nodejs] REPL crash in production

2012-02-16 Thread Diogo Resende
On Thu, 16 Feb 2012 22:21:09 +0100, Laurent Perrin wrote: I just had a bad surprise on a production server and thought I'd share it. I have a complex node process that can open a REPL over a unix socket for debugging purposes. If I enter invalid code: - If the code is executed immediately, it r

Re: [nodejs] REPL crash in production

2012-02-16 Thread Nathan Rajlich
This might be one of those situations where Domains will help... On Thu, Feb 16, 2012 at 2:40 PM, Jann Horn wrote: > What you want will probably only worrk in an elegant way with streamlinejs. > > Am 16.02.2012 23:36 schrieb "Laurent Perrin" : > > > I just had a bad surprise on a production serve

Re: [nodejs] REPL crash in production

2012-02-16 Thread Jann Horn
What you want will probably only worrk in an elegant way with streamlinejs. Am 16.02.2012 23:36 schrieb "Laurent Perrin" : I just had a bad surprise on a production server and thought I'd share it. I have a complex node process that can open a REPL over a unix socket for debugging purposes. If

[nodejs] REPL crash in production

2012-02-16 Thread Laurent Perrin
I just had a bad surprise on a production server and thought I'd share it. I have a complex node process that can open a REPL over a unix socket for debugging purposes. If I enter invalid code: - If the code is executed immediately, it reports an error in the REPL and continues. - However, if

Re: [nodejs] monit and node

2012-02-16 Thread Tim Caswell
I don't know about monit, but if you start the service with upstart, a simple 'restart' directive will auto-restart the process if it dies. Is there some other port you can check on to see if your app is alive? On Thu, Feb 16, 2012 at 5:05 AM, Angelo Chen wrote: > Hi, > > I have a simple nodejs

Re: [nodejs] Re: TCP connection ending not emitting any event

2012-02-16 Thread Diogo Resende
On Thu, 16 Feb 2012 12:58:16 -0800 (PST), mscdex wrote: On Feb 16, 2:08 pm, Diogo Resende wrote: Same happens on v0.6.10.. FIN is what causes 'end' to be emitted for TCP streams. If I remember correctly, you'll have to listen on the 'close' event for RST. Thank you so much, close is emittin

Re: [nodejs] Re: Version 0.7.4

2012-02-16 Thread Mikeal Rogers
I watch es-discuss, isaacs watches es-discuss. I don't think any regular node contributors are on the actual committee or attend the real meetings but we keep an eye on the public list. On Feb 16, 2012, at February 16, 201211:50 AM, Mark Miller wrote: > I am one of Google's representative on TC

[nodejs] Re: TCP connection ending not emitting any event

2012-02-16 Thread mscdex
On Feb 16, 2:08 pm, Diogo Resende wrote: > Same happens on v0.6.10.. FIN is what causes 'end' to be emitted for TCP streams. If I remember correctly, you'll have to listen on the 'close' event for RST. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wik

[nodejs] Re: EC2 machine inexplicably ramped up to 100% CPU

2012-02-16 Thread mscdex
On Feb 16, 2:40 pm, Kris Walker wrote: > Normally I would say this is a memory leak, but the memory usage was > not reported to be very high by `top`. There is only one Node.js > process running on this machine, and it clearly hit 99% on every > request. Any idea why this would happen? What node

Re: [nodejs] Re: Version 0.7.4

2012-02-16 Thread Mark Miller
I am one of Google's representative on TC39 and am paying attention to Node and server side JS. During our verbal discussions at the TC39 meetings, sever side JS comes up fairly often. Whether it comes up often enough is a matter of judgement, but we're all quite aware of it. On Thu, Feb 16, 2012

Re: [nodejs] async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread HG
Hi! On Thu, Feb 16, 2012 at 9:20 PM, Dean Landolt wrote: > > > On Thu, Feb 16, 2012 at 1:48 PM, HG wrote: >> >> Hi! >> >> On Thu, Feb 16, 2012 at 3:38 PM, Dean Landolt >> wrote: >> > >> > >> > On Thu, Feb 16, 2012 at 7:09 AM, HG wrote: >> >> >> >> Hi! >> >> >> >> I created a small counting alg

[nodejs] EC2 machine inexplicably ramped up to 100% CPU

2012-02-16 Thread Kris Walker
One of my EC2 machines (not part of a cluster) stopped responding to my health checker the other day. I logged onto it and using `top` discovered that the node.js process was hitting 99% cpu utilization every time it received a request event. I killed the process and restarted the server; when I st

Re: [nodejs] async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread Dean Landolt
On Thu, Feb 16, 2012 at 1:48 PM, HG wrote: > Hi! > > On Thu, Feb 16, 2012 at 3:38 PM, Dean Landolt > wrote: > > > > > > On Thu, Feb 16, 2012 at 7:09 AM, HG wrote: > >> > >> Hi! > >> > >> I created a small counting algorithm first in JavaScript. Seems to > >> work ok. But this is of course singl

Re: [nodejs] TCP connection ending not emitting any event

2012-02-16 Thread Diogo Resende
Same happens on v0.6.10.. --- Diogo R. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nod

[nodejs] Re: testing a simple app.get call

2012-02-16 Thread fent
Take a look at zombie.js http://zombie.labnotes.org/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, sen

[nodejs] TCP connection ending not emitting any event

2012-02-16 Thread Diogo Resende
My environment: - node v0.7.4 - server listenning on loopback port 9000 - client connected to server - client events (timeout, error, end) listened and console'd - client retries connection when lost (based on any of the above events) After having client and server up I use tcpkill to simulate

Re: [nodejs] async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread HG
Hi! On Thu, Feb 16, 2012 at 3:38 PM, Dean Landolt wrote: > > > On Thu, Feb 16, 2012 at 7:09 AM, HG wrote: >> >> Hi! >> >> I created a small counting algorithm first in JavaScript. Seems to >> work ok. But this is of course single threaded and I could only store >> snapshots of it to DB. So I sta

[nodejs] Re: Connecting to an HTTPS server through a HTTP proxy

2012-02-16 Thread Elio
Wow that's that looks awesome! Eagerly looking forward for the release. On Feb 16, 11:21 am, Koichi Kobayashi wrote: > Hi Elio, > > You can use node-tunnel. > > https://github.com/koichik/node-tunnel > > Current version (v0.0.0) supports only Node v0.7, but next version > will work with v0.6.11 (

Re: [nodejs] Connecting to an HTTPS server through a HTTP proxy

2012-02-16 Thread Koichi Kobayashi
Hi Elio, You can use node-tunnel. https://github.com/koichik/node-tunnel Current version (v0.0.0) supports only Node v0.7, but next version will work with v0.6.11 (probably it will be released soon). On Thu, 16 Feb 2012 08:55:40 -0800 (PST), Elio wrote: > Hi, > > In our application we need

Re: [nodejs] Re: Alpha release of Coalitions.US.Org

2012-02-16 Thread Jim Lloyd
On Wed, Feb 15, 2012 at 9:15 PM, Joe Developer wrote: > On Thu, Feb 16, 2012 at 10:33 AM, Joe Developer > wrote: > >> On Thu, Feb 16, 2012 at 2:40 AM, Liam wrote: >> >>> On Feb 15, 10:49 am, Jim Lloyd wrote: >>> > On Wed, Feb 15, 2012 at 12:04 AM, Liam >>> wrote: >>> > > Interesting... Have yo

[nodejs] Connecting to an HTTPS server through a HTTP proxy

2012-02-16 Thread Elio
Hi, In our application we need to connect to arbitrary web servers from Node but our server can only connect to the outside internet through the corporate proxy. If the target page is on a regular HTTP server we simply set the path to the full URL and things just work; however if the target page i

[nodejs] Re: Version 0.7.4

2012-02-16 Thread Juraj Vitko
> As for the general implications of `module` becoming an identifier in es6 on node...that will be interesting. Wondering how much is Node.js (or server-side JS for that matter) represented in the ES6 process - a couple of Google searches reveal that perhaps not very much: site:mail.mozilla.org/p

Re: [nodejs] Re: connect - sessions

2012-02-16 Thread Nicholas Campbell
If you want sessions across many app servers or across app shutdowns then you need to store the sessions somewhere other than memory. This can be any sort of persistent backend datastore (assuming you want the session data stored for the server). The cookie/sessionid is used as a key for where you'

[nodejs] Re: testing a simple app.get call

2012-02-16 Thread bradleyg
I also use mocha/expressjs. I normally just require the server in the test and then use Mikeal's Request module to make http calls. https://gist.github.com/1846235 So your server is running (by requiring it) and then you make http calls to it. -- Job Board: http://jobs.nodejs.org/ Posting gui

[nodejs] Re: connect - sessions

2012-02-16 Thread Juraj Vitko
A lot of documentation around here is simply the source code itself. E.g. here you'd want to read: https://github.com/senchalabs/connect/blob/master/lib/middleware/session/session.js Just git clone the above repo and do some Ctrl+F on it, and read around. Btw. hitting a DB on each request doesn't

[nodejs] Re: Good resource or code to start with Node JS in web development

2012-02-16 Thread Dave Clements
I've found the tutorials on elegant code to be rather helpful, http://elegantcode.com/2010/11/08/taking-baby-steps-with-node-js-introduction/ http://elegantcode.com/2011/12/23/taking-toddler-steps-with-node-js-express/ Also, NodeJitsu docs provide some great points: http://docs.nodejitsu.com/

Re: [nodejs] Good resource or code to start with Node JS in web development

2012-02-16 Thread Anand George
Hi! For starters this is a good set. http://project70.com/nodejs/beginners-tutorial-node-js/ For some more advanced topics and examples check this compilation: http://www.scoop.it/t/nodejs-code On Thu, Feb 16, 2012 at 9:48 AM, funwithJS wrote: > New to Node JS, can any body tell from where t

[nodejs] testing a simple app.get call

2012-02-16 Thread }--) - Viktor
hi, I would like to test. I really would like to test, but I simply can't get my head around even the simplest call made in my main server file e.g. I would like to test the following in server.js app.get('/user', login_required, function(req, res) { // req.user is set, and a JSON object is retu

[nodejs] running node with backbone

2012-02-16 Thread }--) - Viktor
hi, I've started developing a game with a friend, as we would like to share server/client code as much as possible, we've decided to write a nice nodejs backbone adapter for our backend storage, MongoBD. the first results are already out: * a rewrite of backbone-mongodb: github.com/ToolPartTeam/b

[nodejs] Good resource or code to start with Node JS in web development

2012-02-16 Thread funwithJS
New to Node JS, can any body tell from where to start from ... though I have read the Node beginner book but still not much clear. Can any body share link, code, tutorial, or book to understand how NodeJS will work in web development. Basically looking for simple example of signup or login page .

Re: [nodejs] async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread Dean Landolt
On Thu, Feb 16, 2012 at 7:09 AM, HG wrote: > Hi! > > I created a small counting algorithm first in JavaScript. Seems to > work ok. But this is of course single threaded and I could only store > snapshots of it to DB. So I started thinking that what if I use Redis > directly as the memory. Then I

[nodejs] Module to monitor cpu load on all platforms?

2012-02-16 Thread Dominik Kienzler
Hi there, im currenty searching for a module like node-sigar, that works on all platforms. We are currently trying to build sigar with gyp for linux/windows and mac but atm whe have no success. Now before we go any further i wanted to ask if there is any node module that has the capabilitys

[nodejs] Re: async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread Chris Scribner
I think you want to take a lock out in the DB to protect your critical section of code. I thought that's something Redis supported. I'm sure performance would be better if the critical section of code was on the DB itself. Mongo is probably not a good choice as I think Mongo store procedures block

Re: [nodejs] Re: Node CPU use analysis

2012-02-16 Thread Matt
On Thu, Feb 16, 2012 at 4:25 AM, billywhizz wrote: > Matt - just wanted to address a couple of points you made: > > 1. With node.js clustering you get what is effectively a layer 4 load > balancer across the available cpu's on a single box. this is all being > handled by the OS and is insanely fa

[nodejs] async headache - I think I want blocking DB calls... or do I?

2012-02-16 Thread HG
Hi! I created a small counting algorithm first in JavaScript. Seems to work ok. But this is of course single threaded and I could only store snapshots of it to DB. So I started thinking that what if I use Redis directly as the memory. Then I could have multiple threads or even servers running agai

[nodejs] monit and node

2012-02-16 Thread Angelo Chen
Hi, I have a simple nodejs that to be loaded by Monit, this app does not have http so this will not work: check host resizer with address 127.0.0.1 if failed port 8080 protocol HTTP how to check this kind of nodejs app? thanks, Angelo -- Job Board: http://jobs.nodejs.org/ Posting guidelin

[nodejs] Re: Node CPU use analysis

2012-02-16 Thread billywhizz
Matt - just wanted to address a couple of points you made: 1. With node.js clustering you get what is effectively a layer 4 load balancer across the available cpu's on a single box. this is all being handled by the OS and is insanely fast 2. Restarting a server gracefully is pretty easy with a lit

[nodejs] Re: Control over 'require' logic

2012-02-16 Thread Mariusz Nowak
@Tomasz Node.js doesn't allow easy customization of Module functionality, it's basically internal. You also need to be aware that internal API may change even between minor versions (e.g. one of my modules stopped working from v0.6.10 because it relied on internal function). For such specific