• No results found

Unit 2: Building LiveView Applications

N/A
N/A
Protected

Academic year: 2021

Share "Unit 2: Building LiveView Applications"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)

Unit 2: Building LiveView Applications

(2)

– Examine the Live Datamart Architecture

– Understand different techniques to insert data into Live Datamart

tables

– Define different types of LiveView Tables

– Introduce the Project Viewer

(3)
(4)

Publishing Data into Live Datamart

(the Data Layer)

LDM Data Layer

Item Category Price

RawItems Table

Data

Table

Query in LiveQL; processed on server side - example:

avg(Price) as priceAvg

“select Item, Category priceAvg From AggItems”

AggItems

Table

Transform

Data

Table

Join

Remember: Can pose queries to ANY LiveView Data

Table: base or generated

Manipulations

Generated Tbls

Base Tables

Pr

eproces

sor

sbapp

Embedded Data Source

Embedded Publisher

Java

Client

Uses

Publish

API

ItemsAvgPrice

Table

Item Category AvgPrice

Author-Time Agg

“select Item, Category, AvgPrice from ItemsAvgPrice”

OrdersTable

“select Item, Category, avg(Price) as priceAvg Group By Item, Category

from RawItems”

sbapp

(5)

• Data Sources

• Embedded Publishers

• LiveView Publish Adapter

• LiveView Client

(6)

• Implemented via sbapp hosted in-process

• Data Source

– Provides data to only a single Table

• Embedded Publisher

– May publish to multiple tables

– Supports recovery of persistent tables

• Preferred over Client APIs and LiveView Publish Adapters

because

– Life cycle management handled by server

– No connectivity issues (for example, no such host) because they are

in-process

– No reconnect worries

– Higher performance – uses local container connection

(7)

• LiveView Publish Adapter from a StreamBase app

– Convenient for use with external SBDs/existing StreamBase apps

– NO support for recovery of persistent tables (LiveView Publisher

HAS this support)

– NOT the fastest publishing method:

– Due to translations through different external protocols:

Adapter -> LiveView Protocol -> Services Layer -> StreamBase

Protocol -> Data Layer

• LiveView Client API

– Allows for use of multiple APIs (.NET, java, JS)

– Uses same underlying functionality as the LiveView Publish

Adapter

(8)
(9)

Includes relationships as directed graph of data flow. Created from lvconf configuration files. Continually monitored and updated to reflect project changes

Visual representation of relationship between various components

Provides project control features

Ability to run project; visual representation for status of tables (spinning disk animation while starting, green border when fully started). Supports dynamic add, drop, start and stop of tables

(10)

Live Datamart Data Layer and the Project Viewer

LDM Data Layer

Item Category Price

RawItems Table

Data

Table

Query in LiveQL; processed on server side - example:

avg(Price) as priceAvg

“select Item, Category priceAvg From AggItems”

AggItems

Table

Transform

Data

Table

Join

Remember: Can pose queries to ANY LiveView Data

Table: base or generated

Manipulations

Generated Tbls

Base Tables

Pr

eproces

sor

sbapp

Embedded Data Source

Embedded Publisher

Java

Client

Uses

Publish

API

ItemsAvgPrice

Table

Item Category AvgPrice

Author-Time Agg

“select Item, Category, AvgPrice from ItemsAvgPrice”

OrdersTable

“select Item, Category, avg(Price) as priceAvg Group By Item, Category

from RawItems”

sbapp

(11)

Use to specify table schema, either by reference to named schema or by editing a schema grid directly.

Data Table

Use to create simple data source EventFlow application that will send data to a specified table. Can automatically create a Feed Simulation based on the table’s schema to generate random data for the table.

Data Source

Use to create publishing application to publish data to one or more data tables. Includes options for Feedsim, EMS and FTL as sources. Bus options support recovery.

Publisher

Use to create aggregation between two existing tables (Base table feeds the Target table with some type of projection (and optional predicate)

Aggregation

Use to create a transformation application to take data from a source table, manipulate it in some way, then place into target table.

Transform

Preprocessor

(12)
(13)

Use to specify table schema, either by reference to named schema or by editing a schema grid directly.

Data Table

Use to create simple data source EventFlow application that will send data to a specified table. Can automatically create a Feed Simulation based on the table’s schema to generate random data for the table.

Data Source

Use to create publishing application to publish data to one or more data tables. Includes options for Feedsim, EMS and FTL as sources. Bus options support recovery.

Publisher

Use to create aggregation between two existing tables (Base table feeds the Target table with some type of projection (and optional predicate)

Aggregation

Use to create a transformation application to take data from a source table, manipulate it in some way, then place into target table.

Transform

Preprocessor

(14)

No naming conventions are enforced.

Table Name

Schema can be predefined and reused from

some saved project or entered here.

Schema

(15)

Every LiveView Table requires a Primary Key.

Primary Key (Indexes)

In addition to the required primary key, for

performance tuning secondary indexes may be

added

Secondary Indexes

(16)
(17)

Every LiveView Table requires a Primary Key.

Primary Key (Indexes)

In addition to the required primary key, for performance tuning secondary indexes may be added

Secondary Indexes

(18)

– Live Datamart Architecture – the Data Layer

– How to get data into Live Datamart

– Project Viewer

(19)

References

Related documents