Pulsar Application Architecture Overview
Pulsar is a sophisticated and versatile enterprise application that is configurable and customizable while providing high data security. To achieve this engineering feat, under the hood, the application's architecture needed to handle complex and concrete layers of components. It consists of five layers that communicate internally to display, process, and validate your data to create a seamless experience for users while offline. Some layers also communicate externally by interfacing with the user’s device to use location data, Bluetooth, the camera, or other functions.
This document aims to provide a high-level overview of the architecture and relationships that make Pulsar a great application. We make data security the primary objective since the data resides offline on the user's device. To provide the best data security, responsible software architecture separates the data and application layers. To achieve this, we created a bridge layer to allow secure access between the two. Pulsar’s architecture consists of five layers:
UI Layer
Local Web Server
JSAPI
PSL
Local Databases
UI Layer
The UI Layer is what Pulsar uses to present the Salesforce data to the user, based on the Salesforce metadata. The UI layer is the main user interface, and uses HTML and Javascript to allow the users to interact with Pulsar and their data. Examples of the UI layer include application tabs, list views, search, compact and detail layouts, related list views, etc.
UI Layer Examples
Out of the box, the UI layer uses the Salesforce Design System to maintain a consistent user experience across device platforms. Customers can also write and deploy custom UI elements or a whole custom UI application using HTML and Javascript to suit the organization’s needs. You can learn more about customizing the Pulsar UI in this article: https://luminix.atlassian.net/wiki/spaces/PD/pages/8683524/Pulsar+Platform+-+Build+rich+user+interfaces+for+Pulsar. Whether custom or out of the box, the UI Layer connects to the local web server layer using HTML/REST.
UI Customization Examples
Local Web Server
The local web server separates the UI from the Data Layer, to ensure data security. The local web server connects the UI Layer to the JSAPI layer via a bridge call.
JSAPI Layer
The JSAPI layer bridges the UI and Local Web Server application layers and the PSL and Local Databases data layers.
The JSAPI layer consists of API endpoints used to interact with databases, execute business logic, and invoke platform functions. Customer customizations can consume the APIs in this layer to access the database. The JSAPI Layer connects to the PSL Layer and the Local Databases. This layer also connects externally to the user’s device. In other words, this layer connects the UI to the data underneath.
PSL Layer
The PSL Layer is a tool for executing business logic written by customers. While offline, the PSL layer uses settings logic in a database-like language to implement business rules, validations, and workflows. App events or custom buttons usually trigger these settings. Like the JSAPI Layer, the PSL Layer connects to the local databases. This layer also connects externally to the user’s devices. When online, this layer can also bypass the local databases to directly connect with the Salesforce server to create or update records during a sync operation. Learn more about the PSL layer here: https://luminix.atlassian.net/wiki/spaces/PD/pages/10158082/Pulsar+Settings+Language+PSL.
Local Databases
The local databases contain the raw data. This is where the tables and relationships exist in an encrypted state. These databases connect to the JSAPI and PSL layers. When online, the local databases interact with the Salesforce server to sync data, settings, and resources.
Summary
Pulsar’s five layers interact to provide the user with a seamless experience and secure interaction with their Salesforce data while offline. The different layers also serve as a form of data security, by segregating data from processing instructions and display instructions. Each of the five layers has a specific role in the process, which we will explore in subsequent articles.