Network Services with HTTP and WebSockets

WebSockets and alternative web application architectures in Go through the medium of code. Plenty of Go along with some JavaScript and possibly some Ruby/Sinatra to demonstrate integration with heterogeneous services. 

Abstract

WebSockets and alternative web application architectures in Go through the medium of code. Plenty of Go along with some JavaScript and possibly some Ruby/Sinatra to demonstrate integration with heterogeneous services.  This is a talk about WebSockets and the microservices which love them. Or at least, about the fun that can be had using WebSockets to develop bespoke network applications with distributed components.  WebSockets have been with us for a while now, debuting in Chrome shortly after the first public release of Go in 2009, and supported by all major web browsers by the end of 2011. Despite this WebSockets are still seen by many as an esoteric tool, the preserve of framework developers.  In this talk we'll dispel this impression, examining both the simple HTML5 API provided by ECMAScript and several of the libraries for communicating over WebSockets in Go.  WebSockets are full-duplex bi-directional channels which marry the flexibility of TCP/IP with the convenience of HTTP, freeing web-based applications from the restrictions of traditional client-server architectures. Instead of a monolithic server-side application dictating behaviour we can instead write browser-hosted apps which pull data from multiple remote sources in real-time. This freedom can be used to bind connections to specific HTML elements for live updates, to establish secure side-channels for monitoring and communications, or to manage concurrent remote tasks independently of any one service provider. We can even reverse the neutron flow and offload processing tasks and data storage to browser-based clients, returning results asynchronously.  This talk will explore these concepts with examples of browser-based JavaScript applications communicating with remote components written in Go. Each example will be accompanied by tested code which we'll examine in detail and can later be used for offline study. Knowledge of WebSockets is not assumed though a basic familiarity with JavaScript will be helpful. This will be the third of three videos, three episodes in a short series, of which Episode Three will be covered in this session and the other two lay the groundwork.  There’s also a GitHub repository with all the code from the videos: https://github.com/feyeleanor/WebSocketTalk Video 1/3: https://tinyurl.com/GoLabHMONE Video 2/3: https://tinyurl.com/GoLabHMTWO

Video

Stay connected

You can subscribe to our newsletter to stay updated on the latest news and announcements. Follow us on social media to join our community and engage with other attendees, speakers, and staff. We're on Twitter, Mastodon, Youtube and Facebook. Don't forget to use our official hashtag #GoLab2023 to share your experience and connect with other attendees on social media.

Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2023 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS