A few years ago, I would have used Scheme without asking. Now, I would definitely choose Erlang. Why?
- Syntax. Even if I prefer the Scheme/Lisp syntax for its simplicity and regularity, the Erlang syntax is not that bad and can be easier to grasp for non-Schemers. If your prototype becomes the basis for a new product or internal project (this should not be, but you know how things work in the industry ;-), Erlang may be easier to sell to other developers because of this.
- Proven platform. Erlang/OTP has been used in a number of large-scale commercial applications and systems. Can you say the same for Gambit-C? Where are the success stories? When selling your project to management, this argument will certainly hit you.
- Commercial support. Erlang/OTP is supported by a team of developers at Ericsson. Gambit-C, although a great piece of software, is the work of a single person. And Marc Feeley is a pretty busy guy. Also, several companies have developed commercial products in Erlang (Nortel, Process One, LShift, to name a few), or provide consulting services in Erlang (like Erlang Consulting).
- SMP support. Gambit-C does not support SMP. This may not be a show-stopper (simply start as many Gambit-C processes as there are cores on your machine). But intra-process communication is way more efficient.
- Mnesia. When you need to add a database to your application, this is a no-brainer in Erlang. Just use Mnesia (unless you have some very specific constraints that Mnesia cannot match). With Gambit-C, you'll need an external RDBMS (like MySQL or PostsgreSQL), and a good library to interface with the database. Using the FFI to integrate the C API of your favorite RDBMS is a no-no! If your code is multi-threaded, all your threads will be blocked during a call to the C API. You don't want this. So you'll need a library that implements the native protocol. That's a lot of work, because you'll want it to be robust and efficient.
- SSH. Erlang comes with a complete SSH server and client. This means you can access your remote Erlang process with SSH and continue to benefit from the REPL.
- OTP. Although I'm still not an OTP expert (I just barely scratched its surface), much of the power of the Erlang platform for the development of reliable, robust distributed applications comes from OTP. Much of it can certainly be implemented in Gambit-C, given enough time and effort, but not everything. Some of its features (like hot code reloading) are built into the runtime system and cannot be easily emulated.
- Yaws. Building a new web app or web service with Yaws is really simply. It is REALLY robust and efficient. With Gambit-C, you have two choices: implement both an HTTP server and an application server yourself, or interface Gambit-C with Apache/mod_lisp. The first option represents a lot of work and requires a lot of expertise to get it right. The second option is a lot easier to implement, but at the expense of administrating another piece in you puzzle.
Your mileage may vary, of course. Feel free to disagree!




8 comments:
I have to agree with this assessment right now. And Erlang/OTP is not a bad system at all.
In the long run I'd really like to see Gambit/Termite take on more of these capabilities. Scheme is just a more satisfying foundation for all the rest.
You're right. I also prefer Scheme to Erlang. But Gambit/Termite can compete with Erlang only if it is backed by a more organized/focused group of people, not one or two individuals, IMO.
Yeah, it's going to take some time and hopefully good publicity. I am encouraged that Gambit is still around after more than 15 years!
And with the recent addition of the wiki, etc. more people may take an interest in the implementation itself. I have not until now, but would like to become more familiar with the internals.
So we have to keep up blogging on Gambit and Termite! ;-)
hello, i am living proof of interest. i had turned away from scheme for years, but seductive termite whispers brought me back. cheers.
I would be delighted if there were as many libraries for Gambit / Termite as there are for Erlang.
Now you can have your erlang cake and eat your scheme/lisp too with erlang lfe http://github.com/rvirding/lfe/tree/master
Hi Dominique,
As a slight update to the situation, we now have the fantastic Black Hole module system for Gambit that includes both a continuations web server and a web client that addresses your point 8. Also I have recently released a pure Scheme mySQL interface for Gambit that addresses point 5.
So whilst it may not be Erlang yet - it's edging in the right direction.
Post a Comment