[nodejs] event loop lag hunting

2015-05-25 Thread Gregg Caines
Hey all, Does anyone have any experience hunting down causes of event-loop lag? I've determined that our app is heavily affected by it (See the attached png where I graph api response time in red against event-loop lag in blue), but now I'm at a bit of a loss for tracking down the source(s).

[nodejs] where-used analysis?

2015-01-08 Thread Gregg Caines
Hey all... does anyone have a solution for detecting where/if a file is required in a large codebase? Manually grepping for it gets old pretty quickly when there can be a difference in relative paths. I can't find anything like this in npm so I was thinking I could write such a thing using

Re: [nodejs] Re: State of the art for request isolation in http servers?

2014-01-15 Thread Gregg Caines
at 9:43 PM, Gregg Caines cai...@gmail.comjavascript: wrote: Well even though all the responses so far would require some pretty non-standard solutions (and therefore major changes to our current app), I really do appreciate them. We have logging, metrics and alerts on server restarts, so we

[nodejs] Re: State of the art for request isolation in http servers?

2014-01-14 Thread Gregg Caines
coverage ) G On Tuesday, January 14, 2014 7:40:51 PM UTC-8, tjholowaychuk wrote: check out Koa http://koajs.com/ you won't get separate stacks like you do with node-fibers but similar otherwise (built with generators) On Tuesday, 14 January 2014 12:28:52 UTC-8, Gregg Caines wrote: Hey

Re: [nodejs] Re: how to create a singleton

2013-11-27 Thread Gregg Caines
, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: So how do you achieve the same effect in javascript? In the browser, you have globals. The global object has nothing to do with web browsers. If you want just one instance of a thing, create it, and set it to a global variable. You can use

Re: [nodejs] Re: how to create a singleton

2013-11-22 Thread Gregg Caines
to a constructor Thank you so much for showing me the correct way On Thursday, November 21, 2013 7:37:32 AM UTC-8, Kamil Leszczuk wrote: Aah, nevermind then, I misunerstood ;) 21 lis 2013 16:36 Gregg Caines gr...@caines.ca napisaƂ(a): Yeah... that's what I'm saying :) G On Thu, Nov 21

[nodejs] Re: how to create a singleton

2013-11-21 Thread Gregg Caines
The singleton pattern is actually unnecessary in most languages outside of java, including javascript. You should be wary of any javascript book that tries to teach you singletons at all. Many of those gang of four patterns simply don't translate outside of java and c++ (eg if you want to

Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Gregg Caines
Yeah... that's what I'm saying :) G On Thu, Nov 21, 2013 at 7:33 AM, Kamil Leszczuk kamit...@gmail.com wrote: For example, if I have a module for emailing with a send() method on it, I don't have it export a constructor; I have it export an object. That object might maintain some state or

[nodejs] Stream Reliability

2013-08-01 Thread Gregg Caines
Hey all, From my understanding, the stream abstraction doesn't currently concern itself with (big-R) Reliability. Is that correct? For example, what if I wanted to send a text file over TCP (maybe with a capitalization transform in between for good measure), where the entire script could

[nodejs] http parsing in node?

2013-06-10 Thread Gregg Caines
Does anyone know if the core lib exposes the http parser somehow? Or if there's a package on npm worth using for http parsing? I saw a few packages but they look mostly abandoned. I'm looking for something smart enough to handle real (and trickier) requests, like chunked encoding. Thanks!

Re: [nodejs] http parsing in node?

2013-06-10 Thread Gregg Caines
of the common recommended packages is: https://github.com/substack/node-parsley -- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Mon, Jun 10, 2013 at 6:07 PM, Gregg Caines cai...@gmail.com wrote: Does anyone know if the core lib exposes the http parser somehow? Or if there's

Re: [nodejs] Re: Having trouble replicating with npm repo (couchdb) - anyone tried it lately and/or seen this error?

2013-05-17 Thread Gregg Caines
I ran into the same issue, and this is going to sound crazy, but I ended up writing my own replication (which is amazingly easy for anyone who's comfy with making http requests programmatically; couch spits out a page-able list of all changes in json format at

[nodejs] api in npm for getting the number or list of dependent packages?

2013-05-04 Thread Gregg Caines
Hey all, does anyone know if npm has an API (or couchdb view) for getting the list (or just the count) of dependent packages of a given package ? I suspect it does since npmjs.org has the info. I know there's an npm mailing list, but it mysteriously won't let me post. Thanks! G -- -- Job

[nodejs] Re: ANN: Pure Javascript ZooKeeper Client

2013-05-01 Thread Gregg Caines
There are a bunch of these ( https://npmjs.org/search?q=zookeeper ). How is yours different? I'm asking because I'm in the market for one. Thanks! G On Wednesday, May 1, 2013 10:43:31 AM UTC-7, Alex Guan wrote: Hi All, I just published a pure Javascript ZooKeeper client to npm:

[nodejs] Re: Getting Text Summary, Image or Video from link

2013-04-14 Thread Gregg Caines
It's the open graph protocol: http://ogp.me/ I don't have experience with these packages, but they might help: https://npmjs.org/package/ogp https://npmjs.org/package/og-meta-extract G On Saturday, April 13, 2013 3:21:01 AM UTC-7, nikkubhai wrote: In facebook ,twitter and google+ , when

Re: [nodejs] ANN: coveralls.io coverage reporting for node.js

2013-03-28 Thread Gregg Caines
by Istanbul? https://github.com/gotwarlost/istanbul -- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Sat, Mar 23, 2013 at 10:50 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I just published a rudimentary package for exporting node.js code coverage data to http

Re: [nodejs] ANN: coveralls.io coverage reporting for node.js

2013-03-24 Thread Gregg Caines
by Istanbul? https://github.com/gotwarlost/istanbul -- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Sat, Mar 23, 2013 at 10:50 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I just published a rudimentary package for exporting node.js code coverage data to http

Re: [nodejs] ANN: coveralls.io coverage reporting for node.js

2013-03-24 Thread Gregg Caines
-- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Sat, Mar 23, 2013 at 10:50 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I just published a rudimentary package for exporting node.js code coverage data to http://coveralls.io/ which lets you add a nifty code coverage button

[nodejs] ANN: coveralls.io coverage reporting for node.js

2013-03-23 Thread Gregg Caines
Hey all... I just published a rudimentary package for exporting node.js code coverage data to http://coveralls.io/ which lets you add a nifty code coverage button to your package's README, as seen here: https://github.com/cainus/urlgrey#readme and gives you nice reporting like

[nodejs] auto-reconnect strategy question

2013-01-21 Thread Gregg Caines
Hey all, I'm working on https://github.com/cainus/Prozess, which is a client library for Kafka and I'm looking to try to implement some sort of auto-reconnect capability. What are the usual strategies for that with regards to handling additional writes while the client reconnects? I was

[nodejs] Re: Is it wise to host nodejs apps on third party machines with source code? Can't we compile into machine code before hosting?

2013-01-10 Thread Gregg Caines
You shouldn't look to compilation to solve this problem, because compilation is not encryption. Even if it was compiled C, anyone who can open a hexeditor can see your username and password in there. I bet you could even see it from notepad. An encryption scheme won't be bulletproof either,

Re: [nodejs] new framework for json apis

2012-12-18 Thread Gregg Caines
route handler. When building things like these I've only found error handling to be that annoying thing that you need everywhere and only be configured once. On Mon, Dec 17, 2012 at 7:36 AM, Gregg Caines gr...@caines.ca wrote: req.on(end, handler) is an event that only happens once

Re: [nodejs] new framework for json apis

2012-12-17 Thread Gregg Caines
/routil#routil ), [npm-www]( https://github.com/isaacs/npm-www) demonstrates a bunch more of those modules. On Sun, Dec 16, 2012 at 4:21 PM, Gregg Caines gr...@caines.ca wrote: Ohh good questions... There doesn't seem to be any support for streams which sucks. Check out http

Re: [nodejs] new framework for json apis

2012-12-17 Thread Gregg Caines
Very cool, Shaun... Feel free to give me a shout anytime if you have questions, or find bugs. G On Mon, Dec 17, 2012 at 3:55 PM, shaun etherton shaun.ether...@gmail.comwrote: Hey Gregg FWIW. I like it so far and have started to use it. I'm mainly experimenting with it at this point, but

[nodejs] new framework for json apis

2012-12-16 Thread Gregg Caines
Hey all... I've been working on a new framework for restful json apis for a while, and was wondering if anyone might be interested in taking a look, giving feedback, etc. http://percolatorjs.com It's definitely a bit weird, but of course I think it's the best way to create JSON APIs. I

Re: [nodejs] new framework for json apis

2012-12-16 Thread Gregg Caines
...@gmail.com wrote: On Sun, Dec 16, 2012 at 1:38 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I've been working on a new framework for restful json apis for a while, and was wondering if anyone might be interested in taking a look, giving feedback, etc. http://percolatorjs.com

Re: [nodejs] new framework for json apis

2012-12-16 Thread Gregg Caines
Scott Elcomb pse...@gmail.com wrote: On Sun, Dec 16, 2012 at 1:38 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I've been working on a new framework for restful json apis for a while, and was wondering if anyone might be interested in taking a look, giving feedback, etc. http

Re: [nodejs] new framework for json apis

2012-12-16 Thread Gregg Caines
...@gmail.com wrote: On Sun, Dec 16, 2012 at 1:38 PM, Gregg Caines cai...@gmail.com wrote: Hey all... I've been working on a new framework for restful json apis for a while, and was wondering if anyone might be interested in taking a look, giving feedback, etc. http://percolatorjs.com Is it fair

Re: [nodejs] new framework for json apis

2012-12-16 Thread Gregg Caines
here that isn't covered by other libraries. Which means I recommend you take those two concepts and make them seperate open source libraries On Sun, Dec 16, 2012 at 1:28 PM, Gregg Caines gr...@caines.ca wrote: Totally agree, but I'm not even done the server-side yet. :) I'm not even entirely

[nodejs] ANN: Prozess, a node.js lib for the kafka distributed messaging queue

2012-10-08 Thread Gregg Caines
https://github.com/cainus/Prozess / https://npmjs.org/package/prozess There are lots of TODOs still on this, but we've got a Kafka lib working in node.js that handles Kafka 0.7 messages. We're not using it in production yet, but it's on its way and we'll be fleshing out more features as it

Re: [nodejs] ANN: Prozess, a node.js lib for the kafka distributed messaging queue

2012-10-08 Thread Gregg Caines
It's the only one AFAIK that can read / write 0.7+ messages. Ideally we would've forked a different lib, but didn't find them to be under very active development, or using normal node idioms. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: