*** tpb has joined #tp | 00: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#gettinghelp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** jnengland77 has quit IRC | 00:11 | |
llnz | afternoon all | 00:17 |
---|---|---|
alanp | womp womp | 00:59 |
*** Erroneous has quit IRC | 01:25 | |
*** nash has joined #tp | 01:34 | |
*** verhoevenv has quit IRC | 01:39 | |
llnz | glew: cool to hear that sqlitepersistence compiles | 03:18 |
glew | llnz, yeah now i'm trying to find out if and where it made the database | 03:19 |
*** StupidIncarnate has joined #tp | 04:09 | |
*** llnz has quit IRC | 04:16 | |
*** glew has quit IRC | 04:32 | |
*** mithro has joined #tp | 05:23 | |
*** cahirwpz has joined #tp | 07:08 | |
*** Epyon___ has quit IRC | 07:10 | |
*** StupidIncarnate has quit IRC | 07:24 | |
*** bisc has joined #tp | 08:38 | |
bisc | mithro, tansell: ping | 08:46 |
tansell | bisc, pong | 08:53 |
bisc | tansell: 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 |
tpb | Title: Issue 80001: Autogenerated files update. - Code Review (at codereview.mithis.com) | 09:05 |
*** verhoevenv has joined #tp | 09:12 | |
cahirwpz | tansell, ping? | 09:12 |
tansell | cahirwpz, I'm about to disappear | 10:09 |
cahirwpz | :/ | 10:09 |
cahirwpz | tansell, till tomorrow I hope, not for longer ? | 10:09 |
tansell | yeah, going home for the night | 10:10 |
tansell | bisc, 80001 looks okay except there is an extra file | 10:10 |
bisc | tansell: what do you mean? | 10:11 |
bisc | which file is not needed? | 10:11 |
tansell | windows/xrc/GameSetupWizard.py | 10:11 |
bisc | tansell: why not? don't we use generation for this one? | 10:12 |
tansell | well, it can't be used as it's comparing to an empty file | 10:12 |
*** mithro has quit IRC | 10:12 | |
tansell | cahirwpz, did you managed to make that list? | 10:13 |
cahirwpz | tansell, partially on paper | 10:13 |
cahirwpz | tansell, I captured most of important things, only details are missing | 10:14 |
bisc | tansell: ok | 10:15 |
tansell | cahirwpz, so I'll be here for a little longer - why don't you start listing them off? | 10:18 |
cahirwpz | ok - firstly I decided to separate packet creation / marshalling / demarshalling from database | 10:20 |
cahirwpz | in other words - I treat database as a model, ruleset as controller, and protocol as view | 10:21 |
cahirwpz | each of those three should be separated from each other as much as possible | 10:21 |
cahirwpz | this means that no class which represents database object can be mixed with functionality of creating or being created from network packet | 10:22 |
cahirwpz | this implies removing all from/to_packet methods from tp.server.bases classes | 10:23 |
cahirwpz | this idea is still not fully implemeted but as soon as I solve all problems with database design this will be done very quickly | 10:23 |
cahirwpz | 2nd major thing: | 10:24 |
cahirwpz | protocol handling was divided into a few parts: | 10:25 |
cahirwpz | listeners - those are classes that accepts connection on different port and when transport (connection object) is created it assign proper protocol (connection data handler) to it | 10:26 |
cahirwpz | we need a few low-level protocols because of tunneling (over SSL / HTTP / HTTPS) | 10:27 |
cahirwpz | on top of low-level protocol I implement raw TP protocol | 10:27 |
cahirwpz | raw TP protocol is not aware of datagram format or syntax - it only analyses header and reads as much data as was specified as payload length | 10:28 |
cahirwpz | after raw TP protocol was read it's forwarded to high-level TP protocol handler | 10:28 |
cahirwpz | (in fact it's not called protocol but client session handler) | 10:29 |
cahirwpz | client session handler receives decoded TP protocol packets, and send decoded packets (they're encoded to binary in lower part) | 10:30 |
cahirwpz | so basically structure of protocol handling is highly layered with each layer strongly separated from each other | 10:30 |
cahirwpz | each layer has well defined functionality and serves purpose not only of converting data but also filtering (for example malformed packets) | 10:31 |
cahirwpz | ClientSession 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 IRC | 10:34 | |
cahirwpz | responsibilities in client session class isn't fixed for now, but I suppose the overall design is relatively good | 10:36 |
cahirwpz | 3rd major thing: | 10:36 |
cahirwpz | whole database backend was / is being converted to sqlalchemy.orm | 10:36 |
cahirwpz | sqlalchemy.orm simplifies database object management enormously | 10:37 |
cahirwpz | orm automatically keeps track of changes in objects and knows which one should be written back to database | 10:39 |
cahirwpz | moreover 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 |
cahirwpz | also orm provides query cache, and other optimization like delayed / lazy table loads and so on | 10:41 |
cahirwpz | tansell, are you there ? ;-) | 10:41 |
tansell | kinda | 10:41 |
cahirwpz | any comments ? | 10:42 |
cahirwpz | so far | 10:42 |
cahirwpz | ok - lets continue | 10:43 |
tansell | I also read logs | 10:44 |
cahirwpz | orm gives us also a method to express relations between objects so dependencies like cascade update / save / delete are automatically managed | 10:45 |
cahirwpz | and of course we're given illusion of accessing related object (from another table) as attribute (of type list) of an object | 10:46 |
cahirwpz | this is not the end of benefits that we gained using orm ;) | 10:46 |
cahirwpz | you can also map not only python objects onto database, but also python collections (sets, lists, dicts) | 10:47 |
cahirwpz | so in fact we can construct such database backend that is almost transparent to developer of tpserver-py | 10:48 |
cahirwpz | of course migrating to orm forced me to redesign relations / tables - degree of modification varies | 10:50 |
cahirwpz | ok... I forgot to tell one thing about orm | 10:51 |
cahirwpz | it also allows us to map linear inheritance onto database | 10:51 |
cahirwpz | as 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 development | 10:55 |
cahirwpz | minor things: | 10:59 |
cahirwpz | configuration 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 |
cahirwpz | administration tool - old was completely rewritten, new one has nice command line interface (readline based, so completion works), commands can be easily added when needed | 11:01 |
cahirwpz | that's all I found till now | 11:02 |
cahirwpz | there's also one thing upcoming - ruleset actions refactoring | 11:02 |
cahirwpz | tansell, I need to leave in 30-45 minutes, so it might be the right moment if you started asking questions | 11:03 |
cahirwpz | tansell, maybe I should get up a little earlier tomorrow and we will start discussion about 9:00 CEST ? | 11:10 |
bisc | cahirwpz: you can try getting up earlier. At mornings tansell is usually more available. | 11:12 |
cahirwpz | bisc, in the morning I'm usually more sleepy and absend-minded :/ | 11:13 |
cahirwpz | anyway I'm usually available since 9-10 CEST (17-18 EST+8) | 11:14 |
bisc | cahirwpz: you can write your speech in the evening and receive valuable input the next day. At least, that's better than nothing | 11:14 |
cahirwpz | bisc, 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 wiki | 11:17 |
bisc | cahirwpz: hope you reach some compromise about all these changes. | 11:21 |
cahirwpz | bisc, hope so, it'd be very unfortunate if such code was thrown out | 11:24 |
cahirwpz | bisc, thanks | 11:24 |
bisc | cahirwpz: never mind :) | 11:24 |
cahirwpz | later all, need to go to the university for a few hours... | 11:26 |
*** cahirwpz has quit IRC | 11:26 | |
*** bisc has quit IRC | 13:48 | |
ezod | tansell: ping | 14:25 |
*** Agon has joined #tp | 15:40 | |
*** Epyon has joined #tp | 16:07 | |
*** null_000 has joined #tp | 16:29 | |
*** Erroneous has joined #tp | 17:19 | |
*** Agon has quit IRC | 17:42 | |
*** glew has joined #tp | 18:09 | |
*** null_000 has quit IRC | 18:49 | |
*** null_000 has joined #tp | 18:59 | |
null_000 | hi all | 18:59 |
*** null_000 has quit IRC | 19:05 | |
*** StupidIncarnate has joined #tp | 19:15 | |
*** llnz has joined #tp | 20:31 | |
llnz | morning all | 21:41 |
epyon-kitsune | morning, llnz | 21:41 |
epyon-kitsune | although it's almost midnight here :> | 21:41 |
llnz | hehe | 21:42 |
ezod | glew: did you resolve the makefile issue? | 21:45 |
ezod | llnz: ^ | 21:45 |
llnz | yes, he has sqlitepersistence compiling completely now | 21:45 |
llnz | just warnings given | 21:45 |
ezod | awesome, thanks :) | 21:45 |
llnz | yeah | 21:46 |
ezod | i'm excited to see the client stuff progress once sqlite is ready | 21:48 |
ezod | it will be a lot of work but i can help more with that | 21:50 |
llnz | cool | 21:55 |
Epyon | hmm, I assume the SQLite doesn't affect me for now? | 21:58 |
llnz | nope | 22:00 |
llnz | I will worry about the integration of the sqlite | 22:00 |
llnz | it should be easier than mysql :-) | 22:01 |
*** Vadtec has quit IRC | 22:12 | |
*** Vadtec has joined #tp | 22:13 | |
*** cahirwpz has joined #tp | 22:23 | |
*** cahirwpz has quit IRC | 22:43 | |
*** Epyon has quit IRC | 22:56 | |
*** Epyon has joined #tp | 22:57 | |
glew | ezod: hey, was afk, working on figuring out where the sqlite db is made, and if i can get it to output to a absolute path | 23:09 |
llnz | glew set the database to an absolute path | 23:41 |
llnz | it will probably set it to the working dir otherwise | 23:42 |
glew | llnz: any suggestions on where to put the database file? | 23:42 |
llnz | anywhere you want (and have access to) | 23:42 |
glew | ok | 23:42 |
llnz | /var/tmp is an option | 23:42 |
glew | ok | 23:42 |
glew | thanks | 23:42 |
tansell | ezod, pong? | 23:43 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!