IRC Logs for #circuits Thursday, 2016-10-06

*** JDallas has joined #circuits01:06
*** ke4roh has joined #circuits01:57
*** Coldblackice has joined #circuits02:05
*** Coldblackice has quit IRC02:06
*** ke4roh has quit IRC03:46
*** JDallas has quit IRC04:21
prologicriot: re websocket streaming. do you see any errors on the server-side?05:05
*** braoru has joined #circuits05:12
braoruhello :-)05:15
braoruI'm still here fighting with circuits (I don't give up easily :_))05:15
prologicdon't fight :)05:22
prologicit's a pretty easy to use framework05:22
prologicso you were saying success events take 30s to fire?05:22
prologicthat might be because the actual underlying event itself blocked for 30s05:22
prologicwhich is bad as you know :) if you have large blocking event handlers you really should start thinking about using Worker pools05:23
braorubut same for the workerpool05:38
braoruwhen rokler hit return05:38
braoruit's need 20-30s for the call to return05:38
braoruquite annoying :)05:39
braorubut it's certainly due to me I think.05:39
braoruis that normal there are no track of core.pool in the code ?05:49
prologicdo you have an example showing this?06:01
braoruhoo i see on the worker code whats it's done06:02
braoru"circuits.core.pools" but in fact it's just at the worker creation here :
braoruthe idea is to build some kind of "task" systems .. I just need the first post to ensure me that everything started and return an id :) so I need like a simple transaction but it's blocking (within the event handler of the request)06:04
braorubut I think I just try to work as I would with an eventloop but it's not06:05
braoruI try to worker but can't spot why it's not starting
braoruwronf sample :
prologicokay two things06:17
prologicdon't run your app in thread mode06:17
prologicjust App().run()06:17
prologicand you're fireing a work() event?06:17
prologicyou should be fireing a task() event06:17
prologicalso what you're firing at is None06:18
prologicsorry you are using task() :)06:18
prologicyou're on the right track anyway keep at it :)06:19
braoruif I fire a task I get06:21
braoru can only join an iterable :-)06:21
braoru new one :-)06:22
prologicI need to see a traceback or some debug logs :)06:24
braoruif I replace the call by a fire (to be non blocking) i get the task event fired with nonde06:27
braorummh sorry sorry I think I see why06:27
prologicDon't use JSONController :)06:28
prologicit clearly wasn't designed for this06:28
prologicyou'll have to do your own serialization06:28
prologicI recommend you do it as a filter on the response event06:28
prologictry to think (when writing circuits code) in terms of asynchronous events :)06:29
prologicfire and react :)06:29
braoruit's the goal06:30
braorubut what I need is just to deal with the first interaction06:30
braorulike creation a task (chain of event) and returning an id to be able to make query later06:30
braorubut then how you work with crud like task where you have to query something before responding ?06:30
prologicno you're on the right track :)06:31
prologicjust don't use JSONController06:31
prologicit was designed for more simple use-cases06:31
braorushould I use the BaseController ?06:33
prologicthat's probably safer06:38
prologicit doesn't do any magic :)06:38
prologicbe aware that circuits.web was hacked together from pieces of BaseHTTPServer (Python std. lib), CherryPy and other bits and pieces06:39
prologicso you may have to write your own dispatcher (maybe)06:39
prologicif you get too fancy :)06:39
prologicbut I did write the backend for completely in circuits06:39
prologicwhich has a full RESTful API :)06:40
braoruCurrently I use pykka actors when I have to deal with heavy-long running (require multiple messages) task. Would it be better to includre them in my components as I would with worker or to include a component within each of my actors ?07:03
braoruor both07:03
braoruor I could simply create and detroy small component on the fly. But I would like to avoid having "event_name" created on the fly to query a single instance07:05
braorubut first ... I have to make the basecontroller work and stopping sending 404 ..07:14
braoruok then .. a basic controller : but still get error when using call :)
riotprologic: no, not really. Even with the debugger running.09:06
riotprologic: i built a minimal testcase:
braoruI have a new test : but ending up there .. I don't know why MyController does not have request member anymore if I use a call09:13
braoruwithin the POST handler09:13
braoruthere should be a way to make the controller part non-blocking with some kind of coroutine like approach09:42
braorumy problem seem to be a request_value_changed fired from I don't know where ..09:46
*** ke4roh has joined #circuits12:36
*** ke4roh_ has joined #circuits13:00
*** ke4roh has quit IRC13:03
braorumy sample with pykka actors referencing a part the the composed centra APP component seem to work :)14:26
braoruactors can react to event by translating them to message and actors can send event14:26
braoruprologic, tomorrow I clean a little bit my sample and I post it here to get some reviews .. (it's not clean but at least it's a first working poc :))14:28
*** dongge has joined #circuits14:38
*** braoru has quit IRC14:39
*** ke4roh__ has joined #circuits14:45
*** ke4roh_ has quit IRC14:48
prologicriot: are there any hints in the debug log output as to what's going on with the stream?14:55
*** dongge has quit IRC15:20
*** jgiorgi has joined #circuits15:22
*** Coldblackice has joined #circuits15:38
riotprologic: have a look:
riotprologic: if you have a few minutes, i suggest grabbing the debugging-tool, its got no deps, except circuits15:46
*** ke4roh__ has quit IRC20:54
*** ke4roh__ has joined #circuits23:51

Generated by 2.14.0 by Marius Gedminas - find it at!