[mnet-devel] how to convert to twisted (was: What's left to be done for 0.7)

Zooko O'Whielacronx zooko at zooko.com
Sat Oct 4 14:24:11 BST 2003


I realized that I left out some important bits of needed-conversion:

Replace ophandlers with twisted deferreds and replace "pack into dict, call 
MojoTransactionManager, unpack from dict on the other side" with "call PB".

I don't have time right now to grep out the numbers about those, but I will 
soon.

--Z

> Here's my quick estimate of what code we would have to port for a fully-
> Twistified version of Mnet.  Here's the top-level directories with number of 
> unique lines of code:
> 
> HACK pion:~/playground/mnet/mnet_newnet$ for D in `find . -type d -mindepth 1 -maxdepth 1`; do echo ${D};  if [ "X`find ${D} -name '*.py' -or -name '*.c' -or -name '*
> .h' -or -name '*.cpp'`" != "X" ] ; then cat `find ${D} -name '*.py' -or -name '*.c' -or -name '*.h' -or -name '*.cpp' ` | sort -u | wc -l; fi ; done
> 
> .
>   16673
> ./CVS
> ./doc
> ./w32
>     150
> ./egtp
>    6121
> ./mnetlib
>    8815
> ./artwork
> ./evilcrypto
>    1502
> 
> Now we can exclude egtp/ and evilcrypto/ right off the bat.  w32/ is a few 
> launching/OS-integration things that may or may not be working right now and 
> may or may not need to change for Twistification.
> 
> So now I'll look at mnetlib/.
> 
> .  
>    8815
> ./CVS
> ./test
>     542
> ./relay
>     109
> ./webui
>     110
> ./wxgui
>    2954
> ./scripts
>     531
> ./tracker
> ./filesystem
>    3053
> 
> Relay can go.  I don't know about webui or wxgui.  I would be surprised if 
> scripts had to be changed for Twistification.
> 
> There are 11 files in mnetlib/*.py.  5 of them import DoQ.  There are 21 lines 
> containing the string "doq" (case-insensitive and excluding the import lines).  
> Those files are: async_http_get.py, bootpage.py, datablock.py, peerset.py, 
> underboss.py.
> 
> test/ *would* have to be changed.  There are 3 files which import DoQ, and a 
> total of 18 lines containing the string "doq".
> 
> Now to the filesystem/ directory.
> 
> There 14 files in filesystem/.  Six of them import DoQ: localblockstore.py, 
> pusher.py, storedeep.py, storedict.py, storeflat.py, storehash.py.  There are 
> 12 lines that contain "doq".


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list