5
Lightning Talk Navin Surtani WebSockets on WildFly

WebSocketson WildFly

Embed Size (px)

Citation preview

Page 1: WebSocketson WildFly

Lightning Talk

Navin Surtani

WebSockets on WildFly

Page 2: WebSocketson WildFly

What are we talking about?

• Defining things

• Front-end setup

• Back-end setup

• Demo (hopefully it works!)

Page 3: WebSocketson WildFly

Jargon

• WebSockets:

• “WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server”

• One of the new features in Java EE7

• WildFly:

• Open source Java EE7 compliant application server

Page 4: WebSocketson WildFly

Front-end

• Web-form:

• Enter a number, the square root of which we will calculate.

• JavaScript:

• Creates WS object

• Reads form input and sends message to back-end

• Displays result returned from back-end

Page 5: WebSocketson WildFly

Back-end

• @ServerEndpoint

• Class-level annotation specifying the endpoint name

• @OnMessage

• Method-level annotation stating which method to call

• Deals with message from client

• Returns information to the client