Fork me on GitHub
#re-frame
<
2017-09-26
>
souenzzo02:09:28

Doubt: there is some how to do stateless websocket? Or websocket implies in a statefull/session?

danielcompton06:09:22

@souenzzo websockets are stateful by nature

gklijs07:09:39

You might create an abstract layer to send/receive messages, but you can’t do that without changing state

lumpy12:09:21

@nooga we are working on a Kafka Streams implementation of CQRS. It’s almost an exact correlation, except where re-frame optimizes writes(simple events, complicated subscriptions) Kafka optimizes reads (views are updated at write time instead of read time)

nooga12:09:05

So what I have here is a service that keeps track of state of each user and also state of entities the users access and it all happens in real time. User related events come through websockets and entity related events come from rabbitmq and there’s also an external database which keeps track of the current state of the world. What I would like to do is to translate user & entity related events into kind of internal event representation, queue everything up internally and just mutate/subscribe a huge atom while also offloading changes to the db just in case.

lumpy14:09:32

so we are using Kafka as our main storage, but it also works as a message broker. Seems like it would work pretty well for your use case.

nooga15:09:15

I never tried Kafka because it seemed overcomplicated

nooga15:09:25

but I think it’s time to revisit

yury.solovyov16:09:02

React 16 is out

yury.solovyov17:09:59

tho it is probably more of reagent concern

mikethompson18:09:50

We have stayed away from Event Sourcing on the server side (Kafka etc) ... looks great but it is more complex than we need. But we do use the idea of Commands and Queries between Client to the Server, rather than REST

nooga18:09:50

thanks @mikethompson! I’ll have a look

nooga19:09:51

nice 👏

johnnyillinois21:09:17

Hello! Is anyone using re-frame plus bidi in a cljs application? I have a implementation question about routing

lxsameer21:09:13

@danielcompton cheers, it's just a basic setup yet but we have to improve it step by step

johnnyillinois21:09:52

Anyone know the "correct" way to update the browser's window.location.href when a click event is handled inside a re-frame event

rgm21:09:05

what sort of practical limit is there on the size of the app-db on, say, a desktop browser (eg. Chrome, Safari)?

rgm21:09:42

whoa, ok.

johnnyillinois21:09:55

That was not a tested number

johnnyillinois21:09:08

But if you look at how much memory each chrome tab uses

johnnyillinois21:09:34

You can easily see 200+ MGs

rgm21:09:36

Hm, ok. I'm doing a series of parallel coords plots and have about 75,000 lines of CSV for about 5mb uncompressed

rgm21:09:12

trying to decide if that's in the app DB at all, or if it's just coming down from the server into re-frame land or bypassing and heading straight into D3.

rgm21:09:48

I'd love to have it all cached in the browser if possible

rgm21:09:58

so it sounds like I should just give it a shot.

johnnyillinois21:09:02

I'd say solve it first with a small amount of data

johnnyillinois21:09:13

Then test out different strategies

johnnyillinois21:09:20

with the larger dataset

danielcompton21:09:28

@rgm we have roughly that size XML data that we use in our app, parsed into Clojure data structures

danielcompton21:09:02

Depends a bit on what you're doing with it, but a parsed CSV will probably be less memory intensive than what we're doing

rgm21:09:35

oh cool... best case scenario is that I can get dynamic slicing-dicing on the client side so it sounds like my quantities aren't completely impractical.

danielcompton21:09:46

If you're finding things are a bit slow, you can use re-frame-trace to track down where the time is being spent

rgm21:09:03

oh neat... thank you

johnnyillinois22:09:57

Sorry for spam, but I am going to bump this again: Anyone know the "correct" way to update the browser's window.location.href when a click event is handled inside a re-frame event?

reefersleep22:09:35

goog.getObjectByName("window.location.href") and then manipulate it?

reefersleep22:09:43

Just a suggestion

reefersleep22:09:46

Sorry, maybe it is really js/window.location

reefersleep22:09:01

Not at my computer 😊