background preloader

Socket.io

Facebook Twitter

GET search/tweets — Twitter Developers. Returns a collection of relevant Tweets matching a specified query.

GET search/tweets — Twitter Developers

Please note that Twitter’s search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface. In API v1.1, the response format of the Search API has been improved to return Tweet objects more similar to the objects you’ll find across the REST API and platform. However, perspectival attributes (fields that pertain to the perspective of the authenticating user) are not currently supported on this endpoint. To learn how to use Twitter Search effectively, consult our guide to Using the Twitter Search API.

Resource URL Resource Information Parameters Example Request. Using Socket.io with multiple clients connecting to same server. Socket connection in node js. Socketstream/socketstream. Dynamic Namespaces Socket.IO. Introducing WebSockets: Bringing Sockets to the Web. The Problem: Low Latency Client-Server and Server-Client Connections The web has been largely built around the so-called request/response paradigm of HTTP.

Introducing WebSockets: Bringing Sockets to the Web

A client loads up a web page and then nothing happens until the user clicks onto the next page. Around 2005, AJAX started to make the web feel more dynamic. Still, all HTTP communication was steered by the client, which required user interaction or periodic polling to load new data from the server. However, all of these work-arounds share one problem: They carry the overhead of HTTP, which doesn't make them well suited for low latency applications. Node.js Websocket Examples with Socket.io.

What are Websockets?

Node.js Websocket Examples with Socket.io

Over the past few years, a new type of communication started to emerge on the web and in mobile apps, called websockets. This protocol has been long-awaited and was finally standardized by the IETF in 2011, paving the way for widespread use. This new protocol opens up a much faster and more efficient line of communication to the client.

Like HTTP, websockets run on top of a TCP connection, but they're much faster because we don't have to open a new connection for each time we want to send a message since the connection is kept alive for as long as the server or client wants. Even better, since the connection never dies we finally have full-duplex communication available to us, meaning we can push data to the client instead of having to wait for them to ask for data from the server. OpenClassrooms - Socket.io: let’s go to real time! Chat App Best Practice Guide with JavaScript APIs. One of the most common use-cases of PubNub data stream network is for chatting.

Chat App Best Practice Guide with JavaScript APIs

It can be a standalone chat app, or a chat feature in a larger application or website. A good example of latter is the one seen on Twitter Periscope, where viewers can interact with the videocaster during a live video stream. Simulated image from an screenshot from Periscope by Monterey Bay Aquarium We work hard to make it easy for you to build your own apps, however, nothing is too easy- we get questions from many of you every day. Especially, PubNub’s support superstars, Craig, Fred, and Eric are wrangling tough questions nearly 24/7! HTTP vs WebSockets. HTTP is like walkie-talkie; data transmission can happen from only one direction at a time.

HTTP vs WebSockets

WebSocket is like telephone; data transmission can happen from both direction at the same time. Image source In HTTP both ends can transfer data but only one at a time. HTTP clients (like browsers) asks for data from server by sending the request and then the server parses the request, understands it and responds appropriately by transferring response data back to the client. WebSockets - Web APIs.

GeekRai: Websocket in Java. Covered the fundamentals of web sockets (vs HTTP) on previous post, here.

geekRai: Websocket in Java

Websocket protocol is part of HTML5 specification to provide full-duplex bi-directional communication channel over single TCP socket. It got added in Java EE version 7 (JRS 356). In this post, I will dig dipper into websockets and how can we implement it in Java. GeekRai: HTTP vs WebSockets. RFC 6455 - The WebSocket Protocol. [Docs] [txt|pdf] [draft-ietf-hybi-t...]

RFC 6455 - The WebSocket Protocol

[Diff1] [Diff2] [Errata] Updated by: 7936 PROPOSED STANDARD Errata Exist Internet Engineering Task Force (IETF) I. Fette Request for Comments: 6455 Google, Inc. Category: Standards Track A. Melnikov ISSN: 2070-1721 Isode Ltd. RFC 6455 The WebSocket Protocol December 2011 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. What Are WebSockets? WebSockets provide new protocol between client and server which runs over a persistent TCP connection.

What Are WebSockets?

Through this open connection, bi-directional, full-duplex messages can be sent between the single TCP socket connection (simultaneously or back and forth). Because it is an independent TCP-based protocol, it doesn’t ideally require HTTP tunneling (similar to Netflix and other streaming services), allowing for simplified communication when sending messages. What kind of apps can you build with WebSockets? What are WebSockets? WebSockets represent a long awaited evolution in client/server web technology.

What are WebSockets?

They allow a long-held single TCP socket connection to be established between the client and server which allows for bi-directional, full duplex, messages to be instantly distributed with little overhead resulting in a very low latency connection. Both the WebSocket API and the well as native WebSocket support in browsers such as Google Chrome, Firefox, Opera and a prototype Silverlight to JavaScript bridge implementation for Internet Explorer, there are now WebSocket library implementations in Objective-C, .NET, Ruby, Java, node.js, ActionScript and many other languages. A brief history of the web (from a developer’s perspective) Getting started with socket.io.