Compatibility
All releases between 0.1.3 and 0.1.7 (inclusive) are fully wire-compatible.
Bug Fixes
slow remote_ methods shouldn't delay subsequent messages (25)
In earlier releases, a remote_ method which runs slowly (i.e. one which
returns a Deferred and does not fire it right away) would have the
unfortunate side-effect of delaying all subsequent calls from the same
Broker. Those later calls would not be delivered until the first message had
completed processing. If, for some reason, that Deferred were never fired,
this Foolscap bug would prevent any other remote_ methods from ever being
called.
This is not how Foolscap's message-ordering logic is designed to work.
Foolscap guarantees in-order *delivery* of messages, but does not require
that they be completed/retired in that same order.
This has now been fixed. The invocation of remote_* is done in-order: any
further sequencing is up to the receiving application.
For example, in the following code:
sender:
rref.callRemote("quick", 1)
rref.callRemote("slow", 2)
rref.callRemote("quick", 3)
receiver:
def remote_quick(self, num):
print num
def remote_slow(self, num):
print num
d = Deferred()
def _done():
print "DONE"
d.callback(None)
reactor.callLater(5.0, _done)
return d
The intended order of printed messages is 1,2,3,DONE . This bug caused the
ordering to be 1,2,DONE,3 instead.
default size limits removed from all Constraints (26)
Constraints in Foolscap serve two purposes: DoS attack mitigation, and strong
typing on remote interfaces to help developers find problems sooner. To
support the former, most container-based Constraints had default size limits.
For example, the default StringConstraint enforced a maximum length of 1000
characters, and the ListConstraint had a maxLength of 30 elements.
In practice, these limits turned out to be more surprising than helpful.
Applications which worked fine in testing would mysteriously break when
subjected to data that was larger than expected. Developers who used
Constraints for their type-checking properties were surprised to discover
that they were getting size limitations as well. In addition, the
DoS-mitigation code in foolscap is not yet complete, so the cost/benefit
ratio of this feature was dubious.
For these reasons, all default size limits have been removed from this