How are queries evaluated in TSpaces?
Queries (using named fields) use an index, whereas matches use a space scan. If there are several parts (with AND, OR, etc), then the first query uses an index scan, then the rest of the predicates are evaluated as “residuals”, which means they are checked directly for each tuple. We don’t do any “index Anding”, like the relational systems do. • I’m trying to add a “watching” thread to the worker class (in the TSpaces examples) that waits for “poison pills” to be written to a space, and terminates the worker when it eats one. Has anyone written this sort of thing yet? Take a look at the Merger.java class in examples/mergesort. It does exactly what you are looking for. Basically it has a timeout after which it generates an anonymous inner class that is a Thread that writes a Tuple that satisfies the WaitToTake. • How can I specify that Tuples should expire after some time. The setExpire() method is used to set the expire interval for a Tuple. The default is to not expire the Tuple. • I