Understand Workstation Networking
This article covers Workstation’s foreground and background updates; auto-update, content publish, update detection, and web-app update.
Tasks that involve networking are core functionality in Workstation. Workstation uses networking with a sense of care and prioritizes stability over user experience to avoid overloading focal points, such as proxy servers.
Workstation displays content that was created in WalkMe’s CMS by the organization’s content builders.
This content is shipped and distributed over a static JSON file that is deployed on WalkMe’s CDN (cdn.walkme.com). The delivery method for Workstation is similar to WalkMe Web products.
However, as a desktop application, Workstation has no loading-related observation, such as the “load” web event.
Therefore, content publishes checks are tied to the user usage; Workstation will check for content updates as a result of three actions performed by the user:
- Starting/Refreshing Workstation – when the process starts, the Workstation engine re-downloads the content file (aka JSON file) and displays it to the user.
- Foreground state changed – known as “in focus” state change; each time the end-user “leaves” Workstation for another application, which is not in a time frame of 30 seconds since the last visit, the engine will check if there was an update (“checking if there was an update” no necessarily proceeds with a download).
Content Update Loading Flow
Not every “check for an update” ended with an actual update. Re-download of the content file will happen only when new content or configuration was published by the content builders.
Below figure describes how Workstation pulls the updates and decides if it needs to re-download the content file.
- Workstation downloads the settings.txt file (1.3 KB) following the above events.
- Workstation parses the file and compares the ‘PublishDate’ with its local copy of the file.
- If there’s a later update than its current copy, Workstation will proceed to the next step.
- Based on the foreground state, Workstation will choose the download strategy;
- Prompting an “update content” button for the user
- Automatically download the content file in the background
- Workstation downloads the content file (size usually is a few hundreds of kilobytes, but might be a few megabytes for non-maintained files).
- Once the content file is downloaded, Workstation will rebuild the local data store and content will be available for the user.
WalkMe content can be segmented per department, attributes, and user actions. Each condition is a hashed string, which in the case of user-related information, is evaluated with a remote server.
Evaluation is as consolidated as possible and sent in batch requests to https://papi.walkme.com/conditions/evaluatedConditions
Workstation Web Application
The Workstation interface is a web-based solution, based on the React framework. The application comprises of static files (HTML, CSS, JS) that are served from the Workstation CDN – workstation.walkme.com..
The size of the application is 1.3MB, and it all served compressed as gzip.
Workstation loads the web application every boot and manual refresh by the end-user.
The location of the web application is determined by the settings.txt file that was downloaded earlier in the bootstrap process.
Workstation collects various events to provide usage reporting on Insights and Workstation Dashboard.
Each event is an HTTPS request, in a size of a few kilobytes, and is sent to ec.walkme.com.
Workstation Binary App Auto Update
Starting version >1.00 of the Electron-based Workstation, an auto-update engine is taking a place to update the binaries, aka the Workstation Container.
Workstation Container is an Electron-based wrapper that performs low-level tasks such as proxy and network certification compatibility, push notifications registration, windows management, and etc.
The Container maintains the life cycle of the web application, and manages the WalkMe Content update mechanism.
- Workstation always starts with the latest available binary version (see Versions Maintenance and Download Failure Overcome section below)
- On every startup, Workstation sends an HTTPS request to check if there’s a more up-to-date version than the current.
- The Workstation will send another HTTPS request each time the user engages with the app in a frame of 24 hours. A single request in 24 hours
- Workstation will start downloading the binaries and store it in the Workstation installation folder.
- Once the download is finished successfully, Workstation will implement one of the below strategies:
- Workstation is foreground/background – user will be notified about the update and will be asked to relaunch Workstation – “Click to Update”
- Workstation is off – next startup will be using the newer binary.
Versions Maintenance and Download Failure Overcome
The auto-update mechanism keeps two binary versions at a single time to overcome download failures.
Before switching to the newer version, the auto-update engine will hold two completed versions; the current + previous and the new uncompleted version.
Following the completed download, the auto-update version will erase the previous version and will hold two versions; current + next.
Note that v2.1.2 was removed from the file system when v.2.3.0 turned current.
Workstation invites users to engage with it by connecting third-party applications, such as SharePoint, Confluence, Jira, and many others.
Any connection is using the network, whether the application is self-hosted or a SaaS.
Connecting third-party applications initiates OAuth2.0, SMAL, or OAuth1.1 authentication flows that are using the network.
Once the connection is established, Workstation will query its server to provide the interface with content sourced in the third-party application. Each third-party application generates at least one HTTPS request each time the user brings Workstation to the foreground.
Enterprise Search Activity
Besides the above automatic updates, users can initiate searches in their third-party applications. Each search triggers an HTTPS request that collects the results from the remote servers.