zk-and-rx"

From Documentation
Line 18: Line 18:
  
 
== The Magic in the Middle ==
 
== The Magic in the Middle ==
 +
 +
* filter the events (by selectable criteria)
 +
* throttle UI updates (reducing the network load)
 +
** buffer updates (100ms / 1000ms)
 +
** avoid redundant updates
 +
** batch update (in a single ZK execution)
  
 
= Summary =
 
= Summary =

Revision as of 05:04, 20 September 2017

Documentationobertwenzel
obertwenzel

Author
Robert Wenzel, Engineer, Potix Corporation
Date
September, 2017
Version
ZK 8.5

Introduction

The Backend (RX Observable)

Hot Observable

  • constantly streams events, at short intervals (but unreliable maybe skipping information)
  • allows multiple consumers

The UI (ZK MVVM application)

  • render robots as divs + dynamic styles reacting on robot status (position, mood)

The Magic in the Middle

  • filter the events (by selectable criteria)
  • throttle UI updates (reducing the network load)
    • buffer updates (100ms / 1000ms)
    • avoid redundant updates
    • batch update (in a single ZK execution)

Summary

Example Sources

The code examples are available on github in the zk-rxdemo repository

Running the Example

Clone the repo

   git clone [email protected]:zkoss-demo/zk-rxdemo.git

The example war file can be built using the gradle-wrapper (on windows simply omit the prefix './'):

   ./gradlew war

Execute using jetty-runner (fastest):

   ./gradlew startJettyRunner

Execute using gretty:

   ./gradlew appRun


Then access the example http://localhost:8080/zk-rxdemo CHECK LINK


Comments



Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.