Fork me on GitHub

I’m not sure I can pickup a new project right now @clojure388, sorry. However if you want to do something similar to what @thomas was talking about re, doing some learning together etc would be happy to do that… Also happy to sit down and go over stuff if you just want someone to bounce ideas off of, I’ve built a few things myself =)… (Just not with Fulcro yet) Not sure about timezone overlap, I’m just about to head to bed myself…


One option I have been thinking of is this:, specifically Fulcro Training being offered, not sure if this is old or not, but perhaps we could band together to arrange some classes? Happy to be a student myself if others are interested =)… I’m not sure what Tony’s position is on this stuff? Is it helpful or a distraction?


Well, my position is that if there is an organized need for paid training I will certainly consider it. I do think if you avail yourself of the existing materials you can get quite far without paying anything (but your own time and effort).


For the moment we’ve decided to spend a week working on it and reconvene next Wednesday, at that point we’ll see how we’ve progressed and decide from there =)…


@clojure388 I wasn't exactly looking for a side project, but not against it either by default. I was more thinking trying things out and learning together (and helping each other understand Fulcro better, as that is something I struggle with). That said I am also happy to bounce of ideas etc. and discuss options. What is you time zone?


Would it be worthwhile to arrange a quick call at some point? Can quickly discuss stuff =)…


@clojure388 @folcon @thomas I might be interested by a side project or learning together.


We’ve got a discussion going, want join in?

Jakub Holý (HolyJak)18:04:56

Hi! Has anybody tried to integrate Fulcro with server-side events? It might be a simpler solution for my need of pushing updates to the client than websockets...


I've got websockets working really easily? Not sure what the overhead was for sse? (Not sure the reason you're asking is because you think that setup is difficult =)…)

Jakub Holý (HolyJak)20:04:30

Eg SSE share the same http stuff so I don't need a separate session management, track clients etc. But good to hear that WS are simple! BTW, do you know what happens on the client when the server pushes data over WS? I know how fulcro remotes can be called but how does the remote call you?


You can access the websocket state on the server, there’s a list of connected clients who it knows about, you can just map the websocket client-id to your user session and then message the correct client…

Jakub Holý (HolyJak)06:04:28

Thank, I know how I can push from the server to the client but what happens on the client? Does the data magically appear in the DB or is there some callback-mutation magically associated with the WS remote that gets called to handle the incoming data?


I’ve not used the subscribe feature directly on fulcro yet, but have fiddled about with the websockets themselves (using a custom remote etc) and that just put the values into the app-db. It’s just using sente under the hood, so I’d be surprised if this was too problematic to work with. I’m planning on doing so over this weekend, so happy to update you once I’ve done so…

❤️ 4

Hi @folcon I was interested in using your fulcro template for a new project because it has some updated dependencies+heroku+websocket The only issue that I currently have is that after executing (shadow/repl :main) emacs/cider looses the connection to that repl(it becomes like standalone, no integration with emacs). I was reviewing the latest commits and couldn't find what might have caused it. Perhaps you may have an idea? I don't have such issue with (old/outdated )


2 secs, let me check, I’ll need a little time it seems, github has currently degraded service… @U0113AVHL2W: Hmm, with regards to losing connection, you are still seeing the repl swap over without my changes? Are you getting any error messages anywhere?


no error messages, it just "removes" the repl buffer from the current session, so I cant send any more commands from emacs. But it is still listed as a process in emacs, and I can switch to it by choosing another buffer


I can even execute stuff like (js/alert "foo") from that detached repl


Do you think this could be related to - :session true +:session {} in ? The rest seems like incremental updates


I was thinking about applying your commits one by one, to figure out the one that broke nrepl for me but that's not very easy/fast 🙂 I'll let you know if I find it


Sure, I doubt that’s the issue, the :session change exists to make websocket sessions shareable, basically if that config value is set to true, you can’t then customise session storage…


Sorry, it’s hard for me to debug this as I normally use cursive 😊


Regarding how to process events pushed from the server over websockets - when you create the websocket remote for the client, you can add a :push-handler key to the options map. This should be set to your function to handle server push events. The function takes a single arg, which is a vector of [topic msg]. A typical approach would be to setup a multimethod dispatched on the topic. Within your handler(s) you would run mutations to handle the state update, just as you would from other parts of the client. A key point here is the shape of your data compared to what you normally would receive from a load, etc. There are a few approaches you can use. One is to push data in the same shape as you use for loads, then on the client you can do a merge-component using the same components used for loads. Another related technique is to, just as you can create components just for their queries when loading, do the same thing and create components that mirror the shape of your push data and only use them with merge-component for processing push data. And finally, an option that’s sometimes useful is to have your push messages only contain the id(s) of entities that need to be updated, and the client uses this information to then issue a load of the data to be refreshed.


@U0JPBB10W Is that documented somewhere? I’ll be wanting to play with that this weekend, so having something I can look at if I need it would be great =)…


It’s documented in the doc string for the remote. I could have swore it used to be in the Readme, but not anymore.


@U0522TWDA as I needed to do it anyway, I’ve done some digging and distilled -> Let me know if you have questions =)…