node.js

Seeking through a streamed MP3 file with HTML5 <audio> tag

Hopefully someone can help me out with this. I'm playing around with a node.js server that streams audio to a client, and I want to create an HTML5 player. Right now, I'm streaming the code from node using chunked encoding, and if you go directly to the URL, it works great. What I'd like to do is embed this using the HTML5 <audio> tag,...

Recommendation for integrating nodejs with php application

I have an existing app written in PHP (using Kohana framework) and I want to do long polling. From some things I read it seems that doing long polling with PHP is not advisable and using something like nodejs is a better choice. My question is what's the best way to integrate nodejs (or some other well suited tool for long polling) with ...

How do I implement real time front end updates using node.js + Ruby on Rails?

What is the best way to implement real time updates in ruby on rails using node.js? It would be great to hear either real examples or your thoughts on alternative solutions. ...

Is it possible in .NET, using C#, to achieve event based asynchronous pattern without multithreading?

I am amazed by the architectural design of node.js and was wondering if C# is capable of such design: Asynchronous, event based / event loop, non-blocking IO without multithreading. ...

Node.js and wss://

I'm looking to start using javascript on the server, most likely with node.js, as well as use websockets to communicate with clients. However, there doesn't seem to be a lot of information about encrypted websocket communication using TLS and the wss:// handler. In fact the only server that I've seen explicitly support wss:// is Kaazing....

Javascript ajax GET call does not include cookie-sid on initial page load.

In my application, when /iframe is requested, I create a cookie and serve the iframe.html file. In the html file I use a Javascript Ajax call to request for user data (/user), which is called on $(document).ready and needs to pass the sid from the cookie (so I know the call is authenticated). The problem is that, the cookie-sid is not p...

Channels in Socket.io

Hi, I am trying to broadcast a message through the Node.js service socket.io (http://socket.io/) to certain subset of all subscribers. To be more exact, I would like to use channels that users can subscribe to, in order to efficiently push messages to a couple hundred people at the same time. I'm not really sure if addEvent('channel_nam...

how do i create a non-blocking asynchronous function in node.js?

How do I create a non-blocking asynchronous function? Below is what I'm trying to achieve but my program is still blocking... var sys = require("sys"); function doSomething() { sys.puts("why does this block?"); while(true); } setTimeout(doSomething,0); setTimeout(doSomething,0); setTimeout(doSomething,0); sys.puts("main"); ...

How do i close a socket after a timeout in node.js?

I'm trying to close a socket after a connection times out after 1000ms. I am able to set a timeout that gets triggered after a 1000ms but I can't seem to destroy the socket... any ideas? var connection = http.createClient(80, 'localhost'); var request = connection.request('GET', '/somefile.xml', {'host':'localhost'}); var start = new Da...

Uncatchable errors in node.js

So I'm trying to write a simple TCP socket server that broadcasts information to all connected clients. So when a user connects, they get added to the list of clients, and when the stream emits the close event, they get removed from the client list. This works well, except that sometimes I'm sending a message just as a user disconnects...

Node.js projects/tutorials?

Javascript/Ruby learner here, Is there any Node.js projects/tuts to follow besides creating a chat server? Thanks in advance! ...

How to create a streaming API with NodeJS

How would you go to create a streaming API with Node? just like the Twitter streaming API. What I want to do ultimately is get the first update from the FriendFeed api, and stream when a new one becomes available (if the id is different), and later on expose it as a web service so I can use it with WebSockets on my website :). So far I...

Add to language syntax in Netbeans/Eclipse

Hey, This may seem like seem like a bit of a weird/uncommon request but I am trying to find out if it is possible. I would like to add to the language syntax in Netbeans or Eclipse easily without needing to create an entirely new language. According to this question http://stackoverflow.com/questions/281992/how-to-add-more-syntax-elemen...

How to print a stack trace in NodeJS?

Does anyone know how to print a stack trace in nodejs? ...

Is node.js ready for production use?

Starting a new project. It's basically a blogging/commenting system. We're considering node.js as the back end server. Is node.js ready for this sort of thing or is it too early and experimental? We need HTTPS and gzip compression - perhaps a front end nginx server could provide this? What's missing from node.js that would make devel...

How can I edit on my server files without restarting nodejs when i want to see the changes?

I'm trying to setup my own nodejs server, but I'm having a problem. I can't figure out how to see my edited files without restarting nodejs. Is there a way to edit file live with nodejs? ...

What is the point/purpose of Ruby EventMachine, Python Twisted, or JavaScript Node.js?

I don't understand what problem these frameworks solve. Are they replacements for a HTTP server like Apache HTTPD, Tomcat, Mongrel, etc? Or are they more? Why might I use them... some real world examples? I've seen endless examples of chat rooms and broadcast services, but don't see how this is any different than, for instance, setti...

nodejs and database communication - how?

Hello. I've heard much good about nodejs and writting client-server application with it. But I can't get, for example, when developing IM client-server application, how nodejs server script is supposed to talk to database server to actually store it's data? Or may be I miss something and nodejs server scripts are not supposed to do that...

Is there a Thrift or Cassandra client for Node.js/JavaScript

I would like to start using Cassandra with a node.js deployment, but I can't find a Thrift or Cassandra client for Node.js and/or JavaScript. Is there one? Is there a simple means of generating Thrift connections? Update: The short answer to this question turns out to be no, there is no JS client for Thrift that is compatible with Ca...

Could someone give me an example of node.js application

Guys, I'm trying to understand the differences between some of the newer web programming frameworks that now exists, namely Node.js, Rails, and Sinatra. Could someone give me an example of applications that would work best on each of the frameworks? That is to say, what is an application that would be best suited for Node.js as oppose...