thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josh rotenberg <joshrotenb...@gmail.com>
Subject Re: typical thrift project layout
Date Thu, 06 Aug 2009 13:50:43 GMT
At some point I had a project template because I was creating a bunch
of small services with C++ servers and clients in python (and perl),
using autoconf and all set up with unit tests and everything. I'll
poke around and see if I can dig it out, might at least get you going.


Josh

On Thu, Aug 6, 2009 at 5:57 AM, Matthieu
Imbert<matthieu.imbert@ens-lyon.fr> wrote:
> Do some of you have some experiences and/or advices about the kind of
> layout and build procedure to choose for a project using thrift and
> involving multiple languages (at least 2).
>
> I currently work on a project written primarily in python (the server is
> in python), which is growing in size, and to which i am adding some
> example client codes in python and in other languages, currently only
> perl, but i expect to add client examples in java and c++ pretty soon.
>
> So until now, nearly every python or perl files where mixed in the root
> folder of the project and there was no real build or install scripts,
> only a shell script to regenerate the thrift stubs in various languages
> from my thrift service IDL. These language specific thrift stubs went in
> the usual directories gen-py, gen-perl, gen-java and so on, and any code
> relying on these stubs needs to manually import the modules (or whatever
> you call them in other languages than python) with code like (in python):
>
> import sys
> sys.path.append('gen-py')
> import [...]
>
> of course this works only if the source code is located exactly in the
> root directory of the project.
>
> But now, i would like to:
>
> - have a cleaner project directory layout
>
> - have a build system that ideally would be able to generate thrift
> stubs from the IDL, compile any code that needs compiling (eg. java or
> c++ clients), and package everything in a clean tar.gz
>
> - have a clean installation procedure, in order to be able to distribute
> the package to client with clear instructions on how to write client
> code, how to import/include thrift files in their code, how and where to
> install the generated stubs.
>
> i guess some of you already have some experiences with that, so what
> kind of layout do you choose, for the project and for the project files
> installation?
>
> regards,
>
> --
> Matthieu Imbert
>

Mime
View raw message