prologic | even'n all | 07:39 |
---|---|---|
Yama | mornin^ | 07:45 |
*** Osso has joined #circuits | 12:42 | |
prologic | pdurbin, so as it turns out (after some rethinking) I was able to use Redis afterall to store state | 13:18 |
prologic | so far working quite well | 13:18 |
prologic | solved the edge cases I ran into | 13:18 |
prologic | storing/serializing socket objects to uniquely identify clients | 13:18 |
prologic | the the recursion problem I was running in to | 13:18 |
prologic | *nods* | 13:24 |
prologic | there are a couple of annoyances with the redisco mapper library I'm using | 13:25 |
prologic | namely the repr function can cause recursion problems | 13:25 |
prologic | if you have say one model that refereences another which references the first | 13:25 |
prologic | e.g: | 13:25 |
prologic | User -> Channels (many-to-many) | 13:25 |
prologic | and | 13:25 |
prologic | Channel -> User (many-to-many) | 13:25 |
prologic | so maybe I should figure out a way of fixing this in the general case and submit a PR upstream for redisco :) | 13:26 |
prologic | the other annoyance is ReferenceFields | 13:26 |
prologic | references to other models | 13:26 |
prologic | don't get saved automatically when the parent gets saved | 13:26 |
prologic | so you have to do: | 13:26 |
prologic | user = User(sock=sock, nick="foo") | 13:26 |
prologic | user.save() | 13:27 |
prologic | userinfo = UserInfo(...) | 13:27 |
prologic | userinfo.save() | 13:27 |
prologic | user.userinfo = userinfo | 13:27 |
prologic | user.save() | 13:27 |
prologic | you can see how this kinda sucks | 13:27 |
prologic | defeats the purpose of DRY :) | 13:27 |
pdurbin | A Python Library for Simple Models and Containers Persisted in Redis | 13:43 |
pdurbin | https://github.com/kiddouk/redisco | 13:44 |
pdurbin | cool | 13:44 |
prologic | yeah | 13:46 |
prologic | it's an object mapper | 13:46 |
prologic | you know, convenience and abstraction ftw :) | 13:46 |
pdurbin | an ORM | 13:47 |
prologic | without the R part | 13:49 |
prologic | strictly speaking Redis ia a key/value store | 13:49 |
ircnotifier_ | 4b8309c13b1e by prologic: Add a default signal handler to the Debugger | 13:50 |
prologic | pdurbin, looks like I have the state consistency right | 14:09 |
prologic | /server arrow.shortcircuit.net.au | 14:09 |
prologic | :) | 14:09 |
Yama | hi | 15:32 |
*** Osso has quit IRC | 17:15 | |
*** theo_dore has joined #circuits | 18:53 | |
*** realzies has quit IRC | 19:45 | |
*** Guest2171 has joined #circuits | 19:48 | |
Yama | gn8 | 21:28 |
pdurbin | state consistency is good | 22:54 |
prologic | pdurbin: it’s necessary :) | 23:26 |
prologic | I guess I’m going to have to pause for a bit now | 23:27 |
prologic | and write more integration tests to test the protocol side of things for compliance | 23:27 |
prologic | as well as testing state consistency | 23:27 |
prologic | two very important things not to break :) | 23:27 |
pdurbin | good to test it :) | 23:28 |
Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!