aleph

2016-10-18T10:49:26.000386Z

@dm3 @lmergen I have something to show you regarding the Hystrix clone in Clojure. Would you be interested to review it? It’s an extraction of something that has been running partially in production without obvious flaws

2016-10-18T10:49:44.000387Z

yes, i would love to take a look!

dm3 2016-10-18T10:49:48.000388Z

sure 🙂

dm3 2016-10-18T11:15:03.000389Z

btw, would anyone here find a Clojurescript Manifold port useful?

andreas-thoelke 2016-10-18T11:17:14.000390Z

Sure, I think this would be great! Cljs support is core.async's main advantage over Manifold

andreas-thoelke 2016-10-18T11:19:06.000391Z

I definitely have async code/patterns that I would like to reuse in the browser or potentially on Node

dm3 2016-10-18T11:19:10.000392Z

I'm trying to port the let-flow macro - the hardest part

dm3 2016-10-18T11:19:25.000393Z

have everything else pretty much working

andreas-thoelke 2016-10-18T11:19:35.000394Z

awesome!

andreas-thoelke 2016-10-18T11:22:51.000395Z

I have been trying to avoid let-low and stick to chain and that works up to some point. So I think even a Manifold cljs without let-flow may be very useful.

dm3 2016-10-18T11:23:58.000399Z

yeah, I think let-flow is more important in Clojurescript as the concurrency patterns are more limited

dm3 2016-10-18T11:24:09.000400Z

and you compete with go

dm3 2016-10-18T11:24:30.000401Z

I don't use it in Clojure either

andreas-thoelke 2016-10-18T11:25:52.000402Z

hmm, you think users will need d/loop a lot in cljs, replacing go-loop?

dm3 2016-10-18T11:26:52.000404Z

I have d/loop working

dm3 2016-10-18T11:27:19.000405Z

yeah, that should replace go-loop

2016-10-18T11:34:05.000406Z

@dm3 @lmergen I’ve invited you via Github. It is missing some documentation. I think it’s best to start in examples

dm3 2016-10-18T11:35:38.000407Z

I don't see anything

andreas-thoelke 2016-10-18T11:38:45.000408Z

@dm3 .. it will be interesting to see how core.async and Manifold patterns compare in cljs/the browser - and if Manifold could win by having more functional syntax. Also I think it would compete with RxJS (https://github.com/funcool/beicon) and https://github.com/funcool/promesa

dm3 2016-10-18T11:39:07.000410Z

yes, it's much simpler than RxJS

dm3 2016-10-18T11:39:13.000411Z

in terms of concepts at least

andreas-thoelke 2016-10-18T11:39:29.000412Z

true

2016-10-18T11:42:10.000413Z

@dm3 you should have an invitation via email (assuming you are dm3 on github) or you can accept the invitation here https://github.com/millmobile

andreas-thoelke 2016-10-18T11:43:10.000414Z

@dm3 what type of apps are you planning to use Manifold for in the browser? For general UIs it seems everyone uses Re-frame nowadays - Om also droped core.async ..

dm3 2016-10-18T11:44:33.000417Z

I use Hoplon 🙂

dm3 2016-10-18T11:44:59.000418Z

I don't really know where I'd use it. Probably everywhere I used core.async before

dm3 2016-10-18T11:45:39.000419Z

which is mostly event buses, web sockets, etc.

dm3 2016-10-18T11:46:00.000420Z

it's much less useful in the browser than it is on the backend

andreas-thoelke 2016-10-18T11:46:28.000421Z

If you are into reactive programming/Hoplon, have you considered Pulsars Rx namespace?

2016-10-18T11:46:44.000422Z

If you would create manifold.cljs it would allow my Hystrix clone to run in the browser 🙂

2016-10-18T11:47:26.000423Z

At least nice for a demo 😉

dm3 2016-10-18T12:16:03.000424Z

interesting how you avoided using any java.util.concurrent constructs 🙂 was this on purpose?

2016-10-18T12:24:03.000425Z

yes partially I guess. Maybe there are better ways for some parts, please let me know 🙂 But e.g. for the semaphores it was convenient to use a Manifold stream ,because you can increase the semaphore limit dynamically. E.g. with blocking queues this would not be possible (also a limitation of Hystrix itself)

2016-10-18T12:24:53.000427Z

I’ve updated the README btw, maybe it gives some extra information

2016-10-18T12:41:56.000429Z

@jeroenvandijk sounds great! didn’t know you were behind AdGoji btw, everything starts to make sense 🙂

2016-10-18T12:46:34.000430Z

Cool 🙂

2016-10-18T12:48:43.000431Z

looks quite solid actually

2016-10-18T12:48:54.000432Z

you said it’s already running in production ?

2016-10-18T12:49:14.000433Z

you’re using it for your RTB i see ?

2016-10-18T12:52:22.000434Z

Yes I have been running it on a single node from time to time. Unfortunately the node is always gone the next day (it could also be some unlucky autoscaling), so I’m afraid the reporting part leaks somewhere. I haven’t dug into that yet. I wanted to get the (hystrix) reporting running and basic features first. That alls seems to work fine and also the performance seems to be comparable to what we have running on the other nodes. So needs a bit more testing before I dare to declare it to be stable

2016-10-18T12:53:03.000435Z

and yes this is running in our bidder code

2016-10-18T12:53:11.000436Z

yeah, i see

2016-10-18T12:53:17.000437Z

the example is slightly different than what is running in production though 🙂

2016-10-18T12:53:19.000438Z

interesting design choice behind the global registry

2016-10-18T12:53:39.000439Z

i’m not sure whether that’s the best approach

2016-10-18T12:54:02.000440Z

oh wait, it’s on a per-component basis

2016-10-18T12:56:01.000441Z

yes i guess it is a bit confusing if you look at the code. The idea is that each component is responsible for what is readable and writable. This makes train wrecks less likely and moves the complexity to the components. Maybe it is an overkill for a small library like this

2016-10-18T12:56:18.000442Z

yeah, it’s good enough i think

2016-10-18T12:57:41.000443Z

I do think it has more use cases though. Configuration often becomes a hassle to manage

2016-10-18T12:59:04.000445Z

yes that’s true, and this way it integrates well into component

2016-10-18T12:59:55.000446Z

for me the biggest concern is that i can easily map such a context to a single endpoint — this works in this case

2016-10-18T13:00:20.000447Z

the approach i’ve personally been taking was implement this as an aleph.http.client middleware

2016-10-18T13:01:55.000448Z

Yes I think the rest of the code doesn’t need to know the configuration is decentralised e.g. if you call registry-snapshot you will get a normal map. Maybe it easier to break code that is depending on it because it so easy to change the location of components this way

2016-10-18T13:11:33.000449Z

@lmergen If you want we can discuss more options (e.g. the Kibana idea) also in person and see if there is an option to work on it together

2016-10-18T13:30:31.000450Z

@jeroenvandijk sounds like a great idea! i have quiet a lot of these “itches” i want to scratch and plenty of ideas 🙂

aengelberg 2016-10-18T20:13:56.000454Z

Is there a way to do streaming (bulk) uploads with aleph.http?

aengelberg 2016-10-18T20:14:18.000455Z

I know you can pass in :raw-stream? true but that looks like it only works on the response, not the request.

aengelberg 2016-10-18T20:25:49.000456Z

ah, looks like I can pass in an arbitrary stream coercable via byte-streams

dm3 2016-10-18T22:21:34.000457Z

@andreas-thoelke getting back on the Pulsar Rx - no I haven't used it. I've played with Plasar actors though. I've never used a proper dataflow impl on the backend yet, although some use cases I had seemed very suitable.