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

learn more… | top users | synonyms (1)

-1
votes
0answers
23 views

Unable to retrieve facts in a loop in nools

I am trying to retrieve facts in a for loop, coz Im sending differenct array objects to the rules, but when I retrieve, only the first object sent to the engine is retrieve. I dont know why. Here is ...
1
vote
0answers
15 views

Forking New Consumers for RabbitMQ in NodeJS

So I'm implementing work queue with RabbitMQ in NodeJS. The consumer is a child process and I plan to fork new ones as need arises, but I read in the official documentation that : Because of the ...
-2
votes
0answers
68 views

Practicing Thought driven development [on hold]

How to proceed programming in new language and in a completely different paradigm, how to understand the underlying architecture? one thought process would be to completely avoid it and on the other ...
0
votes
0answers
12 views

How do I implement Socket.io Leaderboard using AWS Dynamo DB cost-effectively?

Every time a user submits a score, Socket.IO causes all the users get their leaderboard updated. This causes every single user connected through Socket.IO to read from the Dynamo DB database (every ...
2
votes
0answers
52 views

How to scale a slackbot app

I'm building an app for slack. While I've completed the POC, and everything works well for a single instance of the app, I'm having an issue of wrapping my mind around the scaling of it. The specific ...
-2
votes
0answers
23 views

Is it possible to install and run node Js via script?

I'm concern on how client's who purchases my app written in node Js would be able to install it on their server thus run it? Instead of offering them a service to install via npm, I would prefer if ...
-1
votes
0answers
33 views

How to handle projects depending on each other with Node.js?

I'm a .NET developer and I'm used to the idea of spliting a solution in a bunch of projects which holds references to each other. So usually I create projects like MyApp.Domain, MyApp.Data, MyApp....
0
votes
1answer
78 views

Understanding streams

I have started learning streaming APIs and I found one of the good documentations here. There was a comparison given by author to demonstrate the effectiveness of the streams. var http = require('...
0
votes
0answers
40 views

coming from java to nodejs whats the convention for error handling logging? e.message or e.stack?

I come from java, when I got an expected error I printed stack traces. I'm coming now to work on nodejs (never really worked on javascript). and in the nodejs project which I need to maintain (...
1
vote
1answer
68 views

Software architecture for uploading dynamically created websites

I have a question that is crucial for my end of year project. Background My web application allows users to build other webapps based on drag&drop (within the domain of the webapp). These ...
0
votes
1answer
44 views

Web app with a Node.js front end interefacing with a python script with sockets

Right now I have a webpage with various buttons and options that I'd like to use to send commands to a python script running on the webserver. The python script is being used to interface with devices ...
-2
votes
0answers
23 views

Redis connection failing [migrated]

So I have node app docker containers running, and they run fine, but I noticed over the course of 1-2 months all of my apps begun having errors with redis, seems like the connection is not making it / ...
0
votes
1answer
219 views

Recently moved from java to javascript on nodejs, how to maintain code? Help!

I recently moved from java to javascript on nodejs. I was very excited, opened up my intellji IDE for an existing nodejs project only to find I cannot know what the parameters I see functions ...
1
vote
1answer
87 views

How to decouple backend app?

I have heard this term many times, and it makes sense in theory. That app is doing many things and it'd be easier to manage, scale, test and improve them if they are not completely connected to each ...
0
votes
1answer
102 views

Node.js requests VS PHP requests

I've written in PHP before and when a user connected they get an individual instance of the code which is then closed when the code has finished executing. In node, I set up my first server to ...
1
vote
2answers
37 views

Update semver minor version on test updates?

I always try to adhere the semver spec when I commit changes. This time though I was wondering what to do when I update my tests: I'm working on an API client that includes a simplified API server ...
-1
votes
0answers
40 views

What to do to during unit testing [duplicate]

I have trouble understanding what to do when unit testing. All over the web I find tutorial for how to use unit testing but it is always just tutorials about how the unit testing tools are working but ...
0
votes
0answers
68 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
1answer
46 views

Web App Authentication's Architecture Related Query

I have a web app that makes use of node.js in the backend and angulajs on the front end. Let's say I have a user who has the ability to login via multiple systems; I must allow multiple logins. I ...
0
votes
0answers
48 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
40 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
75 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
69 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 = zmq.socket(...
0
votes
1answer
37 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
76 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
279 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
137 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
7k 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
96 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
167 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 environment,...
0
votes
1answer
63 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
175 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 express:...
2
votes
1answer
92 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
134 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
90 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
53 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
82 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
267 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
252 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
181 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
34 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
70 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
243 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
315 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
122 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 questions....
0
votes
1answer
206 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
103 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
192 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
197 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
168 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({ ...