*** Ossoleil has joined #circuits | 07:54 | |
*** kephu has joined #circuits | 08:51 | |
kephu | hi | 08:51 |
---|---|---|
kephu | yesterday i asked about json-rpc communication, and got some promising leads. Thing is, though, I can't find an example on how to write a json-rpc *client* | 08:53 |
prologic | hi! | 09:12 |
prologic | do you need to write the json-rpc client in pythohn too? | 09:12 |
kephu | preferably | 09:35 |
prologic | sure | 09:35 |
prologic | and does this client have to be async in any way? | 09:35 |
prologic | does it do anything else? | 09:35 |
kephu | In fact, it's likely to be the same app. Like I said yesterday, automation chaining | 09:35 |
prologic | or is it just a cli tool, run once | 09:35 |
kephu | so probably a service | 09:35 |
prologic | right | 09:35 |
prologic | so you want something like this | 09:36 |
prologic | JSON-RPC service <-> JSON-RPC client <-> Users? | 09:36 |
kephu | well, I'd put it like this: there's a JSON-RPC client that accepts some commands to run. These commands are typically either "pass it on", or "do stuff to this list of machines" | 09:37 |
kephu | crap, I misspoke, service, not client | 09:39 |
kephu | Anyway, users will, in the end, get a gui for issuing commands to the first rpc service in the chain | 09:39 |
kephu | does that make sense so far? | 09:40 |
prologic | right | 09:40 |
prologic | sure | 09:40 |
prologic | so a webui | 09:40 |
prologic | user pushes button | 09:40 |
prologic | something happens on a server/machine | 09:41 |
prologic | ok | 09:41 |
prologic | json-rpc or rpc at all is hardly needed you realize | 09:41 |
prologic | you can just use standard web stuff here | 09:41 |
prologic | http is a request/response model afterall | 09:41 |
prologic | we don't have a json-rpc client in the circuits library as such | 09:41 |
prologic | but there is a http client library in the works | 09:41 |
prologic | otherwise you could use | 09:41 |
kephu | thing is, I want to sustain the connection and capture all the messages | 09:41 |
prologic | requests (popular http client library for python) | 09:42 |
prologic | https://pypi.python.org/pypi/python-jsonrpc | 09:42 |
kephu | since the automation process generates a fair bit of logs | 09:42 |
prologic | you _can_ sustain the connection | 09:42 |
prologic | even with regular http | 09:42 |
prologic | it's called comet :) | 09:42 |
prologic | which circuits.web totally supports | 09:42 |
kephu | oh? | 09:43 |
prologic | you set response.stream = True | 09:43 |
prologic | and stream endlessly | 09:43 |
prologic | there's a terminal web app example in examples/web/terminal | 09:43 |
kephu | (btw incidentally, related question: how would I go about implementing comet with circuits? I have an old as balls project in the freezer where a pretty large part of it was comet'd) | 09:43 |
prologic | basically how the examples/web/terminal app works | 09:44 |
prologic | you just don't close the http conenction | 09:45 |
kephu | what client-side js lib would you recommend here | 09:46 |
prologic | well I normally go with jquery | 09:47 |
prologic | but they're all good :) | 09:47 |
prologic | jquery is the most popular I guess | 09:47 |
prologic | there's also nice things like | 09:47 |
prologic | twitter bootstrap + jquery | 09:47 |
kephu | well that's more or less a given, but I was asking about the comet bit | 09:47 |
prologic | underscore.js | 09:47 |
prologic | not sure about client-side comet | 09:48 |
prologic | maybe websockets is a better choice there | 09:48 |
prologic | since browsers natively support it | 09:48 |
prologic | bbs - dinner/etc | 09:48 |
prologic | remember one important thing | 09:49 |
prologic | anything you can do in Python | 09:49 |
prologic | you can do in circuits | 09:49 |
kephu | yup | 09:49 |
prologic | circuits just provides you the foundations to scale complex software | 09:49 |
prologic | horizontally - components | 09:49 |
prologic | and gives you a very powerful message bus to decouple your components | 09:49 |
prologic | loosely coupled componetns | 09:49 |
prologic | swap one out, replace it with another compatible one | 09:49 |
prologic | bbs | 09:49 |
kephu | no probs | 09:58 |
kephu | yeah, what I'm looking into here is that message bus, and riding it across multiple nodes | 09:59 |
kephu | . | 11:01 |
*** ACaD has joined #circuits | 11:49 | |
prologic | kephu, we have circuits.node for that | 12:20 |
prologic | stills needs more work -- more features, etc | 12:20 |
prologic | but it's designed for exactly that purpose | 12:20 |
prologic | creating multi-node evented systems | 12:20 |
kephu | interesting | 12:54 |
kephu | are there any examples I could look at? | 12:55 |
kephu | (also sorry, was afk) | 12:55 |
prologic | yes | 13:06 |
prologic | hellonode.py | 13:07 |
prologic | nodeserver.py | 13:07 |
prologic | in examples/ | 13:07 |
*** ircnotifier has quit IRC | 14:02 | |
*** ircnotifier has joined #circuits | 14:02 | |
prologic | man this is really cool | 14:13 |
prologic | I love Docker :) | 14:13 |
prologic | http://arrow.shortcircuit.net.au:81/ | 14:18 |
prologic | ^^^ is running in a docker container | 14:18 |
kephu | what's docker? | 14:24 |
prologic | http://docker.io | 14:25 |
prologic | g'night :) | 14:25 |
kephu | night? | 14:39 |
kephu | jeez, timezones | 14:39 |
kephu | insanity | 14:40 |
*** kephu has quit IRC | 14:46 | |
*** Myke_ has joined #circuits | 16:05 | |
*** ACaD has quit IRC | 16:18 | |
*** Ossoleil has quit IRC | 17:43 | |
*** Myke1576 has joined #circuits | 19:27 | |
*** Myke1576 has quit IRC | 19:36 | |
prologic | morn'n all | 23:20 |
Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!