1 of 10

Data Serialization

DB

STDIO Ghana

2 of 10

Objectives

  • Overall - Package program data in formats compatible with network transport or long-term storage

    • Describe how proper serialization solves a commonly faced issue in application development
    • Distinguish between various data formats
    • Choose serialization methods that are compatible with your data and system architecture

DB

STDIO Ghana

3 of 10

Objectives

  • Overall - Package program data in formats compatible with network transport or long-term storage

    • Explain external factors which must be considered when selecting a serialization format
    • Serialize a variable for long-term local storage
    • Serialize an object and transfer it over a network

DB

STDIO Ghana

4 of 10

Serialization

  • Program Data
    • Objects/ Data Structures
    • Storage
      • Persistence
    • Transportation
      • External Interaction
      • Distribution
    • Checkpoint Saving

DB

STDIO Ghana

5 of 10

Data Structures

  • Variables
  • Objects
  • Binary vs. Text
  • Character Encoding
    • ASCII
    • UTF-8/16
    • Unicode
  • Architecture Independence
    • Byte Order

DB

STDIO Ghana

6 of 10

Data Type Quiz

Binary or ASCII File?

  1. HTML
  2. PNG
  3. MS Word Document
  4. MS Notepad Document
  5. Python Code
  6. Google Chrome
  7. Javascript
  8. PDF

7 of 10

Considerations

Private/Proprietary Data Formats?

  • Implementation could be exposed
    • Should you encrypt?
  • Requires openness about serialization format for interoperability
    • Will you allow compatibility/extensibility?
    • Open API / Closed implementation?

DB

STDIO Ghana

8 of 10

Storage

Binary Packaging

  • encrypted
  • compressed (e.g., gzip)
  • Hierarchical Data Format (HDF)
  • NetCDF

Text packaging

  • XML vs. JSON
  • HTML
  • Property List

DB

STDIO Ghana

9 of 10

Transportation

  • Local to file/database (When?)
    • Pointer Unswizzling
  • Remote to peer
    • Ad Hoc connection
  • Remote to Client/Server
    • Available Listening System
    • AJAX
    • JSON
  • Protocols
    • http
    • ftp

DB

STDIO Ghana

10 of 10