Posts tagged active data service
WebLogic 12c (12.1.2) has support for WebSockets. ADF 12c runs on WebLogic 12c. Therefore, we should be able to leverage that WebSockets support in an ADF application. And indeed we can, as this article describes. It will explain the creation of a simple application – the SlidePresenter – that allows users to select an image from a carousel. As soon as they make the selection, all currently connected clients are synchronized, showing the same slide:
The application uses a WebSocket endpoint – an object that acts as the server end for web socket connections. Each browser session connects to the end point and starts a new websocket connection. Whenever a slide is selected, the WebSocket endpoint is informed (on the server side) and broadcasts the slide selection to all connected clients. A brief demo of what this looks like is shown here:Pushy in Sockets – demo
The application also support an automatic slideshow: one user starts the slideshow by pushing a button. This causes a scheduled future to be instantiated in the server that fires every 3 seconds to advance the slideshow. After two minutes, the show will finish.
The application can be downloaded under Resources. It runs More >
Real time events can be translated into a live visual representation using a largely declarative approach. Events can be published for example on a JMS Topic. Using Oracle BAM (Business Activity Monitor, component of the SOA Suite), this JMS Topic can be subscribed to. The events arriving on the Topic are used to update a BAM Data Object in the Active Data Cache. ADF provides a BAM Data Control that can be defined against the BAM Data Object. ADF Data Visualization Components support an active mode that does automatic server push to the browser. Using these DVT components, it is straightforward to create charts that are live updated in the browser.
Welding these components together, this article will explain how we can create a streaming line chart that represents the score in a volleyball match.
The steps described in this article:
Notifying ADF applications of database changes – fast and lean using Active Data Service for Server to Client Push – Part Two0
Yesterday I wrote that in two articles, I would demonstrate how we can ensure that changes in the database – new, changed or deleted data – can rapidly be reflected in ADF based user interfaces running in browsers. This story involves a two-step push-mechanism: push from database to middle tier and push from middle tier to browser. For the former – discussed in Notifying ADF applications of database changes – fast and lean using Database Query Result Change Notification – Part One – we will use the Oracle Database (and JDBC Driver) feature Query Result Change Notification and for the latter we leverage the Active Data Service in ADF Faces. The latter – server to browser push – is the topic of this second part. It will hook into where the first part took us (so you are advised to first read part one) and take the changes the database notifies us all the way up into the user interface.
A sketch of the architecture of the application we will create in this article looks like this:
The two push steps are marked with the green ellipses. The red box indicates the area under scrutiny in this article.