Besides having the ability to provide a high level and a more developer friendly API, making a scripting language binding to an existing C library could make the testing of the library a less painful process. Initially I was under the impression that exposing low level C functions to the scripting language will make it flexible so that you could build a high level module in that scripting language encapsulating those low level functions. True. But the big downside when you have, say, 3 different language bindings for your C library all exposing low level functions is, a) you need to spend a lot of time writing the module in the respective scripting language b) too much overhead when it comes to debugging. If you find a subtle bug which you have overlooked in the Ruby binding, now you need to change the same thing on your Python and Perl bindings as well.
This was a real issue that we came across developing the Ruby and Perl bindings for the WSF/C framework. Also having the Python binding in sight. We use SWIG to generate language bindings. Having learned the price you have to pay exposing the lowest level functions, I’m gonna look into refactoring the existing code limiting the stuff that’s exposed to the scripting language to a minimum. So, code that goes into the module which need to be written in the respective scripting language is very small.
At the end of the day it’s about making you feel sooo comfortable when you program in your favourite scripting language, exposing your services with the doublew ess death star goodness with a few lines which will call the C library for maximum performance which will then give the result back to your favourite scripting language scripting language. It’s a deadly game out there
Yes, you can breathe now.
Posted in perl, python, ruby, swig, webservices · January 3rd, 2008 · Comments (3)
I’m very interested in using the perl binding however we must be able to provide and consume services and we must be able to support ws-security and probably all the other ws-i specifications eventually.
Is there an estimated completion date when the perl binding will support providing web services?
Which of the ws-i specifations will be supported?
Jay,
Consuming services with the Perl binding is nearly complete. This has support for WS-Security, WS-Policy, MTOM and WS-RM. I’ll commit the code within this week. For writing services, we’ve figured out all the nitty gritty stuff when we wrote the Ruby binding, for example getting raw post data. Initially tried getting raw post data at the C level but this proved to be troublesome so we got it at the Ruby level. Likewise, providing services with Perl would be something similar, I’ll try to get a timeline of that for you.
How is that coming along? Been looking daily for an updated version of the perl stuff. We are very much looking forward to using it too.