IRC Logs for #circuits Friday, 2013-03-15

*** Osso has joined #circuits00:53
*** mehere has quit IRC03:38
*** mehere has joined #circuits03:43
*** Osso has quit IRC04:20
*** Osso has joined #circuits04:25
prologicHey Osso04:34
Ossohello!04:34
prologicI dunno if spaceone is around yet04:35
prologicBut I added a new feature to circuits.core04:35
prologicnon-breaking that is04:35
prologicIf you check the commit history04:35
prologicI've added an additional optional kwarg to the Error event fired by exceptions04:36
prologicthis allows me to solve a problem spaceone reported04:36
prologicone in which bad requests or just garbage thrown at circuits.web would cause it go throw an exception04:36
prologic-but- never respond to the client04:36
prologicso this completes that loop04:36
prologicon an "error" event handler. e.eg:04:37
prologic@handler("error")04:37
prologicdef _on_error(self, etype, evalue, etraceback, handler=None, fevent=None):04:37
prologicfevent refers to the "Failed Event"04:37
prologicNow that being said04:37
prologicI'm not 100% sure we should guard against basically "bad clients" necessarily04:37
prologicI'm in two minds about this04:37
OssoI remember that04:52
Ossothe problem with error handler04:52
Ossoagainst bad clients we should give whatever response is appropriate04:52
Ossowe are missing a lot of that error handling04:53
Ossothere's status codes for many of errrors04:53
Ossoheaders too long etc04:53
Ossothough to be honest in the real world a specific status is useless04:53
Ossojust invalid request ought to be enough04:54
Ossomaybe someone has a specific use for more codes !04:54
prologicwell04:56
prologicI think we should implement as much of the standard as we can04:56
prologicand as much as spaceone finds04:56
prologicand is reasonable04:57
prologicbeing more tolerant to the request line for example we should do04:57
prologicand being tolerable to bad headers I'm ok with04:57
prologickinda stupid but "meh"04:57
prologic-but- at least now with what's in dev04:57
prologicany future exceptions a response is given to the client04:57
prologicwith a complete traceback04:57
prologicI just grab the socket from the failed event04:58
prologiccreate a fake request/response obejct (before one is not available at that point)04:58
prologicand send a 500 response04:58
prologicsee there are two cases here04:58
prologic1) We fire a request, in which cases failed requests/responses are fired to RequestFailed and ResponseFailsed respectively04:59
prologic2) We never get to firing the request, in which case Error is fired and we have to work out what the client socket was (from the failed event) and create fake request/response objects and send an error response to the client04:59
prologicspaceone, ping?08:14
spaceoneprologic: pon08:18
spaceoneg08:18
spaceonelet me read08:18
spaceonedone08:20
prologiccool08:21
spaceoneprologic: so, did you now understand teh HTTP(S) thing?08:21
prologicso the issue if things not responding due to bad requests should be resolved08:22
prologicyeah08:22
prologicgetting to that :)08:22
spaceoneokay#08:22
prologicI'm playing with http_parser atm :)08:22
prologicwith good results so far08:22
spaceonehm08:23
spaceonedo we really need it?08:23
spaceoneit has only one exception if the request is invalid, so we can't differ between 505 or 40008:23
spaceoneexcept we parse the string from the exception :D08:24
prologiceh?08:25
prologicdo we need what sorry?08:25
spaceonedifferentiate*08:25
prologicno I don't think so08:25
prologicany brokenness should just return 400 Bad Request08:25
prologicihmo08:25
prologicbut we can guard "some" things08:25
prologiclike be lenient of the first line08:26
spaceonenot the brokeness, that the client requested a wrong protocoll version08:26
prologicand headers08:26
prologicoh08:26
prologichmm not sure atm08:26
spaceoneall other things are 40008:26
prologicI'm getting really tired :)08:26
prologic2am here08:26
spaceoneoh08:26
prologicgn08:36
spaceonegn808:37
*** Osso has quit IRC11:12
*** ronny_2 has joined #circuits11:13
*** ronny_ has quit IRC11:17
*** Osso has joined #circuits11:30
*** Osso has quit IRC12:39
*** Osso has joined #circuits13:03
*** Osso has quit IRC13:40
prologichmmm13:43
prologicsooo tired13:43
prologicshouldn't have stayed up so late13:43
prologicbut the http_parser experiment has turned out rather well though13:43
prologiconly problem is it lacks the .elements method on the headers object/dict13:44
ronny_2prologic, elements?13:54
ronny_2also night i think13:55
*** ronny_2 has quit IRC14:15
*** Guest99624 has quit IRC15:10
jgiorgii think i might have just got a job where i can convince the firm to use circuits :D15:36
spaceoneprologic: why did you decide to Server(secure=True) instead of SSLServer() ?15:46
*** christopher has joined #circuits16:03
prologicspaceone, because it only changes the way the socket is bound?16:52
prologicjgiorgi, cool :) sounds exciting16:52
jgiorgiprologic: yeah i'm phsyced, they currently use Django but I showed them what i could do in circuits and they went through the roof16:53
spaceonebtw. i never looked at django.. how is django?16:56
prologicjgiorgi, really? wow!17:04
prologicwhat exactly did you show them that impressed them about circuits?17:05
prologicspaceone, django is a mega framework17:05
prologicgreat if you want to whip things up quickly17:05
jgiorgispaceone: django is very flexible in what it can do but very rigid in how it lets you do it17:12
jgiorgiif you want to get something done right now django has a module that does 99% of the work for you17:12
jgiorgiprologic: just showed them how i could drop in modules easily, one framework could do more than just websites17:13
prologicthat's quite often the problem with large frameworks though17:13
prologicit'll do 90% of the things you want17:13
prologicbut it's that 10% that's hardest to get done17:14
prologicbecause you have to fight the fraemwork17:14
jgiorgii have a module/plugin system that is particularly impressive and couldnt work without circuits17:14
prologicdig deep into it's code17:14
prologicmonkeypatch aroudn ietc17:14
prologicetc17:14
jgiorgiyeah and i just hate how you -must- organize your code in this way or do this with this backend17:14
prologicjgiorgi, published somewhere?17:14
prologicyour plugin/module system?17:15
jgiorgiunless of course you want to drastically reconfigure the framework or implement something yourself over the framework (in which case why use a framework)17:15
jgiorgiprologic: no, but i can show it to you17:15
prologicwell it's just I'd like to build that into circuits.core17:15
prologicmechanisms to load componetns at runtime from eggs, paths, etc17:15
jgiorgimine is a main script, has to be copy/pasted into the project17:16
jgiorgibut i'm sure it could be adapted it essentially loads core modules, then loads plugins (based on the config) and runs in a daemon, thread, process, multiple process, w/e the config says17:17
prologick17:19
jgiorgihttp://circuits.codepad.org/6EMbV7zA17:20
prologichave you thought about contributing some of your efforts back to circuits btw?17:20
prologicyou surely must have made some improvements?17:20
prologicsome reusable components you regularly use?17:21
jgiorgicopied from one of the projects that uses it, not fully tested and needs some cleanup17:21
jgiorgiI have a lot of reusable components i plan to publish once i gather them all into a library (most of them are scattered about)17:21
prologicahh i see17:22
jgiorgiif any of them are worthy of integration into circuits I'd be happy to adapt them for that purpose17:22
prologicyour approach is quite simple17:22
prologicand suits your needs17:22
prologicnice17:22
jgiorgiclean, simple and based on a human-readable config file17:22
prologic*nods*17:23
jgiorgilocally i call the library FrankenCircuits, it's closed at the moment but when i get a couple hours to make it useful i'm publishing it17:23
jgiorgisimple components like authentication management without redundant code (intercepts the Request event)17:23
prologicta da17:25
prologicall 99 web tests pass17:25
prologicwith http_parser17:25
jgiorgisweet17:26
prologicspaceone, ping? :)17:29
spaceoneprologic: pong17:29
prologicdid you hear?17:30
prologicI got http_parser working17:30
prologicall tests pass17:30
spaceonethe http parser thing17:30
prologic:)17:30
spaceoneyep17:30
prologicahh nuts17:49
prologicI need some help17:49
prologicusing cgi.FieldStorage on Python 3 sucks17:49
prologicit's oh so horribly broken17:49
*** FSX has joined #circuits21:53
prologicping?23:49

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!