IRC Logs for #circuits Saturday, 2017-01-14

prologicapollo13: hey03:53
prologicyeah we're around03:53
prologicshoot!03:53
prologicapollo13: re rpcv2 ... so the way circuits (in general) works is if you can't make it bakcwards compat with the existing component, then write a new one and submit a PR04:02
prologicbut make it compatible with the same events in/out so that you can swap the component out with no code changes to the rest of your system/application04:02
apollo13prologic: ok, in this case rpcv2 should be backwards compat in the sense that I could upgrade the existing one to support both (with one or two conditionals)10:52
apollo13prologic: still around? :D10:52
apollo13or do timezones fuck up everything again^^10:52
apollo13btw when joining this channel I get "* Channel #circuits url: http://bitbucket.org/prologic/circuits/" -- maybe wanna change that to bb?10:53
apollo13I like what I see so far, but I'd like to know a little bit more about the community. Ie how active is circuits, this channel seems rather dead and from the release history it seems to be getting some checkins lately but was dead (?!) since 2014. I can't get the tests running locally with weird errors (didn't look closely yet), but those errors surprise me if they even run on the CI…11:00
apollo13then there are some more general questions on usage, but I guess I have just to play a little bit more with it.11:01
apollo13the reason why I am asking all this, is that if I start using circuits, I'd have (some) commercial interest behind it -- which in my case also means that I get to spend time on circuits if I see the need to improve it or run into bugs11:02
apollo13that obviously only works if pull requests get merged, preferably with releases pushed relatively timely so I do not have to build everything internally.11:04
apollo13fwiw, none of that was ment as critique, it is mainly curiosity. I am also working on Django, so I do know the ups and downs of open source projects. And from Django I've also learned that the community behind a project is probably more important than the code, hence those questions…11:11
*** markb1 has quit IRC13:22
spaceoneapollo13: you can just ask your questions here, me or prologic will probably answer. maybe this takes some days. if you highlight me, it's faster. it's good if you provide code examples in your question. if you have reproducible scripts which show a bug i am willing to investigate and fix them.15:55
spaceonethe curcuits community i think doesn't really exists, here and there are some issue reports, ...15:55
spaceonei would like to do more but i have to much work and as long as nobody else is active i don15:56
spaceonet fell like i want to do more15:56
apollo13spaceone: well, I am perfectly fine trying to fix the bugs I run into myself -- after all if I am going to use circuit, I should understand it :D what are you using circuit for?15:58
spaceoneapollo13: i created a framework for building HTTP services, called circuits.http. all my websites are using it15:59
spaceonei like the component architecture and the socket stuff16:00
apollo13oh, neat -- though given my Django background: why your own framework instead of something already out there?16:00
spaceoneand the event system. i had a look at some other frameworks (twisted, django, cherrypy, ...) but they all suck in my opinion16:00
apollo13yeah the component architecture allows for nice things once you wrap your head around16:01
apollo13twisted is nice but weird, circuits feels more highlevel16:01
spaceonemaybe tornado is also nice16:01
apollo13well I need something which can do tcp, not just a webserver, so…16:01
apollo13even though tornado can do raw tcp servers too (At least the base classes are there)16:02
apollo13but what all miss is imo the eventing system16:02
apollo13I am not yet sure if I understand it fully, but well :D16:02
spaceonefor me it is important that the protocol is encoupled from the socket/connection things, that error handling is easy possible, that the base has a real secure design, that the code has no redundancy16:02
spaceonethat one can do everything what is possible with the protocol16:03
apollo13right16:03
spaceone(e.g. easy websocket support, ...)=16:03
apollo13though the abstractions seem to be somewhat leaky16:03
spaceoneand that it doesn't abuse the protocol-syntax and semantic rules16:03
apollo13at least for JSONRpc it seems to make strong assumptions on http16:03
spaceonewell, i don't use circuits.web !16:03
spaceone(circuits.web is in my opinion not good)16:04
apollo13well, for the web stuff I would use django anyways, circuits.web showed me at least how a few things can be done16:04
spaceoneand i want that things are easy to use, the interface should be nice and pythonic16:04
spaceoneand very important is also all the encoding stuff, which is done very wrong in most of the frameworks16:05
apollo13yeah, btw events will get handled everywhere as long as the channels match, right?16:05
spaceonewhat are you using circuits for?16:05
apollo13nothing yet, I am planning on building a small ESB with it16:05
spaceone'everywhere'? i think there are limits for interprocess communication16:06
spaceoneat least there was an api change16:06
apollo13with everywhere I ment inside one manager or component hierachy16:06
apollo13but yeah, I didn't look at IPC yet16:06
spaceoneso that there is an IPC event which needs to be send to the other process for the event to be processed there16:06
apollo13yeah but aside from that, every component would get checked, right?16:06
spaceoneas long as it is registered in the tree, yes16:07
apollo13so basically if I were to use two tcp servers (or whatever) I should use different channel names to keep the events "scoped"16:07
spaceoneyes16:07
apollo13and channel names inherit down the tree unless I set a specific one in a component?16:07
spaceoneno, you have to explicit set the channel in every component16:08
spaceoneit might be that it is inherited if it is set to None16:09
spaceonebut i am not completely sure16:09
apollo13ah okay, then my testing was not good enough, will replay what I did16:09
apollo13anyways, we are currently in the situation that we have interfaces to phone systems, hl7 servers and what not and I want to replace all that by circuit and have one logging layer etc…16:10
apollo13basically a system bus for poor people :D16:10
spaceone:)16:10
apollo13I mean zato (https://zato.io/) looks all nice and well but overkill for what we want16:11
apollo13any thoughts on that, also with regard to other frameworks that might suit better, or…16:11
apollo13oh, you are working for ucs?16:12
spaceoneyes16:13
spaceoneyou know UCS?16:13
apollo13briefly looked at it but then decided it would be somewhat overkill for our company16:14
apollo13but I've heard a few good things about it16:14
spaceone:D16:15
spaceonewhy is it overkill?16:15
spaceonei mean you have to decide for something else which is also a operating system16:15
spaceoneand UCS makes the things just easy, you don't need to activate every component16:16
spaceonebut maybe i'm wrong? :D16:17
apollo13yeah, I probably should invest more time into it16:17
apollo13at the time I looked at it, all our services where scattered around, so I slowly started writing ansible scripts to get it all together16:17
apollo13gives me full control on the one hand, but is obviously more work on the other hand16:18
apollo13spaceone: also basic stuff like openvpn had licenses like: "Free commercial use. Some functions or services are liable to costs."16:19
apollo13and I didn't want to check every service about costs16:19
spaceonejeah, one of the usability aspects we can improve16:21
spaceoneat least now we have such license-categories :)16:21
spaceonelike 1 year ago this was more pain :D16:22
apollo13yeah I was looking in like 2008 ?!16:22
spaceoneoh :D16:22
spaceonebut you know http://demo.univention.de/univention-management-console/ ?16:23
spaceonebtw. my girlfriend comes back today, i need to cook for her, so i will leave now. but i am happy to chat the next days again :)16:24
spaceoneour both names are Florian btw :)16:24
apollo13hehe, thanks for your time -- I am looking through UCS a bit currently, might have a few questions :D16:25
spaceoneyep16:26
spaceonealso #univention - the not very used channel :D16:26
prologicwow16:49
prologicsorry lots of backlog to read16:49
prologicyeah I'm in the US16:49
prologicapollo13: anything else I can help answer?16:50
apollo13prologic: not currently, no :D17:08
apollo13I'll just have to play with circuits a bit17:08
apollo13and circuitboard sounds like a good app-name :D17:08
*** markb1 has joined #circuits17:48
prologicapollo13: haha18:22
prologicalso @spaceone is right18:22
prologicin that circuits.web is kind of sucky in places18:22
prologicbut it works (tm)18:22
prologicfor the "why" -- it was cobbled together with bits and pieces of BaseHTTPServer (Python std. lib) and CherryPy18:22
prologicand done so fairly quickly because of how awesome the circuits Component architecture is :)18:23
prologicthey key thing to appreciate and learn about circuits is the Component and the Event'ing18:23
apollo13jupp, I have yet to figure out how to handle failed events18:23
apollo13or put better: which data I want to actually return from my handlers18:24
apollo13but I guess I will just do one/two iterations and see what I can come up with18:24
apollo13the fact that I dynamically can change the components is great18:25
apollo13ie I can disable a service with the click of a button or reload it18:25
apollo13basically what I want to do is to have sources and desitionation (basically a proxy) and transformers in between+18:25
apollo13ie the source goes from wire protocol to an "internal" message format and then the destination converts to it's target wire protocol18:26
apollo13this way our application can speak to circuit with one single protocol and then fan out to whatever our customers are using18:26
spaceonehandling failed events is not so nce imho. because you can't handle a single event but only all failed event with name X18:26
spaceonethere are no deferreds in circuits18:26
apollo13yeah, that is something I think I might miss18:27
apollo13but will have to investigate a bit18:27
spaceoneit would be a nice api to fire an event and declare a success/error handler18:27
spaceonebut maybe there are advantages in the current way, one have to write more generic code?18:28
apollo13when would the error handler be execute?18:28
spaceoneif there is a exception raised inside the event handlers18:28
apollo13ie if one of the handlers raises an exception or anything?18:28
apollo13ah okay18:28
apollo13you currently do not have any access to that right?18:28
spaceonehm, yes you do18:29
apollo13aside from the generic exception event18:29
spaceoneno18:29
spaceoneyou can define a handler foo_failure18:29
spaceonethe event must specify failure = True18:29
spaceoneand then this is executed18:29
apollo13with the list of exceptions?18:29
apollo13or multiple times if multiple handlers failed18:29
apollo13ah wait, foo_failure is executed if the foo handler failed or if .fire(foo()) failed?18:30
spaceonehttps://github.com/spaceone/circuits.http/blob/master/circuits/http/server/server.py#L24818:30
spaceonefoo_handler18:30
apollo13ah right, will did into that18:31
prologicyeah18:31
prologicthere are no deferreds as such but there are promises or chained values18:32
prologicbut no way to callback on success/failure of individual event instnaces18:32
prologicthings are tied to events themselves not particular instances of18:32
prologicbut yeah as you found you can set Event.failure = ("foo_failure", "somechan")18:33
prologicand .success and other "feedback events/channels"18:33
prologicShould be in the docs: http://circuits.readthedocs.io/en/latest/man/index.html18:34
apollo13yeah, I read all of them to get an overview, but will need to reread individual parts18:34
prologic*nods*18:34
apollo13is event.handled an indicator if __any__ handler executed?18:34
prologicyes18:35
apollo13oh wait, that is on the value, not the event18:35
prologicvalues and events are tired together18:35
prologicif you: x = app.fire(Foo())18:35
prologicx is a Value instance tied to the event instance Foo()18:35
prologicand are chained if the handler for Foo() also fires other events18:36
prologicand there's also ways to fire an event on the completion of Foo() and all it's other child events setting Foo.complete should do it I believe18:36
apollo13mhm, I cannot find the code that sets Value.handled to True18:36
prologicFWIW there are extensive tests in tests/core for all the defined behaviour and API18:37
apollo13will read them through18:37
apollo13btw do tests locally work for you?18:37
prologichmm18:37
prologic$ grin '\.handled.*True' circuits18:37
prologiccircuits/web/http.py:18:37
prologic  482 :         req.handled = True18:37
prologicmaybe that isn't a thing :) seems to be a circuits.web specified thing on Request events18:38
apollo13yes, but nothing in core18:38
apollo13I am currently getting https://dpaste.de/413u/raw18:38
apollo13do I need older pytest versions or is this a known issue18:38
prologicyeah tests pass locally for me18:38
apollo13weird18:38
prologicwell most of them; there are a few hard-to-test things (races, timing)18:39
apollo13right, but for me test collection already fails18:39
apollo13due to the skip in test_coroutine on the module level18:40
apollo13https://github.com/circuits/circuits/blob/master/tests/core/test_coroutine.py#L7 that one18:40
prologicweird18:41
prologicare you running against Python 3+ something?18:42
prologicclean virtualenv?18:42
apollo13platform linux2 -- Python 2.7.13, pytest-3.0.5, py-1.4.32, pluggy-0.4.018:42
apollo13I did tox -e py2718:42
apollo13and then just setup.py test to test against my user install, both fail with the same error18:43
prologichmm18:43
prologicgist the error?18:43
apollo13https://dpaste.de/413u/raw18:44
prologichmm18:48
prologicperhaps py.test has changed in a way that breaks collection18:49
prologicmind taking a look further and submitting a PR?18:49
prologicI admit I don't pip install -r ... -U very often18:49
apollo13yeah probably not that weekend, but will try in the office18:50
prologicpytest-2.9.x here18:50
prologicsure thing :)18:50
apollo13pytest-3.0.518:50
apollo13oddly enough I thought travis would run with new venv each time: https://travis-ci.org/circuits/circuits/jobs/19037039418:51
apollo13it has 2.6 there, so that might be indeed the case18:51
apollo13Requirement already satisfied (use --upgrade to upgrade): pytest in /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages (from -r requirements-test.txt (line 1))18:53
apollo13lol18:53
apollo13it is really there, is that a new venv or preinstalled?18:53
prologicsome travis magic :)18:55
prologicanyway I have a flight to catch so I'll ttl18:55
apollo13I created https://github.com/circuits/circuits/pull/18818:55
GitHub176[circuits] apollo13 opened pull request #188: Update packages on install to see early failures from new version. (master...patch-1) https://git.io/vMVpw18:55
apollo13we will see if travis now exposes the same issues, then I have a base to work from18:55
prologicahh18:55
prologicspaceone: ++18:55
prologic:)18:55
apollo13see you later!18:56
prologicoh wait18:56
prologicapollo13: ++18:56
prologicfor some reason I confused you with spaceone :)18:56
apollo13also florian ;)18:56
prologiclol18:56
prologicyeh18:56
apollo13https://travis-ci.org/circuits/circuits/builds/191961576 jupp breaks18:57
prologicawesome :)18:59
prologicnow submit another PR to fix it and we can merge both :)18:59
apollo13jupp, time for a glass of wine with friends, after all it is weekend!19:00
prologic(y)19:04

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