Socket.IO

Last updated
Socket.IO
Original author(s) Guillermo Rauch
Developer(s) Automattic
Stable release
4.7.2 / August 2, 2023 (2023-08-02) [1]
Repository
Written in JavaScript
Operating system Cross-platform
Type Event-driven networking
License MIT License [2]
Website socket.io

Socket.IO is an event-driven library for real-time web applications. It enables real-time, bi-directional communication between web clients and servers. [3] It consists of two components: a client, and a server. Both components have a nearly identical API.

Contents

Socket.IO is also a protocol, [4] where different complying implementations of the protocol can communicate with each other. The main implementation consists of two parts: a client that runs in the browser and a server for Node.js. Apart from the main implementation, there are multiple implementations, for example, the official Deno (JavaScript), C++, Java, Python, and Swift servers.

Socket.IO primarily uses the WebSocket protocol with polling as a fallback option, while providing the same interface. [5] Although it can be used simply as a wrapper for WebSockets, it provides many additional features such as heartbeats and timeouts. [5]

It can be installed with the Node Package Manager (NPM). [6]

See also

Related Research Articles

Server-side scripting is a technique used in web development which involves employing scripts on a web server which produces a response customized for each user's (client's) request to the website. Scripts can be written in any of a number of server-side scripting languages that are available. Server-side scripting is distinguished from client-side scripting where embedded scripts, such as JavaScript, are run client-side in a web browser, but both techniques are often used together. The alternative to either or both types of scripting is for the web server itself to deliver a static web page.

Web-based SSH is the provision of Secure Shell (SSH) access through a web browser. SSH is a secure network protocol that is commonly used to remotely control servers, network devices, and other devices. With web-based SSH, users can access and manage these devices using a standard web browser, without the need to install any additional software.

A single-page application (SPA) is a web application or website that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of a web browser loading entire new pages. The goal is faster transitions that make the website feel more like a native app.

<span class="mw-page-title-main">Vaadin</span>

Vaadin is an open-source web application development platform for Java. Vaadin includes a set of Web Components, a Java web framework, and a set of tools that enable developers to implement modern web graphical user interfaces (GUI) using the Java programming language only, TypeScript only, or a combination of both.

<span class="mw-page-title-main">Node.js</span> JavaScript runtime environment

Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

CommonJS is a project to standardize the module ecosystem for JavaScript outside of web browsers.

JSGI, or JavaScript Gateway Interface, is an interface between web servers and JavaScript-based web applications and frameworks. It was inspired by the Rack for Ruby and WSGI for Python and was one of the inspirations of PSGI for Perl.

<span class="mw-page-title-main">Opa (programming language)</span>

Opa is an open-source programming language for developing scalable web applications.

Mustache is a web template system. It is described as a logic-less system because it lacks any explicit control flow statements, like if and else conditionals or for loops; however, both looping and conditional evaluation can be achieved using section tags processing lists and anonymous functions (lambdas). It is named "Mustache" because of heavy use of braces, { }, that resemble a sideways moustache. Mustache is used mainly for mobile and web applications.

AngularJS is a discontinued free and open-source JavaScript-based web framework for developing single-page applications. It was maintained mainly by Google and a community of individuals and corporations. It aimed to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) and model–view–viewmodel (MVVM) architectures, along with components commonly used in web applications and progressive web applications.

Yeoman is an open source client-side scaffolding tool for web applications. Yeoman runs as a command-line interface written for Node.js and combines several functions into one place, such as generating a starter template, managing dependencies, running unit tests, providing a local development server, and optimizing production code for deployment.

<span class="mw-page-title-main">Vert.x</span>

Eclipse Vert.x is a polyglot event-driven application framework that runs on the Java Virtual Machine.

<span class="mw-page-title-main">Ember.js</span> JavaScript framework

Ember.js is an open-source JavaScript web framework that utilizes a component-service pattern. It is designed to allow developers to create scalable single-page web applications by incorporating common idioms, best practices, and patterns from other single-page-app ecosystem patterns into the framework.

Meteor, or MeteorJS, is a partly proprietary, mostly free and open-source isomorphic JavaScript web framework written using Node.js. Meteor allows for rapid prototyping and produces cross-platform code. The server-side MongoDB program is the only proprietary component of Meteor and is part of the Meteor download bundle. It is possible to use Meteor without using the server-side MongoDB. It uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients without requiring the developer to write any synchronization code. On the client, Meteor can be used with any popular front-end JS framework, Vue, React, Svelte, Angular, or Bazel.

<span class="mw-page-title-main">MEAN (solution stack)</span> JavaScript software stack

MEAN is a source-available JavaScript software stack for building dynamic web sites and web applications. A variation known as MERN replaces Angular with React.js front-end, and another named MEVN use Vue.js as front-end.

Express.js, or simply Express, is a back end web application framework for building RESTful APIs with Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js.

WAMP is a WebSocket subprotocol registered at IANA, specified to offer routed RPC and PubSub. Its design goal is to provide an open standard for soft, real-time message exchange between application components and ease the creation of loosely coupled architectures based on microservices. Because of this, it is a suitable enterprise service bus (ESB), fit for developing responsive web applications or coordinating multiple connected IoT devices.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

<span class="mw-page-title-main">Tokio (software)</span> Library for Rust programming language

Tokio is a software library for the Rust programming language. It provides a runtime and functions that enable the use of asynchronous I/O, allowing for concurrency in regards to task completion.

References

  1. "Releases · socketio/socket.io". GitHub.com. Retrieved 12 March 2021.
  2. "socket.io/LICENSE at master · socketio/socket.io · GitHub". GitHub. 20 January 2023.
  3. Prusty, Narayan (2016-07-25). Modern JavaScript Applications. Packt Publishing Ltd. p. 103. ISBN   978-1-78588-027-8.
  4. "Socket.IO Protocol". GitHub. Retrieved May 26, 2023.
  5. 1 2 Ihrig, Colin J. (2014-01-18). Pro Node.js for Developers. Apress. p. 213. ISBN   978-1-4302-5861-2.
  6. "socket.io". npmjs.org. 31 May 2023.