comet, simplified, with jabbify comet service

16
Comet, Simplified, with the Jabbify Comet Service Brian Moschel Brian Moschel Jupiter IT

Upload: brian-moschel

Post on 24-May-2015

799 views

Category:

Technology


3 download

TRANSCRIPT

Comet, Simplified, with the Jabbify Comet Service

Brian MoschelBrian MoschelJupiter IT

Free prize Who Why

Overview

Why Why How It Why Comet?

Why Jabbify?

How It Works Demo Showcase

Why Comet?

• Web 2.0 Trends1. Time Spent on a Page

Why Comet?

• Web 2.0 Trends2. Half life of a Page’s Content

Why Comet?

• Demand for Comet is growing• Desktop apps moving to the web

• Chat• Real time updates• Real time updates• Don’t like to reload

• Ajax:2003::Comet:2009

What is Jabbify?

• Comet, simplified• No server• No setup• JavaScript API and GET requests• JavaScript API and GET requests

Why Jabbify?

Simple to use

Scale easilyScale easily

Rapid setup

Simple to usesynchronized (_continuations) {for(Iterator<Map.Entry <String, ArrayList<Continuation>>> iter =

_continuations.entrySet().iterator(); iter.hasNext();){Map.Entry<String, ArrayList<Continuation>> entry = iter.next();ArrayList<Continuation> continuations = entry.getValue();for(Continuation c : continuations){c.resume();

}}

_continuations.clear();}}

Jabbify.connect({name: this.username}, this.continue_to('after_connect'))after_connect: function(){Jabbify.send('vote','submit', {result: this.result})

}

vs

Scale easily

• Scaling comet >> Scaling traditional web applications

• Resource intensive• Jabbify is built to scale as usage grows

Rapid Setup<New id="cf" class="org.mortbay.jetty.plus.naming.Resource"><Arg>jms/connectionFactory</Arg><Arg>

<New class="org.apache.activemq.ActiveMQConnectionFactory">

<Arg>failover:(tcp://localhost:61616)?initialReconnectDelay=20&amp;maxReconnectDelay=900</Arg>

</New></Arg>

</New>

vs

<script language="javascript" type="text/javascript" src="jabbify.js"></script>

vs

Comet is complex• Client

– Transports (JSONP, Window.name, Flash, XHR, iframe)

• Server– Special server– Special server– Setup time– Learning curve

• Scaling– Resource consumption– Threading issues

Jabbify is simple• Client to Client Comet

– JavaScript API• Jabbify.send(“message”,”create”,{message: “hi there”});

• Server to Client Comet• Server to Client Comet– GET requests

• https://jabbify.com/message_push?key=123&type=message...

How It Works

Demo

Take Home Points

Comet is coming

Jabbify = easy Comet

Showcase

• Jabbify Simple Chat Client• Keyboard Demo• Chat.unwrongest.com