Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and Yahoo
bostinnovation.com
bostinnovation.com
Well at least he's honest, but this seems like an exceedingly bad reason to choose a technology stack.
That sounds like a good reason to me.
It depends on the context. If it's a developer's side project, why not? If it's a businessperson's project that you are under contract to build, then yes, it's a bad reason.
No it doesn't. If you see the promise and potential value of a new technology that solves a problem, you jumping aboard to play could mean the difference between a problem being solved or not.
A lot of very powerful influential projects were started by people who wanted their end users to "play" with their technology.
Additionally, you can exploit the python paradox to get amazing developers.
It's good to see these Django guys having to use questionable tactics to challenge node.js.
I sat in on his speech "Why Django Sucks, and How We Can Fix It" at Djangocon last year:
http://djangocon.blip.tv/file/4112452/
And he gave a lot of tough love to Django in front of most of the establishment and people who are hardcore Djangonauts.
Speaking of questionable tactics, why create a HN account just for the express purpose of attacking him?
All IPC goes through a single (per machine) routing server which handles routing messages to the various node.js processes, which may or may not be on the same physical server. Only communications are for objects around the edges of the squares, for collision detection etc. and for transferring websocket connections to another node.js process.
After a lot of thought, that seems to me to be the best way to work out a scalable solution. Have yet to see if it'll work well, but I see no reason why it shouldn't. Now if only I had enough users to test it..
Oh, and thanks for the great 0MQ library! :)
I wrote a tiny little script to test the max number of concurrent connections.
https://github.com/JustinTulloss/zeromq.node/blob/master/exa...
On my OS X machine it fails at 893 open connections. I compiled zeromq to have max_sockets = 5000 (zeromq2/src/config.hpp)
The error is:
s_849.send(msg); Too many open files rc == 0 (mailbox.cpp:374) Abort trap
What am I doing wrong? Should I just have one connection to zeromq and have all my async callbacks use it? I have a comment below that describes what I am trying to build. Thanks!
It will give you event passing across machines in a really concise way.
require session,models,template
function main(request,response){
session.start()
data = models.getEntries()
html = template.render('blog',data)
response.write(html)
}
Can not be simpler, hide all complexities from the coder so he can concentrate on building apps, not fighting with code. var app = express.Application(); // let me create apps, not servers
app.get('/', app.do('index',req,res));
app.run(); // set port in config.js
I'll keep an eye on express.(I'm not a CS guy, I just wanted to finish a digital art project involving buses and geolocation).
data = models.getEntries()
html = template.render('blog',data)
I may be wrong, but these two lines has to be blockingSorry for pointing the obvious;
var session = require('session'),
models = require('models'),
template = require('template');
function main(request,response){
session.start(
models.getEntries.bind(models,
template.render.bind(template, 'blog',
response.write.bind(response))));
}
would be easy to put together with node.js; it's functionally equivalent to the above (though it assumes that data comes into the template.render call as the last argument(s)), and neatly avoids too much nesting.Ryan was developing Node for certain use cases. He chose the name "Node" because it was supposed to be a small piece of a larger web app. A few nested callbacks, programs that have a few hundred lines of code and don't have complex control flows work well. Hype created a large community which is pushing beyond such narrow goals. But it will take time to come up with good DSLs or add continuations to V8. For now the best solution is to learn how to organize async code, for which I've only seen one trivial example.
It's extremely useful for the "evented" part, but I get the sensation of using node for hosting webpages might be overkill and not the appropriate tool. Instead, I've got the node.js core proxied behind an nginx server hosting static files and ruby rack (for when dynamic content is necessary).
Does anyone see an advantage of using Node to host templated webpages?
162k searches and counting :)
But seriously, good fast search.
Since a large portion of our solution is sitting on the browser in extensions, it would be nice to reduce our language footprint by one. If it were a year later, I have no doubt I would.
Any tips on how I should go about doing this? I would like some type of solution that could scale if I put a load balancer in front of it. I have been thinking about using some type of PubSub queue, maybe zeromq, maybe a XMPP server.
One of the queuing libraries might just work out of the box, though. But at least at the moment I would actually consider Node.js counterindicated for this task, unless you can be rigidly sure that messages never have to cross process boundaries.
Open a few tabs of erlang.org/doc/, grab a book (Joe Armstrong's Pragmatic book is a good one) and get started.
You'll be surprised how easily you made your first Erlang production system. (If this makes you feel guilty and you need to self-flagellate afterwards you can try packaging your app into a release.)
Personally, I like the idea of asynchronous IO for writing server applications but I would probably go with a slightly more robust language (for me it would be Haskell).