Midwest Dev Chat


  • The newest 15 messages in the super-cool #generalchat channel.

  • 12/13 22:12:18 Maryland: Great find ok_hand
  • 12/14 08:32:25 Noah: That is fascinating
  • 12/16 14:46:53 Roni: Good references for learning wtf Websockets? From ELI5 to comfortable-writing-apps-with-them.
  • 12/16 15:56:32 Maryland: hmm, I don't have anything to link to besides mdn. https://developer.mozilla.org/en-US/docs/Web/AP... Thankfully they're relatively simple, at least the stuff you need to know to write apps with them
  • 12/16 15:57:12 Maryland: Guiding advice when starting out: don't use http://socket.io
  • 12/16 16:30:12 Roni: Cool, thanks.
  • 12/16 16:30:22 Roni: Now how about: Good references for learning wtf protobufs? From ELI5 to comfortable-writing-apps-with-them.
  • 12/17 09:31:33 Kate: One comment I can make here. If you plan to use your websocket for data streaming to the client then make the communication one way. (Server -> Client) and use the REST protocol plus a socket id for communication the other way. We (and many others) have tried building out our own custom set of commands by just sending json encoded data back across the wire (Client -> Server) and it ends up as a huge mess of commands that are hard to track/document/decode. Probably the biggest change I'd make to our websocket code if I could go back and rewrite it
  • 12/17 10:12:51 Maryland: Definitely have the message types be constants defined in one place shared between client and server. If you're using TypeScript, you can have `ClientServerMessages` be a big 'ol union type.
  • 12/17 10:26:31 Roni: I guess, to clarify, I’m looking to understand for example: • when would I use websockets versus a REST API • are websockets like layer-7 UDP, or is there some more fitting analogy • what are they under the hood? is the “socket” actually like a linux file descriptor • etc.
  • 12/17 10:30:32 Maryland: If you ever find yourself polling for updates on a REST API, that's a classic websocket opportunity - you open the socket once and get an event whenever the server pushes you an update
  • 12/17 10:31:31 Maryland: Chat rooms are the traditional hello-world app for websockets: a scenario where clients could be receiving/sending new messages randomly at any time
  • 12/17 10:32:54 Maryland: I don't know what layer-7 UDP is, but websockets aren't a blind-broadcast system - you do open a specific pipeline between client and server, and either side can push messages up/down it
  • 12/17 10:32:57 Julian: man I remember the days when comms-focused devs wrote their first IRC app
  • 12/17 10:33:32 Maryland: And to quote that MDN page that I linked to: > While a WebSocket connection is functionally somewhat similar to standard Unix-style sockets, they are not related.
  • *Usernames have been changed to protect the innocent.
We're currently 1114 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!