Creating a basic chat app
summary
Builds a terminal chat using Go and the Ably pub/sub broker, authenticating with an API key/token, attaching to a topic named "chat", publishing lines and subscribing to receive others' messages. Adds presence (enter/leave events) and paginated history retrieval; the demo exchanges live messages between two clients and leaves explicit presence on exit. Claims guaranteed delivery and shows the app fits in about 82 lines of code while using real-time connections (websockets protocol family) rather than polling.
AI-written summary · about
chapters (9)
- 0:00Intro
- 2:26REST: Request - Response Method
- 5:34Long Polling Method
- 7:20Realtime Subscription
- 15:30Connecting to a Pub/Sub Broker
- 22:05Listening for enter/leave events
- 25:59Checking History of chat
- 27:56Check out the code!
- 29:12Let's play a game!
related talks
22mBuilding a Decentralized Social Media App with Go and ATProto
31mGo: Code that Grows with Grace
46mKeynote: You Want To Build a Web Service?
05mLightning Talk
28mGopher in an Event-Driven playground
08mPërvoja personale me Go si gjuhë e infrastrukturës
27mFrom Zero to Hero: Launch Your Own Game in 45 Minutes
42mTerminal Emulator Basics in Golang
