WebSocketson WildFly

Preview:

Citation preview

Lightning Talk

Navin Surtani

WebSockets on WildFly

What are we talking about?

• Defining things

• Front-end setup

• Back-end setup

• Demo (hopefully it works!)

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

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

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

Recommended