Search code examples
c++pythonarchitecturethrift

migrating business logic to services: alternatives to Thrift


I am building an application, which has an application based front-end in C++/Qt and a web based front-end in Python (using Django) framework. I'm trying to migrate the architecture to services-based, as both these front-ends have business logic embedded in them, which makes it hard to maintain.

I'm thinking of choosing Thrift to write the RPC services, which can be consumed by the other modules in the system and Python code. However, as it seems, Thrift does not work well with Windows, so I'm left with the option of converting the Thrift output to some C++ structures, which theen need to be serialized/de-serialized again, so that the services can be consumed by Qt/C++. Python code can consume these Thrift services easily.

In this process, I need to convert/serialize the structure, first according to the Thrift IDL and then some custom code. Any suggestions to change the architecture, so as to

  • keep it simple
  • works with multiple languages
  • quick to implement?

Solution

  • you could consider:

    • already mentioned CORBA solution: built in marshaling, compact binary protocol
    • REST http and based json server: simple, a bit chatty on the network, you need to serialize your data to json
    • AMQP messaging + json or some other serializer: you need to serialize your data to json or something else like google protocol buffers, plus is that scaling if you need more servers will be simpler.