16
© Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re- usable Component Architecture

© Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

Embed Size (px)

Citation preview

Page 1: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

ESCWA SDMX Workshop

Session: SDMX and a Re-usable Component Architecture

Page 2: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Goals• Language Independent Architecture

• High Cohesion

• Loose Coupling

• Program to Interfaces – Not Implementations

Page 3: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

• SDMX-ML is for EXCHANGE between systems

• The SDMX Information Model is where the power is

Use the Model

Page 4: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Finding the Common Model

Page 5: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

What is Data?

• Results of Measurements

Country: UK

Unemployed: 13million

Year: 2010

Country: France

Unemployed: 5million

Year: 1982

Country: Australia

State : Perth

Coastline (Km): 12500

Page 6: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Modelling Data

KEY

Values

Country : UK

Type : Real

Basket : Narrow

Country : UK

Basket : Narrow

Time Period : 2000-01

Type : Real

Value : 107.8Type : Nominal

Value : 104.8

Time Period : 1999-10

Value : 106.34

Time Period : 2001-02

Value : 101.73

Page 7: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Compact

2.0

“Compact”

2.1

Compact

2.0 To 2.1

Transformation

“Compact”

2.1 To 2.0

Transformation

Simple Data Transformation Model

Page 8: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Compact

1.0

Generic

1.0

Utility

1.0

Compact

2.0

Generic

2.0

Utility

2.0

Structure

Specific

2.1

Generic

2.1

EDI

CSV ???

Simple Data Transformation Model

Page 9: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Data Reader

Interface

Data Writer

Interface

Read Key Read Observation

Write Key Write Observation

Compact

Generic

EDI

Compact

Generic

EDI

Decoupled Data Transformation Model

Page 10: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Summary so far

• Good design protects software from change

• Finding a common model means everything can be reused

Page 11: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Break Down The ProblemCreating Sub-Systems

Page 12: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Make a Generic Solution

• Each aspect of a system can be broken down into a

sub-system

• Each sub-system has a specific responsibility

Page 13: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Break down the Problem

• SDMX breaks down nicely into sub systems

Structure Validation

Data Validation

Data Transformation

Data Reading

Data Writing

Structure Transformation

Generating a Data Query

Consuming a Data Query

Consuming a Structure Query

Generating a Structure Query

Querying a FileCalling a Web Service with a

Structure Query

Page 14: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Interfaces can be reused

BeanRetrievalManager

File Retrieval In Memory Retrieval Web Service Retrieval

Page 15: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Database

UserData Query Web Service

Database Administrator

Response Format?

Request Format?

Implementing a Web Service for Data

Page 16: © Metadata Technology ESCWA SDMX Workshop Session: SDMX and a Re-usable Component Architecture

© Metadata Technology

Database

UserData Query Web Service

SDMX Query

Data Parser

Data Query Engine

Data Writer

Build Data Query Bean From Any version of SDMX Query

•Consumes SDMX query, and gets parser to create bean

•Passes Query to Database layer, along with Data Writer

A powerful concept of passing an interface with useful methods such as :

startSeries(…),

addObservation(…)

addAttribute(…)

Internally the DataWriter wraps an output stream, and writes SDMX straight to the output stream.

What Implements Data Writer?

Generic Data Writer

Compact Data Writer

Utility Data Writer

EDI Data Writer

???

Implementing a Web Service for Data