Node.js with BOA

Events happening in the community are now at Drupal community events on www.drupal.org.
markwk's picture

Has anyone gotten node.js to play nicely with BOA recently? I got this working about 6 months ago (BOA site with a separate node.js server connecting) but trying again now and seems to be some funky issue. I might be missing something small but as far as I can tell messages are not being sent to node.js OR they are being sent really slowly. There seems to be something catching on the server perhaps. Maybe I need to disable caching or something.

Just wanted to check if anyone else had any tips here. Thanks...

Comments

I haven't tried this, but I'd

obrienmd's picture

I haven't tried this, but I'd be very interested to have node.js provided as an install option on BOA. I know omega8cc said no on this a year or so back, but given node's popularity, perhaps it could be considered again? The Drupal nodejs module looks fantastic, and pretty easy to use.

disclaimer: I have never used node.js and don't know if there are major technical issues for not doing this.

I'm not sure I'd want the

markwk's picture

I'm not sure I'd want the actual node.js server on the BOA part. But it'd be nice to get something in place so BOA plays nicely with an external node.js server. Node.js is pretty easy to setup. Took maybe 20 minutes on a AWS EC2

Ease of use may be the barrier

Anonymous's picture

One of the things to consider with BOA is it's natural user base (at least from my perspective) is one that is not so much Linux platform savvy, but does not want to be limited in the way price versus performance versus scale...did I say price? Because its all about having a point and click and your done out of the box kick-butt Linux platform without having to learn all that cool Linux stuff that went into getting it there.

On the other hand, Node.js is still more of a developers only world and a bit of a mystery to how it would be managed in a somewhat self managed environment. I would love to see it integrated and just work out of the box so that we all could benefit from awesome real-time like blocks of information flying about. Keep us posted on anything that may happen with it.

Peace,
Michael Clendening

My opinion about adding

omega8cc's picture

My opinion about adding Node.js to BOA didn't change. The answer is still no, and the reasons are still the same. It is just one more (not so small) moving part with very limited user base and usefulness.

In my opinion it is better to fix Drupal problems with performance instead of hide them. Adding another engine is not something I want to see in the project funded on the idea: "make it simple and awesome for the non-sysadmin audience".

Sure, we use Redis to improve performance, so it is also kind of "hide the problem" approach, but integrated out of the box, so you don't even need to know it is there - no module to enable, nothing to configure etc.

While I don't plan to add it to BOA, I'm open to make BOA more Node.js friendly, and I encourage you to test it, debug and submit patches or at least post the issues in the queue.

Best,
Grace

Thanks for the details,

obrienmd's picture

Thanks for the details, Grace. I now have a good understanding of the reasoning. Perhaps I will experiment with node.js on another server (I'm interested in it for rich-client async stuff with socket.io), rather than to patch up Drupal performance holes...

Grace, thanks for info. I

markwk's picture

Grace, thanks for info. I ended up disabling both caching setups (ubercart/README.txt and cache/NO.txt) and it works fine now. I'd like to improve it so we can keep at least some of the caching and still have node.js play nicely. I guess I'll disable each of the caches and retest to see which is causing it to linger.

I totally agree about no node.js on BOA. Much too small of a user base to make it worth it anyways. Not really the point of this discussion anyways.

Anyways, for anybody that ends up on this post/discussion later looking for an answer to my original question: Yes, Node.js can be made to work with BOA. No, it's not particularly difficult to do.

Mark

omega8cc's picture

If you will find anything you think could be improved for better compatibility with Node.js, please open an issue. We don't use Node.js with BOA (yet) so we didn't test anything yet, while maybe there are some simple fixes we could add etc.

Could you provide a short

muschpusch's picture

Could you provide a short how-to?

This would be great!

energee's picture

(@ markwk) If you could provide some notes on how to set this up, that would be great, I would be highly interesting in testing node with some example projects on a BOA server.

community docs

muschpusch's picture

Hey, i try to push forward the community docs for boa It would be nice if someone could add this otherwise i will do it when i need it (appr 1-2 weeks)

AS NOTED: I'm not actually

markwk's picture

AS NOTED: I'm not actually using node.js ON the BOA side, just integrating it there the way the Drupal Node.js API does. So, here is the skinny version for that:

  1. create ec2 instance on AWS or setup a new server with a friendly OS like Ubuntu
  2. On separate OS install git, node.js and npm packages
  3. grab a copy of Drupal Node.js module, you only really need the server.js and nodejs.config.js files
  4. configure nodejs.config.js accordingly so it'll play friendly with your drupal site
  5. install Drupal 7 site
  6. download and enable node.js module on Drupal 7 site
  7. configure node.js setting to your separate OS so everyone is happy together.
  8. Test with a node.js notification or something or Drupal Chatroom

If it's not working, check your ports so that ports are open and you've configured it correctly.

That's about it... Took about 20 minutes or so and most of that was updating packages...

Perhaps @muschpusch can tell us how to do this inside of BOA. I plan to take a look into one of the various node.js hosts out there and see if I can this to work and I'll post the details for that too.

stupid question

technicalknockout's picture

what is BOA?
* nevermind - just saw the link in the previous comment, apologies

i just got the time to

muschpusch's picture

i just got the time to install node.js. It's pretty straightforward like installing it in any other machine. Anyways i added two link to the community docs:

http://groups.drupal.org/node/163784

node.js

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: