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

learn more… | top users | synonyms (1)

0
votes
0answers
20 views

Speed of image comparison using GraphicsMagick in Node.js

Trying to determine whether a single image matches one of 100 other images. I have it working, but it returns the resutl too slow to operate in our production application. Current Implementation ...
0
votes
0answers
20 views

Client REST UI on top of node based REST Service with OAUTH2 and role managment

I have a REST service with oauth2 authentication and a role based access control on top of my API. For an example, users can be account owners and may be able to get and post to /account/123/users. ...
1
vote
0answers
25 views

Task monitoring with NodeJS

I want to monitor batch jobs which get triggered by an REST API. This batch jobs are long running native data processings. So naturally, I want to return immediately after a REST call e.g. uploaded ...
2
votes
1answer
35 views

Best practice for multi-module design local dependencies

This question may have been asked before and if so feel free to link to the answer. I'm looking for a modern and effective recipe for a common problem. I have a project with a main module, A, that ...
0
votes
1answer
45 views

Scaling up with zeromq REQ and nodejs

In the excellent book Node.js the right way the author shows this example: const fs = require('fs'), zmq = require('zmq'), // socket to reply to client requests responder = ...
0
votes
1answer
34 views

In NodeJS/ExpressJS, how should one decide between using request params and query strings?

While I am starting to get a hold of NodeJS programming, I am a bit confused by when to use request params and how their practical use differs from using query strings. In particular, I can do ...
1
vote
2answers
71 views

Stateful server on heroku

I'm building a multiplayer trivia game where the server is written in NodeJS and hosted on Heroku. I ran into a problem when the server should notify the users that time's up for answering a question ...
1
vote
2answers
259 views

Is saying “there are no threads in nodejs” correct?

Perhaps I am getting something wrong here but I had a conversation today that left me perplex. I hear a lot about nodejs not having threads. but that's not entirely true, right? The precise ...
1
vote
1answer
132 views

Returning functions within Javascript objects

After coming across Douglas Crockford's views on class-free OOP, and doing away with new and this in Javascript I tried defining an object with its own variable and function, and returning it in a ...
45
votes
8answers
6k views

What are the drawbacks of making a multi-threaded JavaScript runtime implementation? [closed]

I've been working on a multi-threaded JavaScript runtime implementation for the past week. I have a proof of concept made in C++ using JavaScriptCore and boost. The architecture is simple: when the ...
5
votes
2answers
92 views

Are Node.js and Zend “routers” replacements for query strings?

I don't understand the actual point of Node.js and Zend routers. I feel like they are trying to replace the query string, but I only see examples of single level routes. For example this is what I ...
2
votes
2answers
156 views

How to speed up frontend development process [closed]

I wasn't quite sure where to post this, but this place seemed appropriate. I've noticed during the time I've been doing web development that I waste more time configuring and setting up my ...
0
votes
1answer
61 views

Should models be returning data directly to the client, or to the controller instead?

Disclaimer: This is my first time: using node, creating a REST API, and trying out MVC server side. (so, just statistically speaking, I'm probably doing something wrong ¯\_(ツ)_/¯) I'm working on ...
3
votes
1answer
121 views

Node.js dependencies weigh too much

Recently I started playing with node.js. Now, every node tutorial out there states that you should start with npm init and then, say you want some standard server framework, say you choose ...
2
votes
1answer
76 views

How to to design a cronjob-like requirement

I have to design a system where I need to make some processing (which might take say 10 mins). After some amount of time (say 30 mins), I need to come back and check the status of this processing ...
5
votes
3answers
130 views

How can I implement real time gameplay when a user isn't online?

I have two questions about keeping timers running (like growing crops in Farmville) when users are not online: Am I right in thinking that I should just calculate what would have happened when the ...
-1
votes
1answer
75 views

Best approach to scheduled events in Node.JS

I'm currently writing a browser based game where events occur in real time - as an example of this, take Farmville, where a crop only grows after a particular length of time. Running a method every ...
3
votes
2answers
52 views

Will pre-loading a small file in Node.js significantly improve web server efficiency?

When responding to an HTTP request for a commonly used file on my web server, for example index.html, rather than reading the file each time, I list those popular resources in an array and read them ...
1
vote
0answers
81 views

Sending large amount of messages async

The scenario is this: I have web based service that does regular request processing and it's doing persistence into db etc.. Fast response to the client is crucial. So now the average request is about ...
3
votes
2answers
187 views

Docker, microservices and git workflow

We are a young company that's developing a web app in node.js with the microservice architecture. Actual development workflow: Each microservice is stored in a private repository Different ...
5
votes
2answers
203 views

Respectable design pattern for making node modules flexible/testable?

I am looking to get some input from some more experienced testers than what I am. :) I am trying to make my node modules testable, allowing for dependency spying/stubbing/mocking without the need to ...
1
vote
1answer
141 views

Is there any value in using a Promises library versus ES6 Promises?

I see a lot of NodeJS articles recommending the Bluebird library for promisifying your code and avoiding callback spaghetti. Is there any value in using such a library when using Node 4.2.4+ given ...
1
vote
0answers
33 views

Feedback on simple authorisation system design

I'm writing a fairly simple authentication/authorisation api for an intranet application we are developing. It's my first roles based authorisation system and its a good opportunity for a first ...
0
votes
0answers
59 views

Best practices for adding Node.JS build features to a non-Node project

The primary use for Node.JS is of course as a full server stack, and I've used it in that manner to great success. However, a number of useful, interesting NPM packages deal with things like ...
0
votes
2answers
182 views

node.js C++ addons to do all major computations [closed]

A major limitation of node.js is its single threaded execution and the fact that JS is slow with computations. What are the advantages/drawbacks of using C++ to do the application's heavy lifting ...
2
votes
1answer
257 views

How to structure big Node.JS modules

I am working on a rather big Node.JS project with several thousand lines of code. It's not a homepage, but acts more like a configurable general purpose application server. As such it brings some ...
1
vote
1answer
89 views

How to handle file uploads express (UUID / location)

I am building a community website with a NodeJS express backend and a mysql database. Now I am up to the point where I want to store profile pictures of users and pictures related to specfic ...
0
votes
1answer
194 views

Confusion over Node as a “script” vs Node as a “server”

As I was beginning to tool around a bit with node, I was told that I needed to undergo a little bit of a paradigm shift since I was coming from a PHP background. I would ask questions like, "I have my ...
0
votes
1answer
101 views

When to use “is a” or “has a”? [closed]

In my node.js application, I have a queue class which has push and pop methods and a data property. I have an Event class which handles an event and pushes it on to the queue. If I think object ...
1
vote
1answer
139 views

Amazon Echo Development on LAN

I have followed the tutorial from Amazon to get started with the Echo. I made a skill and setup an application server on their AWS Lambda for basic testing. I have a few questions about the Echo, ...
0
votes
1answer
151 views

Handling multiple asynchronous events - Wait for pending offers to process on new offer?

I have a programming problem, that I don't know how to solve. And while I have provided a sample of my code, I am interested in a conceptual answer on how to resolve this problem. On a tradeOffers ...
4
votes
1answer
153 views

Filtering request and responses in RESTful MEAN stack

I have a very basic RESTful service written using the MEAN stack (MongoDb, Express.js, Angular.js, Node.js) and utilizing the Mongoose ODM. Product schema var productSchema = new mongoose.Schema({ ...
0
votes
0answers
83 views

AngularJS and NodeJS required version

I am new to the world of Javascript and their frameworks, and I feel a bit lost with this. I am trying to follow the official toutorial of AngularJS. In one of the first sections, it reads Install ...
2
votes
1answer
108 views

Why does Node not support several event loops in one Process?

As the title says, why does Node not support several event loops in one Process? The idea, is that node spawns a user decided number of threads, which each have an event loop. When a new callback is ...
4
votes
2answers
388 views

Methods of separating front and back-end with full stack javascript?

Suppose I have a front-end which is mostly a single-page application written using angular, grunt, and bower. And suppose I have a backend, which is mostly just a REST API sitting on top of an ORM, ...
2
votes
1answer
88 views

Social auth from mobile app connected to API server

I have a Node.js server using PassportJS that uses social login via Google, Facebook, and Twitter. The Node.js server hosts an API that uses the PassportJS middleware to authenticate routes and ...
6
votes
2answers
229 views

Advice for designing API request rate limiter?

I'm in the planning stages of a web application that makes heavy use of data retrieved from a third party's REST API. This data is cached on the server and requested by clients via AJAX. The REST API ...
-2
votes
1answer
113 views

About Node serving dynamic pages

I am doing a tech test for a job (Web Development) and in the test I need to get data from an API and there is this conditions for the server: Focus on client-side (AngularJS) nodeJS The server must ...
3
votes
1answer
256 views

Best practice for Restful API that perform heavy calculations (Image Processing)

We are currently developing an image processing restful api. Server performs some CPU-heavy computations image processing upon request and return the image to the client. We want to make this a ...
2
votes
0answers
87 views

Upload, convert, and store multiple different product data feeds into a database

I'm not sure if this right location for this question, but here it is. I currently have about 30 different CSV or TXT product data feeds. I am trying to build a tool to 1) upload each feed 2) ...
0
votes
1answer
113 views

expressjs: is it bad practice to use req.hostname for querying a db?

I'm building a nodejs app I would like to make available under various settings by my customers. I want my customers to build their websites on top of my app, so: - the app can be configured in a way ...
0
votes
0answers
46 views

how to create messaging storage structure in redis?

I am developing Node.js, Redis based chat application in php. I had an idea about chat logger structure but I required suggestions that how and what to choose proper data structure to create Redis ...
0
votes
0answers
13 views

Proxied server requests + forwarding authentication info in a secure fashion

We are using PassportJS with a couple of Node.js servers - but we have some questions about how to use Passport with "proxy" requests. My main question is how do we (and should we at all) forward the ...
2
votes
2answers
123 views

Is node.js for algorithmic problems like TSP or graph coloring or exact cover problem a good decision?

I read on node.js's official site that Node.js is a JavaScript run time built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O mode and highly scalable for network ...
2
votes
3answers
412 views

Are colons ok in a REST API?

I see many REST API examples with URIs like http://<whatever>/widgets or http://<whatever>/widget/123, for a specific thing. For most things I would just stick with the front slash, but ...
0
votes
0answers
58 views

Persisting and manipulating JS ArrayBuffer data on the server

My node.js app has to deal with (sometimes large; a few MB) tables of numerical data. I'm about to use JavaScript's native binary objects for this purpose (i.e. ArrayBuffer and friends), because ...
-1
votes
1answer
136 views

Synchronous architecture with asynchronous repository

In order to keep clean architecture of my node.js microservice I have controllers, services and e.g. repositories. I want a synchronous data flow: controller -> service -> repository -> service -> ...
1
vote
0answers
57 views

Is it OK to use mongodb's query object format as a parameter for my api?

I am designing an api that can give developers read-only access to a large dataset. The data is stored in a mongodb database. All the results of the api, will basically either be a count of matches ...
1
vote
1answer
215 views

killing / SIGTERM for Node.js child_process

With regard to a child process in Node.js that is created like so: var cp = require('child_process'); var n = cp.fork('child.js'); When forking a child_process with Node.js is it proper to kill the ...
7
votes
5answers
611 views

How do I balance 100 clients checking the same database table in a loop?

What I have This is a prototype. I have a pool of 100 clients connected to the server via websockets reporting things and awaiting for commands. The server polls the commands database table of type ...