Version 17 of Tequila

Updated 2003-11-05 20:03:51

"Tequila" [L1 ] is a little Tcl server JCW started in 1999, which implements persistent shared arrays. With Tequila, you need no longer think in terms of communication: a Tcl array gets "attached" to the server, and from then on all clients doing so can read/write/unset items in it. This approach works quite well in combination with traces (and it's also built on traces and file events). When properly set up, you can builds apps as monolithic ones and later split them up with minimal changes. [Elaborate this point.]

Tequila has its own page [L2 ] as part of the MetaKit Wiki [L3 ].

CMCc is there some good reason for not using the comm package in tcllib for communication? Is it too slow/general? It calls eval in the receiver - that's probably slower than the special-purpose interpreter.

I suspect that the author didn't see a reason for using comm. He was comfortable writing communications layers, and probably had some code that he found worked sufficiently. Is there a benefit you see in using comm over what is already present in tequila?

CMcC Well, yes. comm provides for asynchronous sending and receiving of commands, whereas the current communication layer is synchronous with respect to client-outbound change notification, with pipelining of client-inbound change notification.

It seems to me that as long as the tcp connection between client and server remains up, and as long as the server is shut down in an orderly manner, the client can send requests to the tequila server asynchronously, rather than waiting for confirmation from the server (that confirmation, currently, amounts to the server having received and effected the changes, and all notifications of that change having been sent.)

Actually, now I think about it, my question was as much about comm as about Tequila.

10jun03 jcw - Not sure when the above was written, but one reason for using sync mode was as indicated above - the clients get an ack when changes have actually been made and sent around. This solved some important sequence-of-event issues for the app where this was being used. I agree that more sophisticated comms (including more transport-layer independence) would be useful. In the two main projects where Tequila was used as foundation, it worked well. Race issues were darn hairy at one point, so I never went back to make more changes unless truly needed. Another reason was that the central server was *very* long-running, and that all the other parts were evolving rapidly during development. Keeping the server as is (and using it to distribute client software changes) turned out to work well.

In hindsight, Tequila worked (and still works) really well, but it could be made still more generic and performant. Separating notification, persistence, and communication could be a good idea. Keeping in mind the motto don't over-generalize, and don't generalize prematurely....


Category Application