News Feed

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

Anthony Ferrara: Beyond Design Patterns

Jani Hartikainen's Blog: 5 ways how PHP is better than Node.js Something Like Threading- PHP Process Forking & Interprocess Communication

Henri Bergius' Blog: DNode: Make PHP And Node.Js Talk To Each Other AJAX and PHP Part 2 - XML Communication/Processing

Community Events

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

deployment development laravel zendserver list community bugfix series podcast interview language tips conference release symfony voicesoftheelephpant framework code introduction api

All content copyright, 2014 :: - Powered by the Solar PHP Framework