[prev] [up] [next]

Thrift IDL Support

Overview

The "stx:goodies/thrift" package implements the low level transport and RPC interface to comunicate with applications based on the thrift (apache.org) framework. This allows to perform RPC calls and communicate with applications like the Cassandra Database and others.

Documentation

see the README files in 'goodies/thrift'.
Use the source - Luke.

Release Notes

The original gen-st package as found in the apache repository contains a number of bugs and limitations, which have been fixed in this package. To fix these, the corresonding generator code (in c-plusplus) needs to be rewritten and also parameters/flags should be added to it to allow for different Smalltalk dialects to be supported.

As we do not like C++, a post-processor was written, which takes the original thrift output and rewrites the ST code to fit our needs.

Additional Protocol Support

The package has beed changed to allow for the transport to be specified in the client creation message. Also, a TFramedTransport was added, which is now the default. Support for the CompactProtocol is being developed but currently unfinished.

Usage Example

To generate the interface client from a "foo.thrift" IDL description, perform the following steps:
  1. load the thrift package into ST/X (i.e. "Smalltalk loadPackage:'stx:goodies/thrift'").
  2. download the thrift compiler (thrift.exe) from apache.org.
  3. execute "thrift.exe foo.thrift"
  4. fileIn the resulting st file ("gen-st/foo.st"). This should give you a class called "FooClient".
  5. in a workspace, execute the post-processor: "ThriftFixup fixupClass:FooClient"
  6. done

No Warranty

This goody is provided AS-IS without any warranty whatsoever.

Origin/Authors

Claus Gittinger


<info@exept.de>

Doc $Revision: 1.3 $