Re: Finally getting where I can replicate problems with stockquotes phase3 tutorial

Irmen de Jong <[email protected]> Thu, 08 Jan 2015 22:16:53 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 8-1-2015 17:11, Kenneth Martin wrote:

> Have you thought of using pyyaml for serialization? 

No I have not.

Also, as serpent already is capable of serializing everything into a human-readable
Python literal expression, I don't really see what another text based serializer brings
to the table.

> does serialize objects (haven't done much here). I'm guessing only 
> util.py needs to be changed to support it? Not sure how many places; 
> it's an extension of JSON, so maybe a simple search will show me 
> wherever additions are needed.

Yes, util.py defines and registers the serializers.
You will also have to assign it a unique serializer id in message.py.


> Re config; would it be easy that whenever a config paramater is changed, 
> to check if this conflicts with an environment variable, and give a 
> warning if a conflict occurs? 

No, the config parameters are simply stored on an object.
Also, they are explicitly allowed to override env vars.


> When running three terminals and changing 
> configuration, there is a lot of places that need to be compatible. For 
> stockquotes with pickle, it looks to me like environment variables in 
> two terminals (stockmarket.py terminal and aggregator.py terminal, but 
> not necessary in viewer.py terminal, and in all three files). I will 
> stick with serpent unless it doesn't work.

That's a good choice! Serpent is the default serializer after all. It should fit your
purpose most of the time. Only when dealing with custom classes, or in some other
peculiar cases, you may have to either use custom class serializer/deserializer hooks,
or revert to a different serializer such as pickle (booo).


> When there is a conflict, I find it interesting that it hangs while 
> trying to get a lock? This is probably insignificant, I just find it 
> interesting.

See other message, I stand corrected: it really locked up due to me adding the metadata
mechanism in a previous Pyro version. The internal connection lock was reacquired in the
scenario where the metadata exchange fails. Which it does in case of bad serializer
configuration.


> p.s. another possible suggestion, move the configuration help to near 
> the beginning so it is read early, or just move the line where PYRO_ 
> prepends config parameters to the concept section; I found the 
> configuration section really useful.

I'll think about these suggestions.

> p.p.s. any thoughts on having Pyro emit a signal in Pyside when data 
> comes in to the server, say when the Pyro server is running under a 
> QThread?

I have no idea what you mean here, sorry. Can you please elaborate.


Irmen



------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net