[Twisted-Python] Hip-bone's connected to the...
acapnotic at twistedmatrix.com
Fri Aug 3 15:23:06 EDT 2001
On Fri, Aug 03, 2001 at 01:05:56PM -0500, Glyph Lefkowitz wrote:
> On Thu, 2 Aug 2001, Kevin Turner wrote:
> > Application (twisted.internet.main.Application):
> You may want to add the fact that they'll often have a Delayed as well.
Yeah, I noticed that, but left it out for the first pass as it wasn't
necessary to get the network connection up and running...
> > Service (twisted.spread.pb.Service)
> Might want to be a little clearer about the service doing the
> authentication here...
That sounds like an excellent idea. However, it's an area I remain
entirely ignorant of...
> > Perspective (twisted.spread.pb.Perspective)
> Also don't talk so much about "client" and "server" when referring to the
> perspective; this is objects-to-objects.
Well, I've got to have some terms other than "this" and "that" to keep
straight what I'm talking about. Would you rather I called them "Alice"
Besides, if we are talking about this in the context of Services, (which
we are, as that text isn't general enough to be used as all-purpose
docstrings) I would think it makes sense to refer to one side as a
server, does it not?
> > Note: Since all commands over the broker happen asynchronously, the
> > client cannot receive return values from a perspective_foo() method.
> Yes it can, actually. If you pass a keyword parameter 'pbcallback', that
> callback will be invoked on the client when the return value is
And "The callback will be called with a single argument, the return
> > How does error notification work?
> Similiarly to return-value notification.
> myReference.do(arg,arg,pbcallback=myCallback, pberrback=myErrorCallback)
> All you get as an argument to the error callback is is a traceback or
> error message string though.
This means including the pberrback parameter on every call? What
happens if you don't? Is there a catch-all error handler you can set?
Why the sometimes strings/sometimes traceback inconsistancy?
> > What naming conventions should application authors use?
> Just stick to the Twisted coding standard and you'll be fine.
CodingStandard.html does not have the adverb prefixes like perspective_,
> Cached is interesting, but complex and you'll know if you need it.
Yeah, """It's like a Copy, but way, *WAY* worse!"""
> I'd highly encourage you to write some code though :)
ah'm workin on that =)
More information about the Twisted-Python