Realtime WebSocket streaming from the cloud to you: Part II

webSocket-AWS-Running

I’ve got the ‘green-light’ and an IP allocated.

In Part 1 I built a Groovy WebSocket
Server  and a Java and HTML Client. In Part 2 I’ll deploy it into AWS, fire up the Clients and add the Github link. With WebSocket Clients, I can run Logscape in the ‘wild’ and make use of the Alert-Feed WebSocket functionality to stream data to my local servers.

AWS Deployment: Before running on the AWS server I need to find the right AMI – one with Java installed. The OpenJDK is installed on most Linux flavours, and I prefer to work with Ubuntu. In the following grab you can see where I’ve fired up the AMI instance.

Amazon Cloud deployment steps (WebSocket Server).

webSocket-AWS-Server-Running

SCP the bundle, then fire up the server

webSocket-AWS-Security

Open Port 20000 for incoming connections

Firing up the Clients

webSocket-AWS-JClientRunning

JavaClient: Change the WebSocketServer IP to match and we see the data arriving

webSocket-AWS-ClientRunning

HTMLClient: load the page and the data streams in

 

 

 

 

 

Its all fairly trivial

Wow – we got over that quickly; firing up both clients and we have data arriving in a snap. The best thing about all of this is the simplicity and value that can be extracted. Leveraging WebSockets provides an open-standard way of pumping data to any endpoint.

Logscape Leverage

Logscape 2.4 EventStreaming was developed using some of the code in this exercise. The idea being that you can take any source of data, and as Logscape indexes it,  EventStreaming can pick out the events of interest and fire them off to the connected clients.

Don’t forget to follow us on twitter


Learn More

To learn more about using Logscape take a look at support.logscape.com. You can download Logscape for free. Click the link below for a free download.

 

You can grab the code from our github repository here!

Regards, Neil