|
|
||
Jean-Francois Arcand's Blog
«Extending the Grizzly HTTP Runtime part III: Gathering Monster's Statistics |
Main
| Grizzly news: New lead, New committers, New Tutorials and a Growing Community »
Extending the Grizzly HTTP Runtime part IV: Adding native PHP with support for the Bayeux ProtocolPosted by jfarcand on July 17, 2008 at 12:19 PM | Comments (2)Before I deep dive into the AsyncFilter API I've proposed in part 3, I've decided to show how easy is to add...PHP to your Grizzly based application with support for the Bayeux protocol. In part one, two and three, I have showed how easy is to embed the Grizzly Http Runtime and add JMX and Monitoring support. This time I would like to add PHP to the picture. Yes, PHP! A couple of months ago, my friend Kin-Man blogged about running native PHP using the jsr223 Servlet. The PHP Servlet used in Kin-Man's blog uses jsr223 scripting API and JNI to communicate with a native PHP runtime. That's a really good Servlet to serve directly from Grizzly. How, by just doing the following: That's it. One thing you must make sure is to set the -Djava.library.path to point to your native PHP installation libs directory. Example: will works, assuming you have added the required jars Kin-Man talks about inside the original grizzly-servlet bundle. Now let's add the Comet based Bayeux protocol to the picture. This is also quite simple: That's it! You have now a WebServer that supports PHP and the Bayeux protocol, where some requests are dispatched to PHP, and some to the Bayeux implementation. You can also bridge and push data from your PHP application to the Bayeux runtime using the PHP SAPI and by following Shing Wai's blog on Java API to Bayeux we offer in Grizzly. Coucourouquuiquui! Since it's vacation time, post your questions to users@grizzly.dev.java.net to be sure you get a response :-)
technorati: grizzly web server embedded php Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|