开发者

HSQL, In-memory databases, Java and PHP question

开发者 https://www.devze.com 2022-12-19 00:03 出处:网络
I\'m investigating options to create a database cache using HSQLDB in an in-memory mode. The idea is that the cache will be queried from a PHP application and the query will be passed to a Java applic

I'm investigating options to create a database cache using HSQLDB in an in-memory mode. The idea is that the cache will be queried from a PHP application and the query will be passed to a Java application that runs the HSQLDB database.

Now, I've been thinking this through and I can't see any efficient way to pass the data from Java back to the PHP app. I know XML is an option, and so is JSON but i'm not sure if the additonal processing will be an overhead? Ideally I just want to pass an array of data back from the java to the php like what you would get with mysql_fetch_array or something.

I know it seems like a weird question, and probably seems completely illogical but i'm just exploring this option so pleas开发者_StackOverflowe bare this in mind!


Two possibilities are Facebook's thrift and Google's protocol buffers. Thirft is probably a better choice for you since support for PHP in protocol buffers is fairly limited.


There is also Hessian (http://hessian.caucho.com/) If performance is what you are after I think Hessian is at or near the top - though the binary mode in Thrift is no slouch.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号