views:

41

answers:

1

I'm trying to take up node.js for a comet-based program. Essentially I'm going to have information coming in from either an SQL database or a XML feed, but the end result needs to be the same. I'm confused upon the implementation and here's my road blocks, help would be greatly appreciated.

  1. Streaming - I've been able to build simple mock ups, like a while loop that writes the current timestamp. The problem I've had with this is that it seems to only make it to the client after a lot of information is written. I'm aware of buffers but unsure how to bypass them. The main reason for this is that the finished project is going to be sending JSON objects, so I don't know that those would make it past the required buffer.

  2. Replace or compliment APACHE - I'm not 100% sure if Node.js is meant to replace APACHE entirely, which is what I spent most of today trying to figure out. I've been looking at a module called connect but I can't get my head around it and all the tutorials seem to basically follow the "Here's an extremely basic example, now off you go" way of describing things.

+1  A: 
  1. You can flush the buffer manually. Method in there for doing it.
  2. Read my answer to your other question. It should clear things up with relation to Apache.
Zac Bowling