Sunday, February 28, 2016

Oracle JET Live List with WebSocket

I have updated sample - Oracle JET and WebSocket Integration for Live Data, to include live data list. Along with live updates delivered to the chart component, list component displays changed data. I'm displaying five last changes, with new data appearing in the last row:


Watch recorded demo, each 4 seconds new data arrives and chart is updated, along with list records:


JET list component UI structure (data grid) is rendered with a template, to arrange separate column for each job:


When new data arrives, it is being pushed into JET observable array (this triggers automatic UI list reload/refresh). If there are more than five items in the list, first one is removed. List observable array is configured with 500 ms. delay, to make UI refresh smoother:


Download sample application (JET, WebSocket server side and ADF to simulate updates in the DB) - JETWebSocket_v2.zip.

I'm going to present JET and WebSocket integration on Oracle Fusion Middleware Partner Community Forum 2016.

4 comments:

Anonymous said...

can WebSocket work with CollectionTableDataSource to modify data in CollectionTableDataSource?
Thanks.

Andrej Baranovskij said...

There is no relation between these two. WebSocket is data transport protocol, CollectionTableDataSource is a JET collection. Yes, as you can see in this example - I push data through WebSocket and then this data can be used in any way in JET through JavaScript.

Andrejus

Shimon said...

Hi Andrejus

How do you keep the websocket alive ?

Thanks
Shimon

Andrej Baranovskij said...

It stays alive automatically, unless connection is interrupted.

Andrejus