|
From: mathew r. <mat...@gm...> - 2008-01-10 10:54:38
|
On Jan 8, 2008 8:13 AM, Joerg Baach <ma...@ba...> wrote: > Hi Mathew, > > do you mind forwarding you reply to the list, so Andy can stay up to > date as well? I CC'd ope...@li... with my last email. I'm CC'ing again. If it doesn't work, tell me and I'll move it to opencoin-team. > > Well, I haven't gotten around to acutally implementing the messages > > over anything besides passing around my representation of them, so I > > can still go either way. > > How much of a hassle would be the split/parse thingy? Heh. No idea yet. I'm a bit into actually making the thing work though :) I'm passing messages between entities > > passed are properly formed. Then I have an (overly) complex layer > > which performs specific actions, implementing the logic of the various > > I had a first quick glimpse at the code, and had the impression that > things are not 100% easy to understand. I wonder if this could somewhat > simplified. Are you within reach of a voice line? > > > I have committed what I have right now to sandbox/mathew. It is > > Thanks a lot for that! > > > > > messages.py: > ... > > I guess this is where doctests would come in very handy (or any other > form of tests). Do you have code snippets which you use to test your code? I just committed it (test.py). Now. It isn't a testsuite or anything like that. It currently makes a CurrencyDescriptionDocument, a bunch of MintingKeys, a DSDBKey, some coins, and two wallets. Then it tries to transfer three coins to another wallet. So far it doesn't work. :( But I do have self-verifying coins and certificates and it should be smart enough to figure out what is going on (but it isn't) > > A MessageType can also add and remove Callbacks. Callbacks send > > the message and the return of the call to handle or encode to the > > callback function. These callbacks are used to build on the messages. > > Why do we need callbacks? Why do we not call methods directly and wait > for the response? I have the feeling that the protocoll never has > simultanious communication taking place, e.g the wallet accepts, asks > for a lock, and only returns after having a reply from the dsdb. The callbacks are to interact between my Handlers (the pieces which do the complex work) and the Messages that come in. > I have the feeling that the structure starts to look a bit more like a > framework. But maybe I just need to have a second look. I agree. I built a few levels of framework and then everything works with entities (Well... it will... I hope). An odd fact about the callbacks--since it is doing everything through callbacks, i get very long tracebacks. <snip> > Cheers, > > Joerg > > P.S: We should continue our conversation on the mailing lists! I agree! Looking forward to more conversation. -Mathew |