escargo 6 Nov 2003 - Looking at Tequila a bit, I was wondering whether it was a potential victim of single point of failure problems. Can the Tequila server be replicated or distributed such that the clients have automatic failover in case their primary Tequila server goes down?Dunno about "victim", but yes Tequila relies on a central server. Automatic fallover was never a design requirement. Good hardware, RAID, backups, etc. would go a long way. Replication would be cool (and non-trivial). The long running setup handled over a billion requests for over a year with no downtime and that was good enough in this particular case. But I agree that a life-support system would need a bit more than this few-hundred line script.. :o) -jcwAK: A Tuplespace with notification should be easily replicable, just several tuple servers notifying each other about all the changes. Well, modulo code to prevent races when clients take a tuple out. So not too trivial either.escargo: Any idea how clients that lose connection to one server would switch to an alternative server? (Any idea how other systems might do it?)
escargo 6 Apr 2005 - I downloaded the source so I could play with tequila, but I realized that there's a gap in the functions available, at least as I understand them. Once you attach an array to the server, how can you detach it? I was looking at a client that might attach to multiple arrays, and then need to detach from some arrays and attach to others. Also, is it possible to attach to arrays on different servers in the same client?There's a new implementation of Tequila in progress, somewhat different model but considerably more flexible (including the ability to attach to multiple servers) - see the starkit at [4] for more info. -jcwescargo 8 Jun 2007 - It's now a couple of years after that note was written. Is there more progress on Tequila 2 (the starkit dates from June, 2005)?escargo Apr 2005 - I found the behavior of the new tequila.kit much better behaved on a Linux box than on my Windows XP Pro box. I don't know if you have tested them in both environmments, but Linux is definitely better at this time.
2005-08-04-01:04 Zarutian asked on the chat that if a client itirates through and changes every item in an Tequila'd array would the whole array be transfered to the server and then to all attached clients as the client itirates through the array? ( The array is tranfered item by item as the client itirates through it and changes the items ) GPS said it probably would.2005-08-04-01:11 Zarutian: so I ask if there is a less bandwith intensive way?I suspect that there is. The solution would be sending the computation/proccess to the data rather than vice versa.2005-08-25-01:37 Zarutian: miguel half asked me to clarify what I meantSay we have an shared array called arrayX and we execute this on a client: (servral clients are connected to the server all shareing the arrayX)
foreach item [array names arrayX] {
if {[string is digit $arrayX($item)]} {
incr arrayX($item) +2
} else {
append arrayX($item) "."
}
}what probably happens is that each changed array element is sent to the server and from the server to all the clients excluding the one where the changed elements originated.but of course some will say: "Aha! If the variable trace on the originating client checks how the variable is updated (append, set, and incr) then the originating client only has to send how the variable was updated. (the update procedure + delta info)"the above wouldnt work in the case of:
set names [array names arrayX]
set last [lindex $names end]
foreach item [lrange $names 0 end-1] {
set tmp $arrayX($item)
set arrayX($item) $arrayX($last)
set arrayX($last) $tmp
set last $item
}so like I said earlier: sending the computation to the data rather than vice versa is better in terms of less bandwith usagebut sending code, reciving and evaling it at a remote tcl interp always raises the question of Denial-Of-Service attacks like: set a 2
while 1 { expr $a * $a * $a }Zarutian looks at the clock and will continue at later time.Category Application
