<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 15:07:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Henri Bergius' Blog: DNode: Make PHP And Node.Js Talk To Each Other]]></title>
      <guid>http://www.phpdeveloper.org/news/17060</guid>
      <link>http://www.phpdeveloper.org/news/17060</link>
      <description><![CDATA[<p>
<i>Henri Bergius</i> has a new post to his blog today sharing details about a messaging protocol that can help PHP and Node.js play together nicely - <a href="http://substack.net/posts/85e1bd/DNode-Asynchronous-Remote-Method-Invocation-for-Node-js-and-the-Browser">DNode</a>.
</p>
<blockquote>
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. <a href="http://substack.net/posts/85e1bd/DNode-Asynchronous-Remote-Method-Invocation-for-Node-js-and-the-Browser">DNode</a> is a remote method invocation protocol originally written for Node.js, as the name probably tells. But as <a href="https://github.com/substack/dnode-protocol#readme">the protocol</a> 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 <a href="https://github.com/substack/dnode-ruby">Ruby</a>, <a href="https://github.com/substack/dnode-perl">Perl</a>, <a href="https://github.com/jesusabdullah/dnode-python">Python</a>, <a href="https://github.com/aslakhellesoy/dnode-java">Java</a>, and now <a href="https://github.com/bergie/dnode-php">PHP</a>.
</blockquote>
<p>
He includes a <a href="http://bergie.iki.fi/blog/dnode-make_php_and_node-js_talk_to_each_other/">quick example</a> of both sides of the messaging - a simple server on the Node.js side that looks for a DNode request and using the <a href="https://github.com/bergie/dnode-php">dnode PHP client</a> 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.
</p>]]></description>
      <pubDate>Mon, 31 Oct 2011 09:50:05 -0500</pubDate>
    </item>
  </channel>
</rss>
