Using Thrift with PHP and Java

I am a little confused about how to do this. My plan is to use PHP to execute the final page, and this PHP web application will contact several services, which I will also develop for the data. Suppose one of these services was run in Java. I would define a Java interface that was implemented by a particular class. This is where I got confused - how does Thrift associate a PHP web application with a java service, or am I completely confused?

thank

+3
source share
2 answers

Thrift is based on the use of IDL (Interface Definition Language). Using the definition from Wikipedia:

( , ), IDL , , . IDL , , - , , ++ , Java.

Thrift .

.thrift, ( ). , .thrift , :

i32 add(1:i32 num1, 2:i32 num2)

.

.thrift, Java, PHP, Erlang, , ( ), Thrift.

. Thrift wiki.

+6

Thrift PHP/Java bridge http://php-java-bridge.sourceforge.net/pjb/. , Thrift, , , php/java bridge.

+1

Source: https://habr.com/ru/post/1739788/


All Articles