Skip to content

Latest commit

 

History

History
161 lines (105 loc) · 11.9 KB

README.md

File metadata and controls

161 lines (105 loc) · 11.9 KB
view github pages Predix RMD Reference App =====================

Welcome to the Predix Remote Monitoring & Diagnostics (RMD) Reference Application. The Predix platform enables you to create applications with an Industrial Internet focus and allows you to manage and scale those applications as they are consumed by your end users.

The RMD Reference App shows developers and architects how to use and leverage all of the Predix application building block Services you find in the Catalog. So, it only has some aspects of a fully featured RMD application. Instead, it's intent is to show developers and architects a best-practices microservices application architecture integrating with all the underlying Predix Services. It will save you a few weeks or months of effort if you leverage the components inside.

You can view a running version of the Reference App in your browser using these login credentials

    User: app_user_1
    Password: app_user_1

You can view our Video and later run the deployment script , which will push the Reference App to your own Cloud Foundry space so you can quickly start trying out various Predix Services.

Now, take a few moments to learn all about Predix, using Reference App as a guide. There is lots to discover and soon you'll be creating Predix Apps of your own.

##Predix Integration The Reference App Front-End and Back-End Microservices demonstrate how to use the Predix PAAS to build an Industrial Internet application. The app takes advantage of the following Predix components:

Base Asset Monitoring Reference App Installer

Digital Twin Analytics Reference App Installer

Edge Starters - Personal Edition Installer

##RMD Reference App RMD Reference App is composable and the pieces can be used in a variety of configurations to help solve your Application use-case. Like most Apps, at it's core, Reference App consists of a RMD UI front end microservice and a RMD Datasource back-end microservice.

Beyond the core services there are other microservices and microcomponent utilities which help generate Data, make Secure Rest calls or integrate with all the different Predix Services and Security.

##Detailed Architecture of the Base Asset Monitoring Reference App

Architecturally the reference app is organized into four Tiers (Presentation, Delivery, Aggregation and Storage) and supports three Data Flows (Ingestion, Analytics, Visualization)

  • Presentation Tier - UI layer and microservices
  • Delivery Tier - Cacheing, Mobile, Personalization
  • Aggregation Tier - Service Composition and Business Logic
  • Storage Tier - the Predix PAAS Services

The 2 main microservices and some helper microservices which are pushed to and run in cloud foundry, as follows:

###Ingestion Flow When you install the Reference App, Data Flows from the DataSimulator to Predix Time Series.

In the real world, the Predix Machine DataRiver posts data over a websocket to the Time Series service directly. The Edge Starter applications do just that.

We have a custom Web Socket Server microservice as part of the Reference App UI. The simulator also sends it the same data, which allows for a Live websocket feed to the RMD UI and also provides a trigger point for Analytics.

(future) Raw data often needs cleaning and preparation before it is consumable via Analytics and UI. A best-practice would be to mark this data as raw and trigger Cleansing and Quality jobs leveraging the analytics framework.

###Visualization Flow The UI accesses data from Predix Asset directly which drives the Asset selector menu. Once a selection is made the View requests data from the RMD Datasource and returns the data from Predix Asset and Predix Time Series in a mashup. However, in the Graph Widget the Time Series service is accessed directly.

##Detailed Architecture of the Digital Twin Analytics Reference App

###Analytics Flow Data arrives via the Ingestion Flow and is stored. A message is placed in a queue which kicks off an Analytic Orchestration. The Analytics uses data from Predix Asset and Predix Time Series, produces a result, which is then stored back to Predix Asset or Predix Time Series or potentially to/from any other datastore.

##Getting Acquainted with Reference App

Go through the following tutorial to get acquainted with Predix RMD Reference application.

https://www.predix.io/resources/tutorials/tutorial-details.html?tutorial_id=1473&tag=1610&journey=Connect%20devices%20using%20the%20Reference%20App&resources=1592,1473,1600

##Setting up your environment Reference App accesses code repos at https://github.com/PredixDev and a maven repository at https://artifactory.predix.io.

The best experience is to use a DevBox which has all the tools and settings pre-installed.

Follow the instructions in the below link on how to setup your development environment: https://www.predix.io/resources/tutorials/journey.html#1607

##Predix Hello World Go through the following tutorial on how to build a simple hello world application using Predix components.

https://www.predix.io/resources/tutorials/journey.html#1719

##Microservices The Base Asset Monitoring Ref App consists of 2 core microservices and 2 helper microservices. Each microservice can be individually managed and scaled, leveraging the Cloud Foundry infrastructure. These services can be mixed and matched for your next Predix application depending on which services you need to integrate with.

The configuration file used by the installer is loacted under scripts/refappConfig.py folder

rmdAppClientId = "app_client_id"
rmdAppSecret = "secret"
uaaAdminSecret = "secret"

###RMD-Ref-App-UI An AngularJS/Web Components based UI framework. We used the Predix Dashboard Seed as a starting point. The UI talks to the RMD Datasource Service, Predix UAA, Predix Asset and Predix Timerseries back-end services.

###RMD Datasource Service A Mashup Service doing much of the logic for the Reference App. It talks to Predix Asset and Time Series databases and return results for display.

###FDH Datahandler Service - DataExchange The Federated Data Handler DataExchange framework retrieves data from any Datasource using a simple Get or Put API. The Analytic framework leverages it to retrieve data and store results. DataExchange can help manage data Get/Put requests that are from distributed, near-data, relational db, public internet, in a file, via other Rest APIs and also at the Edge (on Machines outside the cloud).

###Data Seed Service A service to help create sample data in Predix Asset. Upload a spreadsheet of data and it creates Groups, Classfications, Assets and Meters in Predix Asset.

###Data Exchange Simulator Service A Service to generate data when a physical machine is not available. The Simulator sends data to the Data Exchange Service when it is up and running.

###RMD Orchestration Service A Service that listens for FieldChangedEvent Queue messages to trigger Predix Analytic Orchestrations. The DataIngestion service puts these messages on the queue when data for a Field representing a Sensor arrives. Orchestrations themselves can also place messages on the queue which can trigger more Orchestrations updating attributes up (or down) the Asset Hierarchy.

###RMD Analytic Service An Analytic Microservice framework that receives Orchestration requests, resolves data and computes results. The analytics can be in the cloud, streaming analytics, against near-data datasources (hadoop, etc), or also at the edge (on Machines outside the cloud).

##Asset Model

Using the tutorial below, you will learn about the RMD Reference App asset model to help understand how you can create your own asset model for your Industrial Assets.

https://www.predix.io/resources/tutorials/tutorial-details.html?tutorial_id=1708&tag=1709&journey=Reference%20App%20and%20Predix%20Asset

##APIs The reference app defines some apis and message bodies that are needed to communicate between microservices. They are defined by xsd but at runtime use JSON.

##Microcomponents

####Known Issues

  • Safari has visual issues
  • Chrome can have blurring

More Details

Analytics