Fork me on GitHub

Good Morning!

Jakob Durstberger06:04:45

Good morning and happy pre-friday!


Morning. 5 day weekend for me starting today :)

👍 8

All the days have blended into one




@dharrigan Indeed, especially when you have two under two


Fun and games!


(merge every-day today-and-every-day)


I'm taking a 5 day weekend too


I'm still sat in bed and it's great

🙂 4

I'm taking the opportunity to do a bit more clojure self-learning


by writing a little application


Trying to use my time for study, too. Attempting to avoid my usual ADHD behaviour of getting started on something then dropping it because I've seen something else that seems shinier.


Its really hard yeah, i have the same but with starting mini projects haha


My GitHub used to be a mini-project graveyard until I cleared it out.

😄 4

I am rather good at starting things, not as good as finishing things.


Having some minor success with this at the moment =)… But yea it’s hard…


I've got a project idea that I keep coming back to at the moment which is nice but I also feel a bit guilty when i'm not working on it too haha


I have trouble following through too. I think I've a too critical inner voice.


Good morning , damn I should have taken today off


Wish I didn't read this channel today , jealous

😄 12


👋 8
Ben Hammond13:04:10

I'm trying to get my head round WebSockets on the Server side (jetty) The simple onTextMessage callback provides no context about which connection sent the message how do people normally corrrelate incoming messages with a specific clent connecttion?

Ben Hammond13:04:37

Hmmm might cross-post onto #pedestal


does the instance implementing EventDriverhold the client context @ben.hammond? (asking from a pov including zero-knowledge of jetty websox impl)

Wes Hall13:04:45

@ben.hammond My experience with websocket stuff (which, I would admit, is not extensive), is that you essentially have to manage state like this yourself. I am not very familiar with the jetty implementation but this interface has a "getSession" method which suggests to me 2 things 1) they are going to give you a bit of support with session management, at least a map-like thing to store stuff in and 2) there will be a separate instance of EventDriver for each connection so the context is essentially the EventDriver instance.

Ben Hammond16:04:42

which should make it fairly simple to wire up

Wes Hall13:04:18

I would imagine (without looking at the docs), that you probably need to supply jetty with some kind of factory for creating instances of these things, and it will create an instance for each connection.


perhaps not very helpful, but aleph has a nice websocket interface - you get a duplex manifold stream - take from the stream to get inbound packets and put to the stream to write back to the client

Ben Hammond15:04:51

yeah I've got pedestal/jetty at the moment

Ben Hammond15:04:01

mainly because I'm not a big fan of the manifold threading model

Ben Hammond15:04:15

I'd rather have a proper stack trace

Ben Hammond15:04:36

than this 'every function call runs as its own executor task` model where the Exception stack trace tells you almost nothing


i get that... i have a solution to it too, although i haven't managed to get my solution in to production yet...


mostly because it hasn't proven to be a great problem... although i would like per-operation logs


on the advantages side, promises+streams has proven to be a great model for controlling complex operations

Wes Hall14:04:19

I'm so out of date with the JEE stuff now it's depressing but it looks like they have some kind of web socket servlet thing wrapping all this.

Ben Hammond15:04:18

yeah the getSession() seems tto just be the original value from onWebSocketConnet that has been hung on to and It Just Works