Tuesday, January 14, 2003


Promises aren't Enough : AOP Leasing.

I was reading over the documentation for the E language yesterday.  I'm impressed by the thought that's gone into it, and the careful scrutiny that's been applied to the security problem it primarily wants to solve.  As I think about it, though, I'm not sure that the promise feature is adequate to the task. 

The promise basically says, yes, I am doing this send for you, and there will be a result ready for you at some point in the future.  You can check at that time.  I don't think that's good enough for systems where the receiver of the send has to do resource intensive work.

I prefer something like the JINI leasing model, applied to function call requests.  If A wants B to do something, he asks B to start doing it.  B returns a lease for the request (or just the answer, if it can be delivered really quickly).  A is required to maintain interest in the request.  Once B has finished, it sends a message to A with the result.  A can either maintain its interest, or cancel the request if it is no longer needed.

It sounds like a complex model, but it can really work well if you are implementing a server.  You know that when you're servicing a request, the client who wanted it is still wanting it.  The client has a way of canceling a request, which means more server time to do the things that really matter.

The protocol outlined above is a prime candidate for implementation via aspects, too...the JINI libraries supply some of this kind of functionality automatically.  It's a good thing.


11:42:41 PM    

K is CISC.

Carlos opines that K is perhaps a RISC language.  I'd disagree!  Let's review what the basic languages give us.  C gives us variables, for loops, and you can make your own functions and have function pointers.  That's pretty much it (ok, yes, I am simplifying).  Let's say you wanto do something like K's grade operator. Sure, you can write your own implementation; K is, of course, written in C itself.  The point here is that you shouldn't have to.

I think that the function set available in K falls squarely in the CISC camp.  Look at the power that its primitives deliver -- they are considerably more sophisticated than the average 3GL...


11:35:27 PM