News Feed
Jobs Feed
Sections




News Archive
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

PHPBuilder.com: AJAX and PHP Part 2 - XML Communication/Processing

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

Smashing Magazine: Why Coding Style Matters

Gonzalo Ayuso's Blog: Real time monitoring PHP applications with websockets and node.js

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


Community Events











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


community series application zendframework2 development introduction example unittest phpunit conference interview language opinion podcast tool code framework testing release functional

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