Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Kevin Mcintyre
correction.  I was stupidly reprocessing list on remote copy side.  Seeing
much better results now ~10K per second.


On Fri, Aug 8, 2014 at 6:32 PM, Kevin Mcintyre  wrote:

> I experimented today with a table scan from dynamodb.  Taking each record
> and converting to a dictionary into a list.  Initial scan and transform
> took ~8 seconds from amazon to my house over TCP boto which is soapish? i
> think.  ~7800 records.
>
> The next call for the remote copy took 7 seconds across the bus.  Is that
> expected?
>
>
>
>
>
> On Fri, Aug 8, 2014 at 3:01 PM, Glyph Lefkowitz 
> wrote:
>
>>
>> On Aug 8, 2014, at 1:31 PM, Kevin Mcintyre  wrote:
>>
>> I think so too, but I'm starting to lean toward websockets.  The warnings
>> alone right?
>>
>>
>> Websockets are a layer well below what PB does.  In fact you could run PB
>> over websockets, and it would work roughly the same as over TCP.
>>
>> But I will take another pass and report back any success.
>>
>>
>> Please do let us know.
>>
>> -glyph
>>
>>
>> ___
>> Twisted-Python mailing list
>> Twisted-Python@twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] On problems with inlineCallbacks (was Re: Is there pb documentation somewhere?)

2014-08-08 Thread Jonathan Ballet
Sorry for hijacking the thread, but I actually was going to ask
something about this a few days ago, so let's use this reference from
Glyph as a starting point instead :)

On Fri, Aug 08, 2014 at 02:59:39PM -0700, Glyph Lefkowitz wrote:

> I've participated in this discussion several times:
> 
> Hypothetical Amalgam of Median Interlocutors Speaking Here: "I'm using Tulip 
> because I really like its style of coroutines."
> Glyph: "That's interesting. Did you know that Twisted has an equivalent style 
> of coroutines, called inlineCallbacks, that's been around for years?"
> HAMISH: "I saw that, and I asked about that a while ago and I heard it was 
> bad.  It haven't heard that Tulip has the same problems, though."
> Glyph: "Really? What problems does inlineCallbacks have that Tulip's 
> coroutines don't?"
> HAMISH: "When I asked about it everybody told me I have to use Deferreds 
> instead, but Deferreds are really confusing and they make your code look all 
> gross, so I didn't want to do that.  With Tulip I don't have to!"
> Glyph: 
> 
> Of course the problems that we describe with inlineCallbacks are the
> exact same problems that you will have with Tulip-style coroutines,
> and in fact in one of the conversations that was averaged out to
> produce the above composite, my interlocutor specifically mentioned
> that they'd already had the kind of bug that explicit-yield coroutines
> can sometimes encourage (thoughtlessly putting in too many 'yield's
> and not considering their consequences) and were wondering how Twisted
> dealt with that sort of thing.

It's not the first time I'm hearing that there are problems/and or
limitations with inlineCallbacks, and I don't think I ever read
somewhere what they were exactly? And so, each time I'm seeing code
using inlineCallbacks, I'm frowning then realizing I have no idea why I
did...

Is there some place where I could find more information about these
problems/limitations? That would be enlightening.

 Jonathan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-08 Thread Daniel Sank
Twisted dev people dudes,

> Nevertheless, *Daniel* didn't lead with the details and refrain from a
value judgement, so the
> advice applies equally well to him.

Lesson learned. Thanks. I agree that this is important.

Now to bring the thread back on-topic, I'd like to ask what pb should do *in
principle*. In other words, what is the specification for the flavors? I
think a discussion of each pb flavor would be helpful and would provide me
material from which I can generate missing docstrings [1]. I'd rather do it
this way instead of backing out what the standing implementation currently
does so that I don't waste time working on something which is a
fundamentally bad idea. This discussion should be a small investment at the
present time.

Copyable:
The functionality provided by Copyable is simple. The sender of the
Copyable just sends it and *forgets*. Therefore, sending a Copyable is
basically just sending atomic data in a particular format. I don't think we
need to discuss this any further.

Referenceable:
When I send you a Referenceable, I send a GUID so that you can later refer
to that object. For example, I send you a message with argument (psuedo
code)

"referenceable-'Joe'"

This is a declaration that I am keeping hold of an object called "Joe" upon
which you may call methods remotely. Specifically, you can send me

"'Joe-foo-4"

which tells me to call Joe.foo(4) and send you the result.

1. How long should the GUID for Joe survive? If Joe is deleted can I reuse
the name "Joe" for an object created later?
2. Do I notify you if Joe disappears on my side?

Let's stop here for now. I owe glyph some reviews [2].

Yours sincerely,
Daniel

[1] I already submitted a patch to the pb documentation and improved the
submission based on review. I hope this provides some indication of my
commitment to make material contributions. I mention this because glyph
made a comment suggesting that showing real work would be valuable.

[2] Is this the beginning of a process which will lead me in the end to
complete servitude and loss of ownership of my own soul?
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Kevin Mcintyre
I experimented today with a table scan from dynamodb.  Taking each record
and converting to a dictionary into a list.  Initial scan and transform
took ~8 seconds from amazon to my house over TCP boto which is soapish? i
think.  ~7800 records.

The next call for the remote copy took 7 seconds across the bus.  Is that
expected?





On Fri, Aug 8, 2014 at 3:01 PM, Glyph Lefkowitz 
wrote:

>
> On Aug 8, 2014, at 1:31 PM, Kevin Mcintyre  wrote:
>
> I think so too, but I'm starting to lean toward websockets.  The warnings
> alone right?
>
>
> Websockets are a layer well below what PB does.  In fact you could run PB
> over websockets, and it would work roughly the same as over TCP.
>
> But I will take another pass and report back any success.
>
>
> Please do let us know.
>
> -glyph
>
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] help with listening to UDP broadcast?

2014-08-08 Thread Pantelis Theodosiou
Hi Russell,

In an old script I've written, I see the following differences with your
code:

I hadn't used at all  allsetBroadcastAllowed()
but joinGroup()   (in startPrtotocol).

And I don't think the 255.255.255.255 will work. You'll need something like
192.168.1.1 or 127.0.0.1

The code (stripped from irrelevant parts) was:

from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
from twisted.application.internet import MulticastServer

# Set ports and hosts
ip = '224.0.5.228'
port = 8228

# our interface
interface = '192.168.1.1'

class MulticastClientUDP(DatagramProtocol):

def startProtocol(self):
# Join the multicast group
self.transport.joinGroup(ip, interface)
self.transport.setTTL(255)

def datagramReceived(self, datagram, address):
print "got a UDP broadcast packet"


# set reactor to listen on multicast channels
alertsClient = MulticastClientUDP()
reactor.listenMulticast(port, alertsClient)

reactor.run()


Pantelis Theodosiou


On Fri, Aug 8, 2014 at 11:58 PM, Russell E. Owen  wrote:

> I've found an example for UDP broadcasting:
>  /udpbroadcast.py?rev=41516
> 
> >
>
> However, it combines the sender and receiver in a way that I find
> confusing. I figured out how output UDP broadcast packets, but not how
> to make a client that receives to the packets.
>
> Here is what we have, which doesn't work. Based on a comment on the
> broadcast UDP ticket. I suspect the problem is specifying the broadcast
> address using the interface argument to listenUDP, but I'm not sure. In
> any case, no value for interface that I've tried works:
> -"" (which is what my senders uses) results in
> twisted.internet.error.InvalidAddressError
> -"255.255.255.255" results in twisted.internet.error.CannotListenError:
> Couldn't listen on 255.255.255.255:1235: [Errno 49] Can't assign
> requested address.
> - omitting it results in no packets received.
> I also tried listenMulticast, but it didn't work (and I didn't expect it
> to, based on comments I saw on the ticket for implementing UDP broadcast
> support).
>
> Any hints would be appreciated.
>
> #!/usr/bin/env python2
> """Attempt to listen to UDP broadcasts
> """
> from twisted.internet.protocol import DatagramProtocol
> from twisted.internet import reactor
>
> Port = 1235
>
> class BroadcastUDPClient(DatagramProtocol):
> def startProtocol(self):
> self.transport.setBroadcastAllowed(True)
>
> def datagramReceived(self, datagram, address):
> print "got a UDP broadcast packet"
>
> class UDPListener(object):
> def __init__(self, port):
> self.port = port
> self.broadcastClient = BroadcastUDPClient()
> self.listener = None
> self.startListening()
>
> def startListening(self):
> if self.listener is None:
> interface = "255.255.255.255"
> self.listener = reactor.listenUDP(self.port,
> self.broadcastClient, interface)
>
> def stopListening(self):
> if self.listener is not None:
> self.listener.stopListening()
> self.listener = None
>
> if __name__ == "__main__":
> listener = UDPListener(Port)
> reactor.run()
>
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] help with listening to UDP broadcast?

2014-08-08 Thread Russell E. Owen
I've found an example for UDP broadcasting:


However, it combines the sender and receiver in a way that I find 
confusing. I figured out how output UDP broadcast packets, but not how 
to make a client that receives to the packets.

Here is what we have, which doesn't work. Based on a comment on the 
broadcast UDP ticket. I suspect the problem is specifying the broadcast 
address using the interface argument to listenUDP, but I'm not sure. In 
any case, no value for interface that I've tried works:
-"" (which is what my senders uses) results in 
twisted.internet.error.InvalidAddressError
-"255.255.255.255" results in twisted.internet.error.CannotListenError: 
Couldn't listen on 255.255.255.255:1235: [Errno 49] Can't assign 
requested address.
- omitting it results in no packets received.
I also tried listenMulticast, but it didn't work (and I didn't expect it 
to, based on comments I saw on the ticket for implementing UDP broadcast 
support).

Any hints would be appreciated.

#!/usr/bin/env python2
"""Attempt to listen to UDP broadcasts
"""
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor

Port = 1235

class BroadcastUDPClient(DatagramProtocol):
def startProtocol(self):
self.transport.setBroadcastAllowed(True)

def datagramReceived(self, datagram, address):
print "got a UDP broadcast packet"

class UDPListener(object):
def __init__(self, port):
self.port = port
self.broadcastClient = BroadcastUDPClient()
self.listener = None
self.startListening()

def startListening(self):
if self.listener is None:
interface = "255.255.255.255"
self.listener = reactor.listenUDP(self.port,
self.broadcastClient, interface)

def stopListening(self):
if self.listener is not None:
self.listener.stopListening()
self.listener = None

if __name__ == "__main__":
listener = UDPListener(Port)
reactor.run()


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Glyph Lefkowitz

On Aug 8, 2014, at 1:31 PM, Kevin Mcintyre  wrote:

> I think so too, but I'm starting to lean toward websockets.  The warnings 
> alone right?  

Websockets are a layer well below what PB does.  In fact you could run PB over 
websockets, and it would work roughly the same as over TCP.

> But I will take another pass and report back any success.

Please do let us know.

-glyph

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-08 Thread Glyph Lefkowitz

On Aug 8, 2014, at 11:26 AM, exar...@twistedmatrix.com wrote:

>> This was a complaint about a general trend, not about specific words. 
>> Clearly exarkun gave you the impression that it is "bad", whether he 
>> specifically said so or not.
> 
> Could you clarify what you think the problem here actually is?

I concede I was leaving some stuff out, so that wasn't the clearest description.

In the past six months or so I've been going to lots of events where I talk to 
people about Twisted, and why they might or might want to use it.

I've participated in this discussion several times:

Hypothetical Amalgam of Median Interlocutors Speaking Here: "I'm using Tulip 
because I really like its style of coroutines."
Glyph: "That's interesting. Did you know that Twisted has an equivalent style 
of coroutines, called inlineCallbacks, that's been around for years?"
HAMISH: "I saw that, and I asked about that a while ago and I heard it was bad. 
 It haven't heard that Tulip has the same problems, though."
Glyph: "Really? What problems does inlineCallbacks have that Tulip's coroutines 
don't?"
HAMISH: "When I asked about it everybody told me I have to use Deferreds 
instead, but Deferreds are really confusing and they make your code look all 
gross, so I didn't want to do that.  With Tulip I don't have to!"
Glyph: 

Of course the problems that we describe with inlineCallbacks are the exact same 
problems that you will have with Tulip-style coroutines, and in fact in one of 
the conversations that was averaged out to produce the above composite, my 
interlocutor specifically mentioned that they'd already had the kind of bug 
that explicit-yield coroutines can sometimes encourage (thoughtlessly putting 
in too many 'yield's and not considering their consequences) and were wondering 
how Twisted dealt with that sort of thing.

I don't object to people using Tulip, or for that matter any of Twisted's 
event-driven competitors - I'm much happier if they're writing event-driven 
code of any stripe than just spawning a thread and writing until they block - 
but it does bother me if they select a different project to use or contribute 
to because of a perceived issue created only by our collective habit of being 
tersely self-critical.

When anyone directly involved with producing a thing describes that thing as 
"good", new observers tend to take it with a grain of salt.  "Of course they 
think X is good, they work on X." When someone involved with a project 
describes it as "bad", though, even if it's a convenient shorthand for many 
people in the conversation for a well-understood set of complex issues, those 
new observers tend to think, "Wow, if even they describe X as bad, it must be 
really bad, they work on X!".

What I am asking everyone reading here to do is just avoid calling stuff "bad" 
or "gross" or "complicated".  Even a stock stand-in phrase that more or less 
just means "bad" would be better.  Even an unexplained "inappropriate for my 
use-case", for example, least implies that the user might want to consider the 
system under discussion's appropriateness for their particular use-case.

>> We're all intimately familiar with everything that's terrible about all of 
>> our code, and we aren't shy about sharing.  I just would like it if we could 
>> really lead with the details and refrain from value judgements :).
> 
> In this case, it seems like that's exactly what happened.  I led with detail. 
>  The value judgement of PB being "bad" (which is a gross over- 
> simplification, but a convenient shorthand) came afterwards.


Keep in mind that my introduction to this interaction was Daniel saying:

>>> exarkun thinks pb is bad and that I should implement what I need in AMP.


You can see how I might have interpreted this to mean that you just said you 
think PB is bad :-).

Nevertheless, Daniel didn't lead with the details and refrain from a value 
judgement, so the advice applies equally well to him.  Which is why I filled 
out all those details, so other readers of the thread will know what 
"reasonable" and "bad" mean in this context.

-glyph

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Kevin Mcintyre
I think so too, but I'm starting to lean toward websockets.  The warnings
alone right?

But I will take another pass and report back any success.

Cheers,


On Fri, Aug 8, 2014 at 9:04 AM, Daniel Sank  wrote:

> I think Cacheable exists to handle the case you want. Beware there are
> some funny issues with Cacheable
>
> https://twistedmatrix.com/trac/ticket/7274
>
> Daniel
>
>
> On Fri, Aug 8, 2014 at 8:01 AM, Kevin Mcintyre  wrote:
>
>> The question is what's necessary to get knowitall.py to receive updates
>> to held copy.
>>
>> I start server, start knowitall, run wordsmith.  Knowitall doesn't
>> receive updates.  I understand why, setCopyableState only gets fired once.
>> Guessing jelly doesn't hold onto the RemoteCopy or a reference to
>> RemoteCopy.
>>
>> Is the next step to add pb.Referenceable to Dictionary class, and use
>> observe_?
>>
>>
>>
>> On Fri, Aug 8, 2014 at 12:30 AM, Daniel Sank 
>> wrote:
>>
>>> Kevin,
>>>
>>> Is there a question there? I'd be happy to try to help if I knew what
>>> you were asking.
>>>
>>>
>>> On Thu, Aug 7, 2014 at 11:42 PM, Kevin Mcintyre 
>>> wrote:
>>>
 wordsmith argument order issues re-take.

 Cheers,
 Kevin


 On Thu, Aug 7, 2014 at 11:29 PM, Kevin Mcintyre 
 wrote:

> goal: Give knowitall.py awareness of wordsmith.py addition.
>
> to run
> ./library.sh # opens 7999 for remote_dictionary and remote_define
> methods
> then both:
> python knowitall.py
> python wordsmith.py
>
> library.sh due to main/jelly issues
>
>

 ___
 Twisted-Python mailing list
 Twisted-Python@twistedmatrix.com
 http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


>>>
>>>
>>> --
>>> Daniel Sank
>>> Department of Physics
>>> Broida Hall
>>> University of California
>>> Santa Barbara, CA 93117
>>> (805)893-3899
>>>
>>> ___
>>> Twisted-Python mailing list
>>> Twisted-Python@twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>>
>>>
>>
>> ___
>> Twisted-Python mailing list
>> Twisted-Python@twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
>
> --
> Daniel Sank
> Department of Physics
> Broida Hall
> University of California
> Santa Barbara, CA 93117
> (805)893-3899
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-08 Thread exarkun

On 05:57 pm, gl...@twistedmatrix.com wrote:


On Aug 7, 2014, at 10:42 AM, Daniel Sank  wrote:

glyph,

> I really wish we would stop calling things "bad" and "good".

My wording of exarkun's wording. He gave a much more detailed 
description of what he think's is "crazy" about pb.


This was a complaint about a general trend, not about specific words. 
Clearly exarkun gave you the impression that it is "bad", whether he 
specifically said so or not.


I don't understand what you're saying here.

Do you want people to not describe the shortcomings of certain pieces of 
software?


Or do you want people not to conclude from such descriptions that those 
pieces of software are not the most well suited for certain 
applications?


Or do you want people to write two pages of description every time they 
want to refer to the idea that a certain piece of software isn't the 
best choice for a certain application?


Could you clarify what you think the problem here actually is?


We're all intimately familiar with everything that's terrible about all 
of our code, and we aren't shy about sharing.  I just would like it if 
we could really lead with the details and refrain from value judgements 
:).


In this case, it seems like that's exactly what happened.  I led with 
detail.  The value judgement of PB being "bad" (which is a gross over- 
simplification, but a convenient shorthand) came afterwards.


Jean-Paul

> make your own decisions about how to write your own code.

Indeed, but gathering information from wiser folks is always a good 
idea, and usually best done _often_ during development :)


I might quibble with "wiser" but okay.  I'm happy to provide feedback 
earlier so I don't have to say "what is this disaster" later ;-).
> I'm happy to trade 2-for-1 - if you do two code reviews, I will 
regard it as an immediate obligation for

> me to review a ticket you direct me to ;).

Deal. However, rather than direct your attention to tickets, at this 
stage I would rather trade reviews for discussion. I'll do two reviews 
and then post a few questions to this mailing list thread. Once I 
start actually writing patches/new code we can trade reviews for 
attention to tickets. Ok?


I'm happy to do that.
> These would also be easier to land, and a couple of decades in open 
source has taught me that nothing
> motivates development activity like successful development activity 
;).


Indeed. There are one or two architectural issues I want to understand 
before moving on to real coding. I will try to get through that asap 
by reviewing tickets and trading for discussion of those architectural 
issues.


I'll try to respond to these questions regardless.  I would like to 
help.  It's just that the reviews will create a more tangible sense of 
commitment :).
> Hopefully you can make sense out of the explanations above and your 
own existing knowledge.

> Are there any other phases of the process which are confusing?

This all makes sense now. I hadn't understood the point of the cooker, 
but now that you've explained it, I understand what's going on. I will 
transform your mailing list explanation to documentation shortly.


Great, glad that helped.

-glyph


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-08 Thread Glyph Lefkowitz

On Aug 7, 2014, at 10:42 AM, Daniel Sank  wrote:

> glyph,
> 
> > I really wish we would stop calling things "bad" and "good".
> 
> My wording of exarkun's wording. He gave a much more detailed description of 
> what he think's is "crazy" about pb.

This was a complaint about a general trend, not about specific words.  Clearly 
exarkun gave you the impression that it is "bad", whether he specifically said 
so or not.

We're all intimately familiar with everything that's terrible about all of our 
code, and we aren't shy about sharing.  I just would like it if we could really 
lead with the details and refrain from value judgements :).

> > make your own decisions about how to write your own code.
> 
> Indeed, but gathering information from wiser folks is always a good idea, and 
> usually best done _often_ during development :)

I might quibble with "wiser" but okay.  I'm happy to provide feedback earlier 
so I don't have to say "what is this disaster" later ;-).

> > I'm happy to trade 2-for-1 - if you do two code reviews, I will regard it 
> > as an immediate obligation for
> > me to review a ticket you direct me to ;).
> 
> Deal. However, rather than direct your attention to tickets, at this stage I 
> would rather trade reviews for discussion. I'll do two reviews and then post 
> a few questions to this mailing list thread. Once I start actually writing 
> patches/new code we can trade reviews for attention to tickets. Ok?

I'm happy to do that.

> > These would also be easier to land, and a couple of decades in open source 
> > has taught me that nothing
> > motivates development activity like successful development activity ;).
> 
> Indeed. There are one or two architectural issues I want to understand before 
> moving on to real coding. I will try to get through that asap by reviewing 
> tickets and trading for discussion of those architectural issues.

I'll try to respond to these questions regardless.  I would like to help.  It's 
just that the reviews will create a more tangible sense of commitment :).

> > Hopefully you can make sense out of the explanations above and your own 
> > existing knowledge.
> > Are there any other phases of the process which are confusing?
> 
> This all makes sense now. I hadn't understood the point of the cooker, but 
> now that you've explained it, I understand what's going on. I will transform 
> your mailing list explanation to documentation shortly.

Great, glad that helped.

-glyph___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Daniel Sank
I think Cacheable exists to handle the case you want. Beware there are some
funny issues with Cacheable

https://twistedmatrix.com/trac/ticket/7274

Daniel


On Fri, Aug 8, 2014 at 8:01 AM, Kevin Mcintyre  wrote:

> The question is what's necessary to get knowitall.py to receive updates to
> held copy.
>
> I start server, start knowitall, run wordsmith.  Knowitall doesn't receive
> updates.  I understand why, setCopyableState only gets fired once.
> Guessing jelly doesn't hold onto the RemoteCopy or a reference to
> RemoteCopy.
>
> Is the next step to add pb.Referenceable to Dictionary class, and use
> observe_?
>
>
>
> On Fri, Aug 8, 2014 at 12:30 AM, Daniel Sank 
> wrote:
>
>> Kevin,
>>
>> Is there a question there? I'd be happy to try to help if I knew what you
>> were asking.
>>
>>
>> On Thu, Aug 7, 2014 at 11:42 PM, Kevin Mcintyre 
>> wrote:
>>
>>> wordsmith argument order issues re-take.
>>>
>>> Cheers,
>>> Kevin
>>>
>>>
>>> On Thu, Aug 7, 2014 at 11:29 PM, Kevin Mcintyre 
>>> wrote:
>>>
 goal: Give knowitall.py awareness of wordsmith.py addition.

 to run
 ./library.sh # opens 7999 for remote_dictionary and remote_define
 methods
 then both:
 python knowitall.py
 python wordsmith.py

 library.sh due to main/jelly issues


>>>
>>> ___
>>> Twisted-Python mailing list
>>> Twisted-Python@twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>>
>>>
>>
>>
>> --
>> Daniel Sank
>> Department of Physics
>> Broida Hall
>> University of California
>> Santa Barbara, CA 93117
>> (805)893-3899
>>
>> ___
>> Twisted-Python mailing list
>> Twisted-Python@twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>


-- 
Daniel Sank
Department of Physics
Broida Hall
University of California
Santa Barbara, CA 93117
(805)893-3899
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Kevin Mcintyre
The question is what's necessary to get knowitall.py to receive updates to
held copy.

I start server, start knowitall, run wordsmith.  Knowitall doesn't receive
updates.  I understand why, setCopyableState only gets fired once.
Guessing jelly doesn't hold onto the RemoteCopy or a reference to
RemoteCopy.

Is the next step to add pb.Referenceable to Dictionary class, and use
observe_?



On Fri, Aug 8, 2014 at 12:30 AM, Daniel Sank  wrote:

> Kevin,
>
> Is there a question there? I'd be happy to try to help if I knew what you
> were asking.
>
>
> On Thu, Aug 7, 2014 at 11:42 PM, Kevin Mcintyre  wrote:
>
>> wordsmith argument order issues re-take.
>>
>> Cheers,
>> Kevin
>>
>>
>> On Thu, Aug 7, 2014 at 11:29 PM, Kevin Mcintyre 
>> wrote:
>>
>>> goal: Give knowitall.py awareness of wordsmith.py addition.
>>>
>>> to run
>>> ./library.sh # opens 7999 for remote_dictionary and remote_define methods
>>> then both:
>>> python knowitall.py
>>> python wordsmith.py
>>>
>>> library.sh due to main/jelly issues
>>>
>>>
>>
>> ___
>> Twisted-Python mailing list
>> Twisted-Python@twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
>
> --
> Daniel Sank
> Department of Physics
> Broida Hall
> University of California
> Santa Barbara, CA 93117
> (805)893-3899
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Daniel Sank
Kevin,

Is there a question there? I'd be happy to try to help if I knew what you
were asking.


On Thu, Aug 7, 2014 at 11:42 PM, Kevin Mcintyre  wrote:

> wordsmith argument order issues re-take.
>
> Cheers,
> Kevin
>
>
> On Thu, Aug 7, 2014 at 11:29 PM, Kevin Mcintyre  wrote:
>
>> goal: Give knowitall.py awareness of wordsmith.py addition.
>>
>> to run
>> ./library.sh # opens 7999 for remote_dictionary and remote_define methods
>> then both:
>> python knowitall.py
>> python wordsmith.py
>>
>> library.sh due to main/jelly issues
>>
>>
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>


-- 
Daniel Sank
Department of Physics
Broida Hall
University of California
Santa Barbara, CA 93117
(805)893-3899
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python