Agenda Introduction on Stream Processing Models [done] - - PowerPoint PPT Presentation

agenda
SMART_READER_LITE
LIVE PREVIEW

Agenda Introduction on Stream Processing Models [done] - - PowerPoint PPT Presentation

Agenda Introduction on Stream Processing Models [done] Declarative Language: Opportunities, and Design Principles Comparison of Prominent Streaming SQL Dialects for Big Stream Processing Systems Conclusion The key idea


slide-1
SLIDE 1

Agenda

  • Introduction on Stream Processing Models [done]
  • Declarative Language: Opportunities, and Design Principles
  • Comparison of Prominent Streaming SQL Dialects for Big Stream

Processing Systems

  • Conclusion
slide-2
SLIDE 2

–J.W. Lloyd

“The key idea of declarative programming is that a program is a theory in some suitable logic, and the computation is deduction from the theory”

slide-3
SLIDE 3

Advantages

  • Decouple interpretation and execution (e.g. parallelism)
  • Allows optimisation relying on the formal semantics
  • IDEALLY PORTABLE (well-defined semantics)
slide-4
SLIDE 4

How to design a good language?

slide-5
SLIDE 5

a language should provide only a small set

  • f needed language

constructs so that the same meaning cannot be expressed by different language constructs;

Minimality

slide-6
SLIDE 6

a language should ensure that the same language construct always expresses the same semantics regardless of the context

Symmetry

slide-7
SLIDE 7

a language should guarantee that every meaningful combination its constructs is applicable.

Orthogonality

slide-8
SLIDE 8

When do we need it?

  • Writing the optimal solution is as hard as solving the

problem (e.g. JOIN optimisation)

  • We want to enhance programmer productivity by adding

Domain-Specific abstraction (e.g. streams)

  • We want to limit the expressiveness of the languages to

ensure some nice property (e.g. decidability)

slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11

Parser

Program/Query

slide-12
SLIDE 12

Parsing

  • Obtaining the Declarative

Program/Query

  • Verify it is is syntactically valid
  • Creating an AST
slide-13
SLIDE 13

Parser Logical Optimiser

Program/Query

Abstract Syntax Tree

slide-14
SLIDE 14

Logical Planning

  • Obtaining the AST of the

program/query

  • Verify all the preconditions

hold

  • Apply optimisations
  • Errors: statistics not updated,

wrong decision

  • Generates logical plan
slide-15
SLIDE 15

Parser Logical Optimiser

Program/Query

Abstract Syntax Tree

Physical Optimiser

slide-16
SLIDE 16

Example

slide-17
SLIDE 17

Physical Planning

  • Obtaining the logical plan of

the program/query

  • Verify all the preconditions
  • Errors: table not exists
  • Generates physical plan
slide-18
SLIDE 18

Parser Logical Optimiser

Program/Query

Abstract Syntax Tree

Physical Optimiser Execution Engine

Physical Plan

results

slide-19
SLIDE 19

Example

slide-20
SLIDE 20

Executing

  • Obtain physical plan of the

query

  • Load it for execution
  • Run!
slide-21
SLIDE 21

Runtime Errors

  • Input not compliant to the

expected one

  • Table dropped while running
  • Network fail (fixable)
  • Node fail (fixable)