These are chat archives for got-lambda/expression

11th
Aug 2017
Magnus Therning
@magthe
Aug 11 2017 13:16
to the webdevs in here: I've just implemented the basics of the much-needed upgrade functionality for our system, I've added a first shot at an HTTP-based way to sending an update and running it... however, it takes time and comprices several steps, I'd really like to convey progress, but I'm not sure how to do that in the best way in a HTTP/JSON-API
I'd really appreciate some hints an pointers, bonus points if there's a ClojureScript lib (or just example code) rather than just JS ;)
Jean-Louis Giordano
@Jell
Aug 11 2017 13:23
websockets still not an option?
when waiting for progress we've also implemented some polling logic (basically GET that returns a status until "success")
Magnus Therning
@magthe
Aug 11 2017 13:31
@Jell, for this case it could be an option, I just need to tie it to flask (in Python3)... do you know of any cljs-lib for socket.io (https://socket.io/)?
Jean-Louis Giordano
@Jell
Aug 11 2017 13:33
socket.io is available as a cljsjs package http://cljsjs.github.io/
[cljsjs/socket-io "2.0.1-0"]
but that means js interop
Magnus Therning
@magthe
Aug 11 2017 13:36
flask+python3 doesn't have any working extension for web-sockets, only for socket.io :(
and it seems chord/sente/everything? for cljs requires clj on the backend :(
Jean-Louis Giordano
@Jell
Aug 11 2017 13:37
chord is a generic websocket client no?
I'm pretty sure because I did a project that integrated with a websocket on a server I did not control
Magnus Therning
@magthe
Aug 11 2017 13:38
I just read the intro line: a bridge between the triad CLJ/CLJS, web-sockets and core.async
Jean-Louis Giordano
@Jell
Aug 11 2017 13:38
(chord is a library for both server & client, but you just need the client)
Magnus Therning
@magthe
Aug 11 2017 13:39
yupp, I only need the client for CLJS... but ordinary websockets is problematic on the server due to missing flask extensions
Jean-Louis Giordano
@Jell
Aug 11 2017 13:39
ok if only socket.io is an option then js interop + [cljsjs/socket-io "2.0.1-0"] is your only option :p
Magnus Therning
@magthe
Aug 11 2017 13:39
I'm guessing I'll just have to fall back on asynchronicity :(
I'll have to take a look at it... I probably need only a tiny portion of control actually, might be simple to create a very small cljs module wrapping it
@Jell, thanks!
Jean-Louis Giordano
@Jell
Aug 11 2017 13:44
:+1: