Hi!

Locklainn wrote:
So, I just committed my UDP message template code (the parser, reader, builder/serializer). It should be usable for creating and decoding UDP template messages. Now we just have to write the message system that will use such things.

WOOT! :-)

Also note that we need a TCP reader/writer for the event queue stuff and that the previous code doesn't use ZCA. Will have to zca-ify it now that we have decided to go with it.

We can discuss maybe where it makes sense to do so. I don't think we have to compononentize it just for the fun of it ;-) But of course it would be cool if you could define the public interfaces for these classes and put those in message/interfaces.py so it can serve as documentation.

Tao,
how exactly does one use your network layer? For instance, how do we choose which IRESTClient to use? In your test you are just doing getUtility(IRESTClient), but how do I know if I get urllib2, eventlet, mock, etc?

I think we solved this yesterday. What we both did now was to do
provideUtility(StdLibClient(), IRESTClient)

which tells the framework to use the StdLibClient instance if asked for an IRESTClient utility. This is not completely correct what we do here though as such an override should happen more explicit (in this case it's the default anyway and there should not need to be any overriding needed and the default should be documented). I will document how to do it propertly (and change it accordingly) soon. For now this should work. (The problem here btw would be what should happen if another component overrides this as well. Then you wouldn't know what is active. For this the configuration machinery with ZCML has some mechanisms in place to mark overrides so that when the configuration takes place first the normal registrations are done and then the overrides. Before that is done it also checks for conflicts and raises an exception if there is one.)

We should maybe think if there is a use case where you have different instance of the library with different network layers in one application. Somehow I doubt it but if there would be such a use case (or for some other component) then we should think about a general pattern of how to solve this. So maybe we need some configuration object for the library with which you initialize the components. But I guess it would need to be passed at least to the initial agent domain, which then can pass it along to whatever is instantiated from it.

I guess that might make sense for some tests.

-- Christian

--
Christian Scholz                          Homepage: http://comlounge.net
COM.lounge                                   blog: http://mrtopf.de/blog
Luetticher Strasse 10                                    Skype: HerrTopf
52064 Aachen                             Video Blog: http://comlounge.tv
Tel: +49 241 400 730 0                           E-Mail [EMAIL PROTECTED]
Fax: +49 241 979 00 850                               IRC: MrTopf, Tao_T

neue Show: TOPFtäglich (http://mrtopf.de/blog/category/topf-taglich/)

_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/pyogp

Reply via email to