WebSocket Part I: A PlanningPoker Webapp using RxJS and Java Functional Programming

  Java, Javascript, Tutorial

Introduction

This time I will introduce you to WebSocket, Functional Programming in Java, and Reactive Programming in Javascript using the RxJS library. Take a look at what Wikipedia tells us about WebSocket: “WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C. WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request. The WebSocket protocol enables interaction between a browser and a web server with lower overheads, facilitating real-time data transfer from and to the server.

The Planning Poker application is comprised of a frontend webapp (HTML5, CSS3, Javascript, Bootstrap, RxJS, WebSocket), and a backend application based on Tomcat and WebSocket Server. The app’s purpose is to support remotely distributed developer teams who need to estimate the story points of user stories in an agile development environment. See how the app is meant to work:

The planning poker’s session supervisor (e.g., Scrum Master) will login and present the user stories for which the developers will enter their story point estimations. When all developers have entered their estimations, the admin will release all received numbers for display to the team. After discussing the results with the team and a final estimation has been established, the admin will switch to the next user story and the poker round will start again with all previous estimation reset.

For this to work for distributed teams, a server/web container will take the user stories from a database. The server not only sends the list of stories to the admin UI, but it also keeps track of the team member’s online status which is shown in the UI. The admin selects a user story and sends a command to the server to also send this particular story to all active planning poker participants. The team members estimations are then sent to the server and the server sends them to the admin. When the admin releases the numbers, the command to release them is sent to the server and the server sends the numbers to all participants for review and discussion.

Scope:

I will leave out some building blocks from this project, since they appear to be relatively easy to add based on what we’ll have done at the end of this. For sure, we will see the team members going online/offline, but the handling of user stories will not be part of this project. We will definitely be able to send our effort estimation to the admin, and the admin will be able to release them to the team. What will not be covered is user login/logout and database access.

Work in progress. Stay tuned.

LEAVE A COMMENT