background preloader

Live instant messaging

Facebook Twitter

Pusher WebRTC Chat Demo - Frameset. WebRTC Signaling Chat How-to | Pusher. Making your own peer-to-peer chat application using WebRTC is incredibly simple thanks to DataChannel.js and the Pusher API. Let's take a look at how to get everything up and running. To complete your peer-to-peer chat app you'll need some credentials from Pusher. It's worth creating a free account now so you have them prepared for later on in the guide. It only takes a minute to do and it'll save you time later on. Preparation The first thing you'll do is to get the HTML document set up, referencing the stylesheets and scripts that you require. Bootstrap for general layout and styling Zepto for JavaScript nicities and AJAX requests (or jQuery) Pusher for singalling via realtime WebSockets DataChannel.js for WebRTC abstraction We won't worry about the styling in this guide so feel free to check out the defaults or make your own.

<! This won't look like much yet, though you'll get to that later. Pusher and DataChannel.js setup Pusher WebRTC signaller – client Pusher WebRTC signaller – server. #260 Messaging with Faye. How to Use Faye as a Real-Time Push Server in Rails. There are multiple ways to add push functionality to an application, including Pushr and Pub-Nub, which are quite elegant and simple solutions. There are also some more advanced options. In this article, I’m going to show you how to use Faye, a messaging system that runs on both Ruby and Node.js.

We’re going build a simple chat service. Now, Ryan Bates covered this on Railscast #260, however, we're going to take a slightly different approach in this tutorial. First, we'll create a chat service where users enter a public room, and everyone can chat with each other publicly. The second functionality we’ll be adding is private messages. Additionally, we'll integrate some security to our implementation using Ryan Bate’s private_pub gem. Be sure you have a working setup of Ruby, and Ruby on Rails 3.1. We should be all set, so let's create the application: Now, add the faye gem to your Gemfile: and run bundle install to install it. This file simply tells Rackup how to start the Faye server. Build a real-time polls application with Node.js, Express, AngularJS, and MongoDB. Recently while lecturing on HTML5 to a large group of students, I wanted to poll them and display their voting results, updating in real-time. I decided to quickly build a polling app for this purpose.

I wanted a simple architecture and not too many different languages and frameworks. So I decided to use JavaScript for everything — Node.js and Express for the server-side, MongoDB for the database, and AngularJS for the front-end user interface. “This MEAN stack (Mongo, Express, Angular, Node) may one day surpass the simplicity of the LAMP stack (Linux, Apache, MySQL, PHP) for web application development and deployment.”

I chose to use DevOps Services (formerly JazzHub) to manage the source code for my project. Not only does it give me a full version control system for my code, but it also has an online IDE for editing my code in the cloud, and abundant agile features for project management. What you'll need to build your app READ:Node.js — beyond the basics Step 1. Figure 1. Figure 2. Build a real-time polls application with Node.js, Express, AngularJS, and MongoDB. MultiUser Chat using XMPP and Orbited (Using Ruby-on-Rails) | Ruby on Rails Blog. One of the things that I wanted to understand and build since I first learned to program was to build a chat client.

Something that would allow people to communicate and I am extremely thankful to Rishav Rastogi for introducing me to XMPP. I never really understood all the moving parts very clearly during my first interaction with the technologies but with some time on my hands now I decided to revisit the entire process of building a web chat client. While there are a few well documented resources that cover how to build a simple web chat client the information is mostly directed towards using XMPP and building a one-on-one chat.

Though the requirements for building a multiuser chat aren’t significantly different there are subtle differences that exist. A brief introduction to XMPP, Ejabberd (our XMPP server) and Orbited XMPPEjabberd is an XMPP server that I used to build my chat client with. OrbitedOrbited provides a pure JavaScript/HTML socket in the browser. Why do we need Orbited? . Ruby on rails chat application over port 80 which is hosting site agnostic(no flash and websockets) 10Chat - JavaScript Chat App. Babel Self Destructing Chat. AngularJS PubNub Chat Application. The PubNub Angular API lives in the scripts/pubnub-angular.js file.

Notice the dependency on the PubNub Angular library (pubnub.angular.service): angular.module('PubNubAngularApp', ["pubnub.angular.service"]) The code for the controllers lives in: Now, the PubNub service can be injected into the controller by name! .controller('JoinCtrl', function($scope, PubNub) { ... }); Using the Special AngularJS PubNub API Publishing to channels is trivial - just use the PubNub.ngPublish() method. As you can see, we call the PubNub publish method passing in the desired channel and message to transmit. It's not necessary to subscribe to a channel in order to publish to a channel. Subscribing to channels is accomplished by calling the PubNub.ngSubscribe() method. This is the core of the PubNub API - allowing clients to subscribe and publish to channels, and have those events propagate in real-time to other applications connected to the same channels.

Integrating Presence Events $rootScope. $rootScope. Anywall. Anywall is a geocaching application that allows users to share messages by placing them in real world locations. The application is available on the app store, and is meant to give you an overview of a real app that uses Parse as a backend. In this tutorial, we'll not only look at all of the Parse functionality used, but also many concepts surrounding the uses of Parse.

In Anywall, users log in and are able to see the closest posts both on a map and in a table. To view the content of a particular post, a user must be within a certain radius from the location it was dropped. This tutorial is divided into six parts that each focus on a different aspect of Anywall. Feel free to read them in any order, but we recommend that you download the source code and refer to it while reading. 1. 2. 3. 4. 5. 6. 1.1. Anywall consists of six view controllers. Once a user is logged in, the PAWWallViewController is displayed. The PAWConstants header contains the constants used in the the project. 1.2.

Networking Tutorial for iOS: How To Create A Socket Based Server. If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter. Thanks for visiting! Develop a socket-based iPhone app and server! Many iOS apps use HTTP to communicate to a web server, because it’s easy, convenient, and well-supported. However, in some cases you might find the need to go a bit lower level than HTTP, and communicate using TCP sockets to your own custom server. The advantages of doing this are several: You can send just the exact data you need to send – making your protocol lean and efficient.You can send connected clients data whenever you want, rather than requiring the clients to poll.You can write socket servers without a dependency of a web server, and can write in the language of your choice.Sometimes you just have to use sockets, if you are connecting to a legacy server! In this networking tutorial, you’ll get some hands-on experience writing an iPhone app that communicates to a TCP socket server using NSStream/CFStream.

What is a socket? You see? Networking Tutorial for iOS: How To Create A Socket Based Server. Geohashing Chat by User Proximity Tutorial - PubNub. This geohashing tutorial walks you through how to build a realtime chat app that connects users based on relative location (ie. geohashing). To connect groups of two or more people by location, you will need to take lat/long values and reduce the resolution of accuracy. By doing this, you can expand the coverage of proximity. You can use multiple resolutions at once or a fixed resolution. Want to see geohashing in action? A full working demo can be seen here: Geohashing Chat by Proximity. Or check out the source code here: GitHub Repository for Geohashing Chat by Proximity.

Basics of Geohashing You’ll first need to sign up for a PubNub account. Next, we’ll cover some source code snippet for geohashing lat/long coords. Geohashing Resolution “Zoom” “Zoom” levels are basically several different cartesian grids with larger and smaller granularity. By reducing the resolution of the lat/long coord we can construct a channel name that hits 1 box of the grid. Multiplexing 9 Boxes That’s it! PubNub Connected Car Solution Kit. The PubNub Connected Car Solution Kit PubNub’s Connected Car Solution Kit provides the key building blocks for developers to deliver scalable, real-time transportation management and dispatch applications, including taxi, fleet management and delivery service. Connected cars require real-time signaling for effective dispatch and tracking, yet vehicles constantly change networks and cell towers, lose connectivity, and drop dedicated network connections.

Built on its global Real-Time Network and supported on over 50+ SDKs, PubNub’s Connected Car Solution Kit addresses the inherent challenges posed by connected vehicles, ensuring reliable, real-time message streaming and other key services like dispatch, location tracking, and geo-fencing. Building Real-Time Geolocation Apps With JavaScript.

Geolocation is a great way to add another layer of interactivity to a realtime application. By knowing the location of your users, it’s easy to group them into pools and provide data and notifications to specific user channels. Additionally, it can be a great combination for realtime applications such as geo based chatting, collaboration, and games. Contrary to popular belief, it’s actually easier to obtain and use geolocation data than some developers think. Design of Application To test this theory, we built a geolocation scavenger hunt application, much like Wherigo and Geocaching. Cross functionality across a number of different devices was one key benefit of GeoChatr. We used a Node.js server to manage the list of clues and locations.

Code Samples You’ll first need to sign up for a PubNub account. Using the geolocation API was the easiest part of the entire process. One of the pitfalls I fell into was updating the nodes every time the watch position was called. Issues / Conclusion.