WebSockets Icon


The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server.
8 Stories
All Topics

Go github.com

Inlets – expose your local endpoints to the internet

inlets combines a reverse proxy and websocket tunnels to expose your internal and development endpoints to the public Internet via an exit-node. An exit-node may be a 5-10 USD VPS or any other computer with an IPv4 IP address. You may be wondering why this project needs to exist, since many like it have come before. The author addresses that right up front: Similar tools such as ngrok or Argo Tunnel from Cloudflare are closed-source, have limits built-in, can work out expensive and have limited support for arm/arm64. Ngrok is also often banned by corporate firewall policies meaning it can be unusable. Other open-source tunnel tools are designed to only set up a static tunnel. inlets aims to dynamically bind and discover your local services to DNS entries with automated TLS certificates to a public IP address over its websocket tunnel.

read more

JavaScript ably.io

WebSockets – a conceptual deep-dive

This is a nice, deep primer on WebSockets. It includes some web history, describes WebSockets in detail, and catalogs available libraries you can use to get started with them. Here’s the intro to the topic: In a nutshell, WebSockets are a thin transport layer built on top of a device’s TCP/IP stack. The intent is to provide what is essentially an as-close-to-raw-as-possible TCP communication layer to web application developers while adding a few abstractions to eliminate certain friction that would otherwise exist concerting the way the web works.

read more

JavaScript changelog.com/posts

travis – distributed CI for the Ruby community using Rails, WebSockets, and Redis

Berlin based Rubyist Sven Fuchs asks if Java-based Jenkins is the best CI tool for open source Ruby projects. Sven writes: Instead, imagine a simple and slim build server tool that is maintained by the Ruby community itself (just like Gemcutter is, or many other infrastructure/tool-level projects are) in order to support all the open-source Ruby projects/gems we’re using every day. Instead of just imagining, Sven and others have been working toward that vision with Travis, an extremely alpha Rails project. Travis is a single-page application built in Rails and uses Backbone.js as a client-side MVC frontend. How it works By configuring a post-receive URL in your GitHub project settings, GitHub will ping Travis when new git commits are received. Travis will then schedule a build in Resque, a Redis queue. Travis then uses Websockets courtesy of PusherApp to update registered browsers on build status as it runs in the background. Take a look at some of the projects getting built over at travis-ci.org, the project’s new home page or checkout Sven’s quick tour of Travis in this screencast: Usage Currently, the hosted edition of Travis is open to anyone with a GitHub account. Just sign in with GitHub. Once you’re in, grab your Travis build token and configure a post-receive URL in your GitHub project’s Service Hooks page: http://[YOUR_GITHUB_USERNAME]:[YOUR_TRAVIS_TOKEN]@travis-ci.org/builds Host Travis yourself If you want to run your own instance, you’ll need to set up configuration settings: $ cp config/travis.example.yml config/travis.yml If you want to run on Heroku, you’ll need to set some ENV variables $ rake heroku:config IF you’re running locally, you can start a worker with $ RAILS_ENV=production VERBOSE=true QUEUE=builds rake resque:work … or if you’re using God: $ cp config/resque.god.example config/resque.god $ god -c config/resque.god How you can help Travis is in EARLY ALPHA. Sven and gang are looking for folks to help test, log issues, and submit patches. If you want to join the community, join the Google Group or hang out in #travis on IRC. Special thanks Sven and team would like to offer a special thanks to Pusher App for donating a Big Boy account for the project. If you’d like to pitch in with the compute side of the project, (we’re looking at you Heroku or Linode), please ping Sven. [Source on GitHub] [Blog post] [Discuss on HN]

read more

Python changelog.com/posts

SocketTornad.IO – server-side WebSockets for Tornado and Socket.io

Socket.IO, the popular Websockets library gets some Python love from Brendan McAdams. SocketTornad.IO adds Websockets support to your Tornado app, handling all the protocol details on the server to wire up to the usual Socket.IO client libraries in the browser. In the simplest case, your Tornado app need only subclass tornad_io.socket_io.SocketIOHandler and handle on_message, and optionally on_open and on_close events. class EchoHandler(SocketIOHandler): def on_open(self, *args, **kwargs): logging.info("Socket.IO Client connected with protocol '%s' {session id: '%s'}" % (self.protocol, self.session.id)) logging.info("Extra Data for Open: '%s'" % (kwargs.get('extra', None))) def on_message(self, message): logging.info("[echo] %s" % message) self.send("[echo] %s" % message) def on_close(self): logging.info("Closing Socket.IO Client for protocol '%s'" % (self.protocol)) The upside of using Socket.IO on the client is broad fallback support for browsers that do not support Websockets including Adobe Flash Socket, AJAX long polling, AJAX multipart streaming, Forever Iframe and, JSONP Polling. Be sure to check the SocketTornad.IO README for advanced usage. [Source on GitHub] [Socket.IO]

read more

Node.js changelog.com/posts

streamie – Node.js + WebSockets = real-time Twitter client

As new technologies are delivering on the promise of the Real Time Web, it’s becoming apparent that the revolution will be streamed. Malte Ubl seems to agree, creating Streamie, your very own real-time Twitter stream powered by Node.js and Websockets. We talked about how crazy fast Node.js can be in episode #20. In episode #31, we talked about the possibilities of pushing updates to the browser with Websockets. In Streamie, the new Twitter User Stream API provides the payload to stream your tweets to you in real time. Websockets are implemented in Streamie using Socket.io, which falls back to traditional polling in older browsers. Features Although it’s still in early, active development, Streamie does offer some nice features you’d expect in a Twitter client including: Scroll state memory - Streamie remembers your scroll position between visits. New tweets appear scrolled offscreen to the top. Google Chrome notifications - Growl-like notifications for new updates. Instructions on setting up Streamie to run locally can be found in the README [Source on GitHub] [Live version]

read more

0:00 / 0:00