Docsity

Managing and Accessing Large Scientific Datasets: XML and Binary Data Formats - Prof. Prav, Study notes of Civil Engineering

Toggle sidebar
bg1
1
1
Managing and Accessing Large
Managing and Accessing Large
Scientific Datasets
Scientific Datasets
Part 5
Part 5
XML and Binary Data Formats
XML and Binary Data Formats
Mike Folk
NCSA/University of Illinois at
Urbana-Champaign
2
XML and binary data formats
XML and binary data formats
• Based on paper by Robert E. McGrath:
ā€œXML and Scientific File Formatsā€. NCSA, Aug 2003
http://hdf.ncsa.uiuc.edu/RFC/XML-bin/XML-and-Binary.doc
• Motivation:
– To learn how XML and binary best used by scientists
– To learn how XML and binary should work together
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Managing and Accessing Large Scientific Datasets: XML and Binary Data Formats - Prof. Prav and more Study notes Civil Engineering in PDF only on Docsity!

1

Managing and Accessing LargeManaging and Accessing Large

Scientific DatasetsScientific Datasets

Part 5Part 5

XML and Binary Data FormatsXML and Binary Data Formats

Mike Folk

NCSA/University of Illinois at

Urbana-Champaign

[email protected]

2

XML and binary data formatsXML and binary data formats

• Based on paper by Robert E. McGrath:

ā€œXML and Scientific File Formatsā€. NCSA, Aug 2003

http://hdf.ncsa.uiuc.edu/RFC/XML-bin/XML-and-Binary.doc

• Motivation:

  • To learn how XML and binary best used by scientists
  • To learn how XML and binary should work together

3

Summary SlideSummary Slide

• Definition of ā€œData Formatā€

• Text and ā€œbinaryā€ formats

• XML vs. Binary – Quick look

• Translate between the formats as needed

• Pointers to binary data

• Summary

4

Definition of ā€œData Formatā€Definition of ā€œData Formatā€

  • A data format is a method for representing data in a digital store (which may be transient or persistent).
  • A data format has:
    • A model of data representation
    • A mechanism for describing data, i.e., for mapping concepts of the data model to digital objects such as files or memory
    • Optionally, standard methods for manipulating data.
  • When data model is very general, a data format may also have means to specify profiles - More specific sub-cases of the data model that model particular application or community concepts - A higher layer

7

XML vs. Binary –XML vs. Binary– Quick lookQuick look

Tight integration in specific system, e.g.,

  • Optimized for specific systems, access patterns
  • Customized profile and library (e.g., HDF-EOS)

Integrated with Web/GRID standards, e.g.,

  • XSL
  • Web Services
  • Semantic Web

XML Binary

8

Using XML and Binary Data FormatsUsing XML and Binary Data Formats

• There are good reasons to use both

• Sometimes in the same systems and apps

• Two approaches considered here

– Translation between XML and binary

– Mixed model of XML with pointers to binary

data

9

Translate between the formats as neededTranslate between the formats as needed

• XML as a ligua franca between systems, while

using different formats internal to the system

  • Web services and Grid Services approach
  • Also database systems

• Scientific apps and systems commonly deal with

data in many formats

  • Commonly create ā€œreadersā€ that translate different binary formats
  • Could also translate to and from XML
  • E.g. HDF5 Ɔ XML Ɔ HDF

10

ExampleExample –– HDF5 dataset in XMLHDF5 dataset in XML

<hdf5:Dataset Name="datasetF32" OBJ-XID="xid_976-0" H5Path="/datasetF32" Parents="xid_928-0" H5ParentPaths="/"> ... <hdf5:Dataspace> ... </hdf5:Dataspace> <hdf5:DataType> ... </hdf5:DataType> <hdf5:Data> ... </hdf5:Data> </hdf5:Dataset>

13

XML StylesheetsXML Stylesheets

• XML Stylesheet:

– A mechanism for transforming from one XML

ā€œgrammarā€ to another.

– Contain formatting info for an XML document

• Stylesheets enable

– An XML doc to be displayed in different ways

– Data filtering

– Data translation

14

Stylesheet exampleStylesheet example

Convert binary netCDF to binary HDF5Convert binary netCDF to binary HDF

15

Translating between formatsTranslating between formats

• Hence many ways to convert between binary and

XML

  • Binary Ɔ XML
  • XML Ɔ binary
  • XML Ɔ other XML

• General approach: define extensible framework in

XML, then map every binary format to the

framework

• Has been proposed several times

  • XDF – Extensible Data Format
  • ESML – Earth Science Markup Language
  • ā€œData Format Description Languageā€ (GGF)

16

Translating between formatsTranslating between formats

• But perfect translation is seldom achievable

  • Many concepts map easily
  • A few are very difficult
  • Some details that simply cannot be adequately translated
  • As a result, info may be lost in the translation process.

• And has the intended meaning been translated?

  • Can the translated object be used and interpreted correctly?
  • Especially for scientific data, which usually can be interpreted only within a theoretical context that may be reflected in subtle properties of the data.
  • The ā€œSemantic Webā€ may be useful to ā€œmark upā€ data with additional information required to interpret it.

19

Pointers to binary dataPointers to binary data

• Approach:

  • XML specifies a pointer (extended hyperlink) that can be correctly interpreted by software that reads the XML.
  • The pointer can be a URL or similar tag, which can include information about how to access the data at that address.

• And, the XML could have other information

  • Multiple addresses, e.g., for replicates
  • Detailed parameters for the access method(s)
  • Specification of the format of the retrieved data
  • Specification of a sub-set or other selection from a large dataset

20

Pointers to binary data: ExamplePointers to binary data: Example

• Example: a matrix

• Instead of including numbers in XML, represent

matrix by a link:

<link ULR=ā€some.urlā€ FileType=ā€a mime typeā€ ObjectName=ā€id of matrixā€ />

21

How to actuallyHow to actually accessaccess the binary data?the binary data?

  • XML markup could specify the algorithms to be used
    • ā€œthis set of bits should be interpreted using this algorithmā€.
  • Ways you can do this
    • Include standard name for the algorithm
      • e.g., MPEG
    • Include a pointer to code that implements the algorithm
      • e.g., a library or service that can read the bits
    • Include the algorithm in the XML
      • e.g., some kind of program expressed in XML
    • Describe the data in a machine-interpretable form
      • BinX ā€œdata format description languageā€
      • http://www.edikt.org/binx/

22

How BinX worksHow BinX works

25

Best Uses for Binary Data FormatsBest Uses for Binary Data Formats

  • Efficiency and scalability
    • Access
    • Space usage
    • Numeric computation
  • Complex data strurctures
    • Search structures
    • Compression
    • Unstructured grids
    • Tiles
  • Highly customized data access algorithms
    • Selection
    • Filtering
    • Scatter-gather
    • Parallel I/O

26

Best uses for XML Best uses for XML

• Overwhelmingly universal

• Portable

• Many kinds of data and process description

• Common language for data catalogs, DB

27

Best uses for XML Best uses for XML

• For heterogeneous systems with multiple users

and multiple purposes

  • Sharing data across
    • space (geographic distribution)
    • time (archiving)
    • conceptual domains (different users, communities, and uses)
  • And, generic software makes it easier to share complex details of scientific data

• Partial transcription

  • Description of data without the data
  • May be preferable to the data itself.

28

Poor uses of XML Poor uses of XML

• Representing large arrays of numbers and

structures other than a tree

• Representing a data definition that is a

restriction on a set of objects

– XML Schema can express some kinds of

restrictions (e.g. range of values) but must use

tags to define structural relations

• Can be catastrophically slow for some

numerical applications