views:

115

answers:

2

I am working on a relatively big system with:

  1. low level C++/C codes dealing with multimedia data(video/audio)
  2. a lightweight database, preferably MySQL but I am open to other better alternatives
  3. RESTful web service as the front end

All the requests will be handled by RESTful interface, low level C++/C codes dealing with the real hard work(analysis/processing) and the database is used for some intermediate results for future reuse.

In this case, what programming language will best fit the job?

Something I have thought about:

  1. Java: Restlet is fairly easy to use, it works well with MySQL, however its interface to C/C++ using JNI is kind of obsolete now. JNA is better updated, but it does not support mapping of c++ classes, so the integration could be awkward.

  2. Net: the system is for Linux OS, so rules out .Net

  3. Python: can work with C/C++ using ctypes/SWIG, work with MySQL, and has its own Python DB. RESTful interface can be implemented using CherryPy etc. I am not that familiar with Python, and that also means my team need to learn Python, too.

  4. others? Perl? Ruby? etc...

A: 

You're going to get a different answer from every programming language fan out there.

But I would suggest ruby/rails:

  • Easy to build/route a RESTful interface
  • ActiveResource handles consumption of web services
  • You can call out to C code using ruby extensions easily
  • ActiveRecord or DataMapper nicely abstract the mysql database
mopoke
if the OP can justify the use of C/C++ than I would STRONGLY suggest not mixing C/C++ with an execution environment -- in this case ruby. ruby is fine in the front-end. This is based on the assumption that the OP is doing some serious stuff with C++ and not just generating web-pages.
Hassan Syed
May I ask what's OP?...
Lily
OP = original poster.
mopoke
@Hassan, i'd say it really depends on the use-case, the question is just missing information.
Georg Fritzsche
A: 

If you like dynamic languages, Ruby is a nice choice for the Web (service) part. I would suggest to not use Rails for this particular purpose, unless you need to build a Web UI for some logic that uses your MySQL DB; rather, go with something more lightweight like Sinatra.

Stefan Tilkov