I am getting myself a bit confused about how to go about this. My plan is to use PHP to perform the final page construction and this PHP web app will contact multiple services, which i will also to develop, for the data. Lets say one of those services was done in Java. I would define a Java interface which was implemented by a concrete class. This is where I get confused – how does Thrift link the PHP web app with the java service or am I getting totally mixed up??
Thanks
Thrift is based on the use of an IDL (Interface Definition Language). Using the definition from Wikipedia:
An example on how to use the Thrift interface language is available in the Thrift tutorial.
By the use of a
.thriftfile, you’re suppose to define the interfaces you need (in terms of types and services). For example, in your .thrift file, you could define a simple function like:that represents a function to sum two integers.
When you’re ready with your
.thriftfile, you can generate the Java, PHP, Erlang, whatever code that you need (server-side or client-side), using the Thrift generator.Refer to the Thrift wiki for more information.