Skip to content

Commit

Permalink
[foolscap @ release foolscap-0.1.0]
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Mar 16, 2007
1 parent 1512d24 commit b538fa8
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 21 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2007-03-15 Brian Warner <warner@lothar.com>

* foolscap/__init__.py: release Foolscap-0.1.0
* misc/{sid|sarge|dapper}/debian/changelog: same

* README: update for new release
* NEWS: update for new release

2007-02-16 Brian Warner <warner@lothar.com>

* foolscap/eventual.py (_SimpleCallQueue._turn): retire all
Expand Down
59 changes: 59 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
User visible changes in Foolscap (aka newpb/pb2). -*- outline -*-

* Release 0.1.0 (15 Mar 2007)

** usability improvements

*** Tubs now have a certFile= argument

A certFile= argument has been added to the Tub constructor to allow the Tub
to manage its own certificates. This argument provides a filename where the
Tub should read or write its certificate. If the file exists, the Tub will
read the certificate data from there. If not, the Tub will generate a new
certificate and write it to the file.

The idea is that you can point certFile= at a persistent location on disk,
perhaps in the application's configuration or preferences subdirectory, and
then not need to distinguish between the first time the Tub has been created
and later invocations. This allows the Tub's identity (derived from the
certificate) to remain stable from one invocation to the next. The related
problem of how to make (unguessable) object names persistent from one program
run to the next is still outstanding, but I expect to implement something
similar in the future (some sort of file to which object names are written
and read later).

certFile= is meant to be used somewhat like this:

where = os.path.expanduser("~/.myapp.cert")
t = Tub(certFile=where)
t.registerReference(obj) # ...

*** All eventual-sends are retired on each reactor tick, not just one.

Applications which make extensive use of the eventual-send operations (in
foolscap.eventual) will probably run more smoothly now. In previous releases,
the _SimpleCallQueue class would only execute a single eventual-send call per
tick, then take care of all pending IO (and any pending timers) before
servicing the next eventual-send. This could probably lead to starvation, as
those eventual-sends might generate more work (and cause more network IO),
which could cause the event queue to grow without bound. The new approach
finishes as much eventual-send work as possible before accepting any IO. Any
new eventual-sends which are queued during the current tick will be put off
until the next tick, but everything which was queued before the current tick
will be retired in the current tick.

** bug fixes

*** Tub certificates can now be used the moment they are created

In previous releases, Tubs were only willing to accept SSL certificates that
created before the moment of checking. If two systems A and B had
unsynchronized clocks, and a Foolscap-using application on A was run for the
first time to connect to B (thus creating a new SSL certificate), system B
might reject the certificate because it looks like it comes from the future.

This problem is endemic in systems which attempt to use the passage of time
as a form of revocation. For now at least, to resolve the practical problem
of certificates generated on demand and used by systems with unsynchronized
clocks, Foolscap does not use certificate lifetimes, and will ignore
timestamps on the certificates it examines.


* Release 0.0.7 (16 Jan 2007)

** bug fixes
Expand Down
53 changes: 33 additions & 20 deletions README
Original file line number Diff line number Diff line change
@@ -1,42 +1,55 @@
"pb2"
Foolscap
(aka newpb, aka pb2)

This is a ground-up rewrite of Perspective Broker, which itself is Twisted's
native RPC/RMI protocol (Remote Procedure Call / Remote Method Invocation).
If you have control of both ends of the wire, and are thus not constrained to
use some other protocol like HTTP/XMLRPC/CORBA/etc, consider using PB.
use some other protocol like HTTP/XMLRPC/CORBA/etc, you might consider using
Foolscap.

Fundamentally, PB allows you to make a python object in one process available
to code in other processes, which means you can invoke its methods remotely.
This includes a data serialization layer to convey the object graphs for the
argument and the eventual response, and an object reference system to keep
track of which objects you are connecting to. It uses a capability-based
security model, such that once you create a non-public object, it is only
accessible to clients to whom you've given the (unguessable) PB-URL. You can
of course publish world-visible objects that have well-known PB-URLs.
Fundamentally, Foolscap allows you to make a python object in one process
available to code in other processes, which means you can invoke its methods
remotely. This includes a data serialization layer to convey the object
graphs for the arguments and the eventual response, and an object reference
system to keep track of which objects you are connecting to. It uses a
capability-based security model, such that once you create a non-public
object, it is only accessible to clients to whom you've given the
(unguessable) PB-URL. You can of course publish world-visible objects that
have well-known PB-URLs.

Full documentation and examples are in the doc/pb/ directory.
Full documentation and examples are in the doc/ directory.


COMPATIBILITY:

newpb is still under development. The wire protocol is almost certainly
Foolscap is still under development. The wire protocol is almost certainly
going to change in the near future, so forward compatibility between
versions is *NOT* yet guaranteed. Do not use newpb if you do not have
continuing control over both ends of the wire. newpb is not yet suitable for
widespread deployment: for production applications please continue to use
oldpb (in twisted.spread) . newpb has not been used extensively in any
environment and serious bugs may exist.
versions is *NOT* yet guaranteed. Do not use Foolscap if you do not have
continuing control over both ends of the wire. Foolscap is not yet suitable
for widespread deployment: for production applications please continue to
use oldpb (in twisted.spread) . Foolscap has not been used extensively in
any environment and serious bugs may exist.

NAMING:

The established version of PB that has been around for years is referred to
here as "oldpb". The new version contained in this release is known as "pb2"
or "newpb". The release tarballs are named "pb2-x.y.z". The python module
name is "twisted.pb" . These names are still in flux. At some point in the
here as "oldpb". The new version contained in this release is known as
"Foolscap", but at various points of its development was known as "newpb" or
"pb2". The release tarballs are named "foolscap-x.y.z". The python module
name is "foolscap" . These names are still in flux. At some point in the
future, we may come up with a suitably clever and confusing name that will
replace any or all of these.

A "foolscap" is a size of paper, probably measuring 17 by 13.5 inches. A
twisted foolscap of paper makes a good fool's cap. Also, "cap" makes me
think of capabilities, and Foolscap is a protocol to implement a distributed
object-capabilities model in python.

AUTHOR:

Brian Warner is responsible for this thing. Please discuss it on the
twisted-python list.

The wiki page at <http://twistedmatrix.com/trac/wiki/FoolsCap> contains
pointers to the latest release, as well as documentation and other
resources.
2 changes: 1 addition & 1 deletion foolscap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Foolscap"""

__version__ = "0.0.7+"
__version__ = "0.1.0"

# here are the primary entry points
from foolscap.pb import Tub, UnauthenticatedTub, getRemoteURL_TCP
Expand Down
6 changes: 6 additions & 0 deletions misc/dapper/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
foolscap (0.1.0) unstable; urgency=low

* new release

-- Brian Warner <warner@lothar.com> Thu, 15 Mar 2007 16:56:16 -0700

foolscap (0.0.7+) unstable; urgency=low

* bump revision while between releases
Expand Down
6 changes: 6 additions & 0 deletions misc/sarge/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
foolscap (0.1.0) unstable; urgency=low

* new release

-- Brian Warner <warner@lothar.com> Thu, 15 Mar 2007 16:56:16 -0700

foolscap (0.0.7+) unstable; urgency=low

* bump revision while between releases
Expand Down
6 changes: 6 additions & 0 deletions misc/sid/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
foolscap (0.1.0) unstable; urgency=low

* new release

-- Brian Warner <warner@lothar.com> Thu, 15 Mar 2007 16:56:16 -0700

foolscap (0.0.7+) unstable; urgency=low

* bump revision while between releases
Expand Down

0 comments on commit b538fa8

Please sign in to comment.