Re: [nodejs] Cluster question

2014-12-09 Thread John Fitzgerald
Yes, that works pretty well actually, I've used it a lot to synchronize a small in-memory cache to each process and distribute jobs to workers. 2014-12-09 7:33 GMT-08:00 Ω Alisson : > if I do something like this on a worker process, wouldn't be effective? > > process.on("message", function(m) {

Re: [nodejs] Correct Database usage

2014-11-28 Thread John Fitzgerald
I'm not him, but I've used the split schema pattern before. It helps a lot in a few cases. a) You want to provide a full export for the customer, you can dump the schema really simply. b) You don't want the serial columns to jump drastically between users. Like an Order ID. c) You want to upgrade c

Re: [nodejs] Which Scheduler/Crone do people prefer and why...

2014-02-03 Thread John Fitzgerald
I use node-schedule, it's been rock solid and one of the options is a cron style time format. I have nothing ill to say of node-cron, just that node-schedule has worked very well for us. @Alex - It's very convenient to schedule cache refreshes and monitors with node-schedule vs regular cron, one l

Re: [nodejs] Code documentation

2014-01-08 Thread John Fitzgerald
jsdoc is pretty good, I just setup a project using the docstrap template here: https://github.com/terryweiss/docstrap. Thought it was pretty straightforward to get going and looks good. This blog post was helpful for me when selecting as well: http://blog.fusioncharts.com/2013/12/jsdoc-vs-yuidoc-v

Re: [nodejs] Multi process app does not use all CPUs

2014-01-03 Thread John Fitzgerald
I ran this code as-is on Ubuntu and was able to see it hitting all cpus, using weighttp to hit the cluster and htop to monitor cpu usage and processor assignment. It appears you may be running this on windows (given your load utility choice) though, sorry I can't help with that. -John On Fri,

Re: [nodejs] Re: embedded database options for Nodejs

2013-04-19 Thread John Fitzgerald
When using these embedded databases, like node-levelup, how do you handle cluster based apps? I'd love to use an embedded database, but also need to run our express app on all 8 cores of the machine. I know I can process.send to children & master, but that seems like a clunky way of interfacing. C

Re: [nodejs] web storm to server

2013-04-02 Thread John Fitzgerald
@Adva It sounds like you're new to nodejs/hosting, and while you could go through the steps of setting up a vps yourself, you'd probably be better off going with a PaaS like Nodejitsu, Heroku, or similar. Their guides can walk you through the process of getting your app up quickly, most have cheap

Re: [nodejs] NodeJS, Socket.io Chat script, preventing flood messaging

2013-03-27 Thread John Fitzgerald
Restify has a nice throttle plugin, maybe you can adapt that or use the same concept. http://mcavage.github.com/node-restify/#Bundled-Plugins On Wed, Mar 27, 2013 at 8:44 PM, Enver Arslan wrote: > It uses Redis. I don't have Redis. It is a simple problem, why I have to > use Redis? Must be a sim

Re: [nodejs] Problem with using socket.io

2012-11-01 Thread John Fitzgerald
Try this for the html, loads socket.io from a CDN. (Works on my computer...) var socket = io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); On T

Re: [nodejs] Re: Socket.io, answer WELL, don't lock.

2012-10-31 Thread John Fitzgerald
@Andreas, I recommend reading this: http://www.catb.org/esr/faqs/smart-questions.html, it covers how to approach technical communities with these types of problems. There are plenty of folks willing to help when you ask the question in the right way, in the right place. On Wed, Oct 31, 2012 at 12

Re: [nodejs] Re: NodeJs e-commerce solution?

2012-09-26 Thread John Fitzgerald
Great implementation - it's very snappy compared to Magento, especially in basket during checkout actions. I was going to suggest similar to what you I think you're doing, a boring relational database fronted by nosql. -John On Wed, Sep 26, 2012 at 2:19 PM, Vinayak Mishra wrote: > I feel no s

Re: [nodejs] Node and developing on multiple machines

2012-06-23 Thread John Fitzgerald
on linux, or do 1 or 3 on windows? Or do you > combine them? > > > Den lördagen den 23:e juni 2012 kl. 00:22:53 UTC+2 skrev John Fitzgerald: > >> I do the same as Mark, a few cloud servers that I remote into for >> development. I'm often jumping between a mix of seve

Re: [nodejs] Node and developing on multiple machines

2012-06-22 Thread John Fitzgerald
I do the same as Mark, a few cloud servers that I remote into for development. I'm often jumping between a mix of several Win7/Centos/Ubuntu machines - to do remote development I use the following scenarios: 1. On either, ssh with console vim. 2. On linux, I'll do a fuse ssh filesystem mount and t