Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine.

learn more… | top users | synonyms (1)

1
vote
1answer
44 views

Polyglot Node.js with Typesafe Akka for Actor Model

I have case that needs manipulate large stream of JSON and injecting it to Apache HBase. Our system works on Node.js with Mongo then, since we needs to enhance performance so HBase is choosen to ...
1
vote
0answers
10 views

Best way to traverse data and update nodes in Mongo DB

I am using Angular Tree View in my web app. Data coming from the server is build with https://www.npmjs.com/package/mongoose-materialized getArrayTree() function. What I need is, syncing the ...
-1
votes
0answers
21 views

Simpler way to connect to a DB with NodeJS [migrated]

Connecting to any DB with Java is very simple - I just need the appropriate JAR in the classpath. Alternatively, steps involved in installing any of the (example) Oracle drivers for NodeJS are very ...
0
votes
0answers
79 views

Why does Node.js startup time vary so wildly?

When I run pretty much any Node application I'm working on, I find startup times can be anything between 0.25 seconds to upwards of 20 seconds and I've got no idea what causes this variation (even in ...
4
votes
3answers
224 views

What's special about “non-blocking” node.js?

In the short chapter, What is Node by McLaughlin, he writes: "Node has no blocks, no threads competing for the same resource (Node is happy to just let things happen however they happen), ...
-2
votes
0answers
37 views

What is the best way to structure a expressjs REST application? [closed]

I am a long time ASP.NET MVC developer. I am beginning with learning some nodejs and expressjs. I am confused whether the default folder structure generated by express generator is good enough for a ...
-2
votes
1answer
19 views

How to transfer contexts among separate node.js environments? [closed]

Lets suppose I have my app running on machine A, at some point I need to shut down that machine, and transfer my app to machine B to continue its process. so I need to be able to save and restore ...
0
votes
3answers
154 views

What is the best way to go about storing application options: file system or db? [closed]

We are looking to find the best way to store user options (skills, degrees, industries, languages, etc.) for drop downs. The options are between a JSON file we can store on the server file system or ...
1
vote
1answer
33 views

What information should go into file-level document block?

I primarily develop for Node.js. I got into a habit of putting a file-level docblock into all of my .js files. It looks something like this: /** * project-name * * Licensed under the BSD-3-Clause ...
0
votes
0answers
57 views

How to refactor bad Java modules into Java or NodeJS [duplicate]

A programmer, I have 5 years working experience with Java/JEE, with the following skill sets: - I have excellent knowledge about testing - I am not so good in Java (still don't know why, after ...
0
votes
0answers
75 views

Why would I need node.js to run a javascript library?

I'm interested in using sigma.js, and I'm looking at the instructions here: https://github.com/jacomyal/sigma.js/wiki One of the prerequisites is that node.js is installed. If it's a client side ...
2
votes
1answer
178 views

Node.js and CPU intensive web applications

Some time ago I made this question about porting a Silverlight application to web. We lack experience working with web applications and have started to look for training and resources. We have noted ...
0
votes
2answers
89 views

Middleware dependencies

I'm trying to convert a legacy PHP app to use the middleware paradigm, similar to connect/express.js. I've started porting the code into separate middlewares so that every feature is neatly self ...
0
votes
0answers
26 views

Synchronizing content between web-based app and game server

I have a MUD server, written in C, that I'm trying to move from file-based storage to MongoDB. Eventually, I'd like to offload administration of game content and settings to a web console, written in ...
2
votes
1answer
92 views

How to design a serverside heartbeat with nodejs?

I would post this on http://stackoverflow.com/, but figured I am not looking for code, just an idea how to accomplish this. I have a gameserver that interacts with nodejs and uses the websocket ...
1
vote
0answers
63 views

Proper usages of rooms/namespaces when making a News Feed with socket.io

I am working on making a News Feed for a piece of software that will have data posted to different hierarchical levels within the software. For example, the software will support multiple ...
1
vote
0answers
123 views

Is it a bad practice to compile TypeScript NodeJS app to a single JS file?

I'm currently exploring TypeScript and I was wondering why not compile the whole app to a single JS file instead of compiling every .ts file to it's corresponding .js. Example for such an app is ...
-1
votes
1answer
21 views

Looking for a node library that can help find string similarities [closed]

For example, I have the strings "Bat", "Spider", "Alien" as my data, and I feed the string "Batman" into a function. I'm looking for a module that would compare the similarity between the input string ...
-1
votes
1answer
45 views

node deep file indexer module cannot go deep [closed]

I'm trying to make a file indexer by node.js. The program is supposed to index files and folders in an array and also check inside folders and add all sub folders and files I wrote: ...
0
votes
0answers
13 views

NodeJS Tool to control request / response flux

I m actually facing a problem with my NodeJS api with a "Cant send headers after they are sent", in a special case. To bypass this and to check a bit deeper inside nodejs, I wanted to know if there ...
0
votes
1answer
149 views

Moving from C++ to NodeJS - Working with XML and JSON

I need to make a program to compare several large +100MB XML files, find the difference, and spit out JSON. I have written the comparison code in C++ and it performs great but now when I am getting to ...
1
vote
1answer
78 views

What is the purpose of separating routes into individual modules with Node.js and Express?

My app uses Node.js and Express 4 and has the following code in the app.js file located in the root directory: var express = require('express'); var index = require('./routes/index'); var users = ...
-3
votes
1answer
190 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
1
vote
1answer
249 views

Correct usage of Bluebird promise

This is related to this question on promise performance. The current top answer states that using new Promise is an anti-pattern in bluebird And that promisify should be used instead. I ...
0
votes
0answers
63 views

How to design a server that does not interrupt downloads?

I'm building a Node server that serves large files for download and streaming. It will be necessary to modify these files on occasion, sometimes in bulk with a script. I want to be able to update them ...
0
votes
0answers
124 views

Is this MEAN stack design-pattern suitable at the 1,000-10,000 user scale?

Let's say that when a user logs into a webapp, he sees a list of information. Let's say that list of information is served by one of two dynos (via heroku), but that the list of information ...
0
votes
2answers
62 views

Why should we expect user-space coroutines to be lighter than OS threads?

I have heard it said that managing concurrent TCP connections using user-space coroutines uses less resources per open connection than using an OS thread per connection. Actually, OS threads and ...
1
vote
1answer
99 views

Will simply adding a 'Allow Cross Origin Requests' to my node app work?

I'm trying to make a 'frontend web scraper'. I had the idea of setting up a node app that had a dynamic route that used Request (the NPM package) to scrape pages and displayed them as it's own. Then ...
0
votes
1answer
318 views

How to create a JSON or HTML file that dynamically mirrors file directory structure for jsTree 3.0 [closed]

I am looking to create a JSON OR HTML file that will accurately give the folder/file structure for a directory for use with jsTree 3.0 (www.jstree.com). I want to make it AJAX/lazy load so that each ...
1
vote
3answers
121 views

Executing scripts in parallel based on dependency tree

We have an app that is using a fairly simple stack (Linux, PHP, Oracle, Shell Scripts, etc). We have a series of scripts that need to be executed: /scr/app1/start.sh /scr/app2/start.php ...
2
votes
1answer
92 views

Is Current CoffeeScript Module Pattern Valid?

I have a Node.js web application that's written in CoffeeScript, which has a set of "services". These various services are currently exposed as a CoffeeScript class, which does a few things that I ...
1
vote
1answer
237 views

Assigning default values from environment variable in Node.js

When attempting to set default values for parameters that may exist in environment variables in JavaScript, I often see this pattern: var lag; try { lag = process.env.THROTTLE_LAG; } catch ( e ) ...
1
vote
0answers
158 views

Preserving Pre-formatted Multi-Line Strings in Node.js Scripts

There is a lot I don't like about PHP, but one thing I love is multi-line strings: $query = <<<EOT select field1 ,field2 ,field3 from tableName where field1 = 123 EOT; ...
-1
votes
1answer
122 views

How to connect mean.js to AWS S3

I am trying see how I can upload images and file to aws S3 via the mean.js framework. I am not sure how the backend is linked to S3. There are no resources online about this specific framework and ...
1
vote
0answers
42 views

Handling thousands of cassandra insert/updates

I have mobile app with backend server running in nodejs with cassandra as database. The app is like social network where you can share pictures and follow other people. Some operation like updating ...
1
vote
0answers
58 views

Help design this data import program

I want to import some data from various locations and pump it into MongoDb and some cloud services. The data starts off as JSON, I read that JSON, create some objects in mongo, go to the next level ...
5
votes
2answers
636 views

Where is the evidence for the performance of Node.js?

A lot of developers, especially ones who haven't used Node.js in production, seem to believe that Node.js is faster than other interpreted languages such as PHP, Python, and Ruby. These claims ...
0
votes
1answer
124 views

Should I prefer classes or singletons in JavaScript/Node?

This question applies especially to Node.js, but also to JavaScript in general. I started working on a simple web app in Node.js. I'm relatively new to Node and JavaScript, and come mainly from C# ...
0
votes
1answer
30 views

Image uploads - preoptimize with CDN or host on same machine?

I'm working on a personal blog that will be used for reviewing various goods/services and as a dev journal. I'm writing this in Angularjs and Nodejs as a learning experience, but I plan on using it ...
-4
votes
2answers
256 views

Turn on gzip on nginx, upstream (nodejs) or both? [closed]

I have an application running behind a proxy, both on the same machine. Which approach is more suited regarding compression, while preserving reasonable performance. turn on compression at the ...
1
vote
2answers
151 views

How can I ensure my JavaScript code will run in both Node.js and Io.js [closed]

With the danger of fragmentation due to the fork in Node, how can I make sure a "Node" project will run across both Node and its fork? The hope is that they will join together again once Joyent and ...
1
vote
0answers
286 views

Separation of web server and stateless REST API

Currently, I have a single Node server that provides both (a) stateless API routes returning JSON, and (b) session-based web routes. My API routes and web routes have started sharing a lot of code, ...
1
vote
0answers
148 views

vert.x message bus architecture

A large part of the vert.x architecture is around the message bus, and message passing between verticals. The main idea I guess being that I can create multiple modules (possibly in multiple ...
1
vote
1answer
64 views

Compose nested EventEmitters elegantly

I am developing a server-side JavaScript tool, and trying to do so in a modular way. I have a Parser class that is an EventEmitter - you call parse and it will eventually emit data and end events. It ...
4
votes
1answer
435 views

What is the best way to format complex SQL queries in Node?

I am using node-mysql to query a MySQL database via Express and Node. My queries are getting fairly complex and I want to format them across multiple lines. However, the only way I could accomplish ...
-1
votes
1answer
89 views

Is there a convention about the standard port for testing and developing in node.js?

I'm trying to get started with node.js. For example en Java and .net programmer often use the port 8080? Is there a convention like that in node.js? I know that any port above 1024 will do it but I ...
2
votes
1answer
156 views

Callback functions: Semantics and maintainability, when they aren't necessary [duplicate]

Within the context of JavaScript/Node.JS; Will using Callback functions improve the maintainability of source code, when there is no need for async programming? For example does the plain code sound ...
1
vote
2answers
107 views

Why is it bad if view engines encourage logic in templates

I once read this, because I wanted to see if handlebars is the right view engine for me or rather something else. A thing that I wonder since then is the following, why is it considered bad, if a ...
2
votes
1answer
309 views

NodeJs website webapp architecture

I would like some advice on how best to architect a website comprising the following: tool a landing page, open to the public, main marketing tool the main website/app, that people can access only ...
0
votes
1answer
73 views

How to define dependent function in node js?

I have a nodejs project in which a sample.js include two function function A depends on function B's callback . // smaple.js Both function are included in the same file function B ( ...