SyncPad Node.js Server Revisited
blog.mysyncpad.com
blog.mysyncpad.com
I'm using JSON parsing but not much else. No dependencies / libraries at all. Are there any steps I can take to provide useful data? Would anyone like me to run it with --prof and hammer it with 'ab' for example?
Here's the code: http://github.com/gcr/goggles
Any theories?
UPDATE: I should also mention, if you look at the charts, there's a point in time which the CPU hits 99%-100% and it's always reproducible. Once the CPU hits 100% I have just sat back and watched the memory get chewed up.
I'm sure someone w/ more experience than me can probably debug what's going on. The code is there, I really hope someone else can take a look at it. As my friend mentioned, it's reproducible, it can be fixed.
The way that SyncPad was prototyped was using PHP/MySQL. I ported that to using Mochiweb. I manage all of the queuing of messages through a relatively straight forward OTP gen_server and Redis.
Deleted comment
That sounds more confrontational than I meant it to, point if you just guess at improvements without testing them, it is still a guess.
I just meant that without the numbers its an guess, educated are otherwise, and we all know how many assumptions we make that end up being wrong when they are implemented.
I'd bet on Node.js and similar efforts for the future, but Erlang is a pretty nice system and well worth looking at and learning from.
However, I can't figure out how to run this. I have your toyserver.js (and redis) running, and I have client.html making requests to the server, but the server always returns an empty response. My redis db is empty, is there something I need to do to populate it?