Showing posts with label Erlang. Show all posts
Showing posts with label Erlang. Show all posts

Thursday, February 22, 2007

Stackless Python vs Erlang


To follow up on my Erlang post, while I won't be attempting to use Erlang at work, I may well be interested in it outside employment venues. Right now I'm thinking about the difference between Stackless Python and Erlang. Looks like the primary advantage of Stackless is that well.. it's Python! The language is less "weird" to most people, it's fully OO (for those who forget how to design non-OO systems) and has a concurrency model. On the downside, it looks like the IPC semantics are "simpler" yet more complex than Erlang's. In Erlang the only thing you can really do is send a message, and receive a message, Stackless has a whole queue model that involves threads blocking and the like. I don't know enough yet, but I suspect the basis of Stackless's concurrency model is in those blocking queues - each block is a hint that it's time to switch tasks.



Anyone have any advice or thoughts re: Stackless? I know Erlang well (it's pretty simple, so not hard), but I'd like more information on the pros and cons of Stackless.

Friday, February 16, 2007

Erlang


I am fairly well known at Amazon for being a proponent of Erlang. However recently I have decided that Erlang and I need to take a break. People keep on asking me if I am planning on using Erlang in the future, or if I'm going to introduce it to my new team.



The answer is going to have to be a no unfortunately. While I like Erlang, the problem is one of string performance. The bottom line is in web applications and systems that deal with the web, strings are a first class concept and object. Not being able to efficiently deal with them is pretty much a dealbreaker. Most people seem to get around this limitation by translating most important strings into atoms, and then treating the rest of strings as binaries and doing pass-through. This approach is not suitable for all applications sadly.



I am interested in the following technologies and systems right now:


The interesting aspect of Stackless is they use blocking-queues as the IPC method of choice. I really like the async message passing style of Erlang, but I suspect most people have a problem thinking in and rationalizing about asynchronous messages.



I like D because it seeks to provide high level OO facilities with good performance. Performance really is everything - we should not be thinking otherwise. We need flexible highly performant systems, and it's possible that D can provide some of this. I need to investigate more however.