Thursday, 2010-07-08

*** tpb has joined #tp00:00
-niven.freenode.net- [freenode-info] channel flooding and no channel staff around to help? Please check with freenode support: http://freenode.net/faq.shtml#gettinghelp00:00
*** ChanServ sets mode: +o tpb00:00
*** jnengland77 has quit IRC00:11
llnzafternoon all00:17
alanpwomp womp00:59
*** Erroneous has quit IRC01:25
*** nash has joined #tp01:34
*** verhoevenv has quit IRC01:39
llnzglew: cool to hear that sqlitepersistence compiles03:18
glewllnz, yeah now i'm trying to find out if and where it made the database03:19
*** StupidIncarnate has joined #tp04:09
*** llnz has quit IRC04:16
*** glew has quit IRC04:32
*** mithro has joined #tp05:23
*** cahirwpz has joined #tp07:08
*** Epyon___ has quit IRC07:10
*** StupidIncarnate has quit IRC07:24
*** bisc has joined #tp08:38
biscmithro, tansell: ping08:46
tansellbisc, pong08:53
bisctansell: I wonder what you think about this one http://codereview.mithis.com/80001/show . Auto-generated python files should be consistent with xrc files. They aren't up-to-date now, and this patch updates them.09:05
tpbTitle: Issue 80001: Autogenerated files update. - Code Review (at codereview.mithis.com)09:05
*** verhoevenv has joined #tp09:12
cahirwpztansell, ping?09:12
tansellcahirwpz, I'm about to disappear10:09
cahirwpz:/10:09
cahirwpztansell, till tomorrow I hope, not for longer ?10:09
tansellyeah, going home for the night10:10
tansellbisc, 80001 looks okay except there is an extra file10:10
bisctansell: what do you mean?10:11
biscwhich file is not needed?10:11
tansellwindows/xrc/GameSetupWizard.py10:11
bisctansell: why not? don't we use generation for this one?10:12
tansellwell, it can't be used as it's comparing to an empty file10:12
*** mithro has quit IRC10:12
tansellcahirwpz, did you managed to make that list?10:13
cahirwpztansell, partially on paper10:13
cahirwpztansell, I captured most of important things, only details are missing10:14
bisctansell: ok10:15
tansellcahirwpz, so I'll be here for a little longer - why don't you start listing them off?10:18
cahirwpzok - firstly I decided to separate packet creation / marshalling / demarshalling from database10:20
cahirwpzin other words - I treat database as a model, ruleset as controller, and protocol as view10:21
cahirwpzeach of those three should be separated from each other as much as possible10:21
cahirwpzthis means that no class which represents database object can be mixed with functionality of creating or being created from network packet10:22
cahirwpzthis implies removing all from/to_packet methods from tp.server.bases classes10:23
cahirwpzthis idea is still not fully implemeted but as soon as I solve all problems with database design this will be done very quickly10:23
cahirwpz2nd major thing:10:24
cahirwpzprotocol handling was divided into a few parts:10:25
cahirwpzlisteners - those are classes that accepts connection on different port and when transport (connection object) is created it assign proper protocol (connection data handler) to it10:26
cahirwpzwe need a few low-level protocols because of tunneling (over SSL / HTTP / HTTPS)10:27
cahirwpzon top of low-level protocol I implement raw TP protocol10:27
cahirwpzraw TP protocol is not aware of datagram format or syntax - it only analyses header and reads as much data as was specified as payload length10:28
cahirwpzafter raw TP protocol was read it's forwarded to high-level TP protocol handler10:28
cahirwpz(in fact it's not called protocol but client session handler)10:29
cahirwpzclient session handler receives decoded TP protocol packets, and send decoded packets (they're encoded to binary in lower part)10:30
cahirwpzso basically structure of protocol handling is highly layered with each layer strongly separated from each other10:30
cahirwpzeach layer has well defined functionality and serves purpose not only of converting data but also filtering (for example malformed packets)10:31
cahirwpzClientSession object does contain a few important things - command handler (state machine that's converts protocol objects to database objects), protocol factory (that knows how to convert database object into protocol objects) and eventually client context (game and player name)10:34
*** nash has quit IRC10:34
cahirwpzresponsibilities in client session class isn't fixed for now, but I suppose the overall design is relatively good10:36
cahirwpz3rd major thing:10:36
cahirwpzwhole database backend was / is being converted to sqlalchemy.orm10:36
cahirwpzsqlalchemy.orm simplifies database object management enormously10:37
cahirwpzorm automatically keeps track of changes in objects and knows which one should be written back to database10:39
cahirwpzmoreover it implements sophisticated object cache (for example if as result of two queries you've got the same object you will not get a two copies of it but references to single object)10:40
cahirwpzalso orm provides query cache, and other optimization like delayed / lazy table loads and so on10:41
cahirwpztansell, are you there ? ;-)10:41
tansellkinda10:41
cahirwpzany comments ?10:42
cahirwpzso far10:42
cahirwpzok - lets continue10:43
tansellI also read logs10:44
cahirwpzorm gives us also a method to express relations between objects so dependencies like cascade update / save / delete are automatically managed10:45
cahirwpzand of course we're given illusion of accessing related object (from another table) as attribute (of type list) of an object10:46
cahirwpzthis is not the end of benefits that we gained using orm ;)10:46
cahirwpzyou can also map not only python objects onto database, but also python collections (sets, lists, dicts)10:47
cahirwpzso in fact we can construct such database backend that is almost transparent to developer of tpserver-py10:48
cahirwpzof course migrating to orm forced me to redesign relations / tables - degree of modification varies10:50
cahirwpzok... I forgot to tell one thing about orm10:51
cahirwpzit also allows us to map linear inheritance onto database10:51
cahirwpzas finish word I can say - after rewrite to orm - developer will be freed of thinking about database and will be able to focus on more crucial things like rich ruleset development10:55
cahirwpzminor things:10:59
cahirwpzconfiguration mechanism - each component can be configurable, there's configuration holder which can analyse configurable parameter and fill them in using for example command line (adding INI / XML file should be very easy)11:00
cahirwpzadministration tool - old was completely rewritten, new one has nice command line interface (readline based, so completion works), commands can be easily added when needed11:01
cahirwpzthat's all I found till now11:02
cahirwpzthere's also one thing upcoming - ruleset actions refactoring11:02
cahirwpztansell, I need to leave in 30-45 minutes, so it might be the right moment if you started asking questions11:03
cahirwpztansell, maybe I should get up a little earlier tomorrow and we will start discussion about 9:00 CEST ?11:10
bisccahirwpz: you can try getting up earlier. At mornings tansell is usually more available.11:12
cahirwpzbisc, in the morning I'm usually more sleepy and absend-minded :/11:13
cahirwpzanyway I'm usually available since 9-10 CEST (17-18 EST+8)11:14
bisccahirwpz: you can write your speech in the evening and receive valuable input the next day. At least, that's better than nothing11:14
cahirwpzbisc, good idea - it will be a good background for a discussion if mithro read a longer "speech" about changes, browsed current source code and my wiki11:17
bisccahirwpz: hope you reach some compromise about all these changes.11:21
cahirwpzbisc, hope so, it'd be very unfortunate if such code was thrown out11:24
cahirwpzbisc, thanks11:24
bisccahirwpz: never mind :)11:24
cahirwpzlater all, need to go to the university for a few hours...11:26
*** cahirwpz has quit IRC11:26
*** bisc has quit IRC13:48
ezodtansell: ping14:25
*** Agon has joined #tp15:40
*** Epyon has joined #tp16:07
*** null_000 has joined #tp16:29
*** Erroneous has joined #tp17:19
*** Agon has quit IRC17:42
*** glew has joined #tp18:09
*** null_000 has quit IRC18:49
*** null_000 has joined #tp18:59
null_000hi all18:59
*** null_000 has quit IRC19:05
*** StupidIncarnate has joined #tp19:15
*** llnz has joined #tp20:31
llnzmorning all21:41
epyon-kitsunemorning, llnz21:41
epyon-kitsunealthough it's almost midnight here :>21:41
llnzhehe21:42
ezodglew: did you resolve the makefile issue?21:45
ezodllnz: ^21:45
llnzyes, he has sqlitepersistence compiling completely now21:45
llnzjust warnings given21:45
ezodawesome, thanks :)21:45
llnzyeah21:46
ezodi'm excited to see the client stuff progress once sqlite is ready21:48
ezodit will be a lot of work but i can help more with that21:50
llnzcool21:55
Epyonhmm, I assume the SQLite doesn't affect me for now?21:58
llnznope22:00
llnzI will worry about the integration of the sqlite22:00
llnzit should be easier than mysql :-)22:01
*** Vadtec has quit IRC22:12
*** Vadtec has joined #tp22:13
*** cahirwpz has joined #tp22:23
*** cahirwpz has quit IRC22:43
*** Epyon has quit IRC22:56
*** Epyon has joined #tp22:57
glewezod: hey, was afk, working on figuring out where the sqlite db is made, and if i can get it to output to a absolute path23:09
llnzglew set the database to an absolute path23:41
llnzit will probably set it to the working dir otherwise23:42
glewllnz: any suggestions on where to put the database file?23:42
llnzanywhere you want (and have access to)23:42
glewok23:42
llnz/var/tmp is an option23:42
glewok23:42
glewthanks23:42
tansellezod, pong?23:43

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!