IRC Logs for #circuits Tuesday, 2014-08-19

*** sapiosexual has quit IRC02:32
*** sapiosexual has joined #circuits04:10
ircnotifier_db542ff97d78 by prologic: Use the new custom signal event handling to cleanly shutdown the circuits.web app after 3s04:48
*** sapiosexual has quit IRC05:26
*** sapiosexual has joined #circuits05:34
*** koobs has quit IRC08:39
*** koobs has joined #circuits08:43
*** koobs has quit IRC10:15
*** koobs has joined #circuits10:38
*** sapiosexual has quit IRC11:26
prologicI guess Mongo has turned out alright so far13:44
prologicit works13:44
pdurbinworking is good13:48
*** qwebirc7758 has joined #circuits13:56
*** qwebirc8687 has joined #circuits13:56
prologicpdurbin, well it works remarkably well actually13:56
prologichi qwebirc8687 and qwebirc775813:57
pdurbineven better13:57
prologicI'm actually surprised a bit by the good performance13:58
prologicI thought the performance hit by hitting mongo would be a lot higher13:58
pdurbinit all depends on the nature of the queries, I guess13:58
prologicI can probably use internal LRU cache(s) in some places on the app side too13:59
prologicmost of them are (excuse the Pythonic mongoengine)13:59
prologica few object creations and saves obviously as users/channels get created and destroyed13:59
prologicI wasn't exactly sure why I should even bother with a shared db for application state14:00
prologicbut *I think* it will let me do things like spawn another server instance (or more) using the same state14:00
prologicwould that just contends writes to the mongodb?14:01
pdurbin#foo... hashtag or irc channel? ;)14:14
prologicirc channel14:16
pdurbinirc server. nice14:21
*** qwebirc8687 has quit IRC14:34
prologicpdurbin, speaking of which14:41
prologicI believe I've just decided finally against a shared database for storing state14:42
prologicI'm running into edge cases :/14:42
*** qwebirc7758 has quit IRC14:42
prologicafaik mongo isn't a transaction db14:42
prologicso can't guarantee atomicity14:42
prologicso I think I'll throw away that branch of code14:43
prologicit also adds a layer of complexity14:43
prologicfor instnace you have to wait for mongo to come up14:43
prologicbefore the server can start listening for connections14:43
pdurbinso how are you going to store state?14:46
prologicthe way I was before14:47
prologicdict + cidict + bidict14:47
prologicactually I only use cidict for plugins14:48
prologicdict + bidict for everything else14:48
prologiccidict == case insensitive dict14:48
prologicdict == normal python dict14:48
prologicbidict == bidirectional dict / mapping14:48
prologicthe user/channel structure is just stored in memory on the core14:48
prologic{"users": ..., "channels": ...}14:49
prologicand a users attribute on the core that's a bidict mapping of socket <-> user objects14:49
prologicit's all O(1) lookups14:49
prologicand O(n) membership tests (user in channel)14:50
prologicO(n) for nick collision detection as well14:50
*** kdb has joined #circuits14:53
*** kdb has quit IRC14:54
*** kdb has joined #circuits14:54
pdurbinpython dictionaries. ok. but state is not persisted in a database?15:06
prologicI can't make it work very well15:14
prologicat least not nicely15:14
prologicdunno I tried redis + redisco and rom (object mappers/models)15:17
prologicrun into bugs with those libraries15:17
prologicI'm sure redis itself would be fine with pyredis15:17
prologicbut you'd basically be just storing straight up key/value pairs15:17
prologicthen tried mongo + mongoengine15:18
prologicbetter modeling, no bugs I ran in to15:18
prologicbut keep getting inconsistent state15:18
prologicdespite the right .save() calls and .delete() calls etc15:18
prologic^^^ maybe I'm doing something wrong?15:20
pdurbinI've got nuthin'15:36
*** ninkotech has quit IRC16:18
*** ninkotech has joined #circuits16:19
kdbHeya ninkotech16:19
*** kdb has quit IRC16:47
*** Romster has quit IRC20:16
*** Romster has joined #circuits20:21
*** dxy has joined #circuits20:49
prologicmorn’n all21:25
*** dxy has quit IRC21:36
*** sapiosexual has joined #circuits22:08

Generated by 2.11.0 by Marius Gedminas - find it at!