Re: [nodejs] GC takes too much time when create large buffers frequentely

2012-11-13 Thread darcy
It cannot be avoid sometimes. In my case, I need to build a new block of binary data, then send to client. Even use C++ addon to build data, it's still necessary to return a Buffer for network sending. On Tuesday, November 13, 2012 6:20:43 PM UTC+8, chilts wrote: > > On 13 November 2012 23:09, d

Re: [nodejs] Please provide feedback as to best practice for reading files from a specific directory

2012-11-13 Thread kinghokum
Hi Martin, thanks again. I implemented async.js and it all worked a treat. Thanks again, I've learnt heaps about node from this simpel project and your feedback. Cheers On Wednesday, November 14, 2012 3:43:12 AM UTC+11, Martin Cooper wrote: > > You were doing fine right up until that "assuming"

Re: [nodejs] fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-13 Thread Mark Hahn
> So, I don't see a point of argue there Many, including myself, will argue. On Tue, Nov 13, 2012 at 10:52 AM, Alexey Petrushin < alexey.petrus...@gmail.com> wrote: > I personally feel that Node.js has two completely different application > areas: > > - High performant services when performance

Re: [nodejs] fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-13 Thread Alexey Petrushin
I personally feel that Node.js has two completely different application areas: - High performant services when performance and simple stack is the key (like C, Erlang and so on). - End user applications - when code simplicity and development productivity is the key (Web Dev, RoR). They require

Re: [nodejs] [ANN] AwsSum v0.12

2012-11-13 Thread Alan Hoffmeister
Wow, that Sydney thing was fast :) -- Att, Alan Hoffmeister 2012/11/13 Andrew Chilton > Hi everyone, > > I'd like to announce the latest version of AwsSum (http://awssum.io/), > v0.12. A great deal of work has gone into this release with many bug > fixes but the highlights of the new features

[nodejs] ANN: Node-Firebird 0.1.1 is released

2012-11-13 Thread Adrian Marius Popa
Changelog : - Fixes blob writes - Allow inserts of dates from string or number - Params are optional now You can install or update from npmjs -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mail

Re: [nodejs] html5 video not working with node.js

2012-11-13 Thread Nathan Rajlich
Seeing as though you're literally just serving regular files here, you should really just use the .static() middleware. See: https://github.com/visionmedia/express/blob/master/examples/static-files/index.js On Tue, Nov 13, 2012 at 2:00 AM, Yash Girdhar wrote: > > So, how can I serve the video in

Re: [nodejs] Please provide feedback as to best practice for reading files from a specific directory

2012-11-13 Thread Martin Cooper
You were doing fine right up until that "assuming". :-) At that point, you've kicked off the process of reading in the template files, but that has not yet completed. It's only complete when the last (in time, but not necessarily in sequence) fs.readFile() call has called its callback. There are lo

Re: [nodejs] html5 video not working with node.js

2012-11-13 Thread Mark Hahn
BTW, serving files through node is slow and inefficient. I would never think to send big video files through the V8 engine. Use nginx on the front end, or another of several good options. On Tue, Nov 13, 2012 at 2:00 AM, Yash Girdhar wrote: > > So, how can I serve the video in the same way as I

[nodejs] mongodb query builder

2012-11-13 Thread Halid Rian
I have tried to find on npm a module that can create a mongodb query from an object. before I write my own can anyone recommend one plugin? thanks -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this mess

Re: [nodejs] GC takes too much time when create large buffers frequentely

2012-11-13 Thread Andrew Chilton
On 13 November 2012 23:09, darcy wrote: > So, you should be careful with large buffers. Not just careful, but try to avoid them anyway. By streaming your info to/from disk, to/from requests or to/from external services you'll avoid having to use large buffers completely. It's probably a good prac

[nodejs] GC takes too much time when create large buffers frequentely

2012-11-13 Thread darcy
I created a 16MB buffer for every client request, and it's a local variable, which means will be GCed soon. When I run a benchmark, the qps was much less than expected, only hundreds per second. By the cpu profiler, I found that GC used 77% of total cpu time. With --trace_gc option, there are m

Re: [nodejs] html5 video not working with node.js

2012-11-13 Thread Yash Girdhar
So, how can I serve the video in the same way as I am serving the file, i.e. defining a route for that. right now, I am just giving the path of the video in the src attribute of video tag On Tuesday, 13 November 2012 05:27:00 UTC+5:30, ryandesign wrote: > > > On Nov 12, 2012, at 16:32, Nathan Ra

Re: [nodejs] Re: trying to wrap my head around "promises" - async vs Q

2012-11-13 Thread greelgorke
it's not backwards. first function is on top, last at the bottom, functions, which may appear multiple times in the callback chain are at the top most position by convention. i use the function declaration statement for this, because they get hoisted and the definition order is irrelevant then.