News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Henri Bergius' Blog:
DNode Make PHP And Node.Js Talk To Each Other
October 31, 2011 @ 09:50:05

Henri Bergius has a new post to his blog today sharing details about a messaging protocol that can help PHP and Node.js play together nicely - DNode.

Both environments have their strong points. Node.js is very fast and flexible, but PHP has a lot more mature tools and libraries available. So in a lot of projects it is hard to choose between the two. But now you might not have to. DNode is a remote method invocation protocol originally written for Node.js, as the name probably tells. But as the protocol itself is quite simple, just sending newline-terminated JSON packets over TCP connections, implementations have started popping up in other languages. You can talk DNode in Ruby, Perl, Python, Java, and now PHP.

He includes a quick example of both sides of the messaging - a simple server on the Node.js side that looks for a DNode request and using the dnode PHP client to connect to it (and return the input number multiplied by 100). He also includes a method that allows for bidirectional communication with a service that converts from Celsius to Fahrenheit.

0 comments voice your opinion now!
dnode nodejs communication bidirectional dnodephp


blog comments powered by Disqus

Similar Posts

Engine Yard: Improving Your Local Tech Group

Court Ewing's Blog: Follow-up: How PHP is Broken and How It Can Be Fixed

Phil Sturgeon: Benchmarking Codswallop: NodeJS v PHP

Henri Bergius' Blog: DNode: Make PHP And Node.Js Talk To Each Other

ThinkPHP Blog: Comet in conjunction with a PHP socket server - server-client communication


Community Events





Don't see your event here?
Let us know!


package introduction laravel library framework community symfony zendserver podcast install language api interview deployment list release update series opinion tips

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework