Ser321 Principles of Distributed Software Systems 2 ...

cnSerialization.fm

Ser321 Class Notes

Ser321 Principles of Distributed Software Systems

2. Externalizing with Serialization

? Section 2.a Introduction to Serialization ? Section 2.b Basics of Java Execution ? Section 2.c Basics of Serialization with Java ? Section 2.d Customizing Java Serialization ? Section 2.e Multi-Language Compatible Serialization ? Section 2.f Serialization in C# with .NET

Principles of Distributed Software Systems? T. Lindquist 2018

January 2018

Page 1

cnSerialization.fm

Ser321 Class Notes

2.a Introduction to Serialization 2.a.1 Motivation

? How can we save an instance of a user-defined class to a file for later use? ? How can we migrate an instance of a user-defined class across a network?

- Can the class definition and associated methods come with the object? - If the class definition is already resident, how do we know it matches the

class definition on the remote host? ? What if the user-defined object contains information, such as a file handle,

that doesn't make sense to transfer or we want a specific transfer format? ? Outcomes

- To be able to use the Java API interfaces, classes and methods involved with Externalization and Serialization.

- To be able to move an instance from one Java virtual machine to another via the network or a file. To be able to customize serialization.

Principles of Distributed Software Systems? T. Lindquist 2018

January 2018

Page 2

cnSerialization.fm

Ser321 Class Notes

2.a.2 Readings

? In Java Network Programming and Distributed ComputingText: - Chapters 4, especially 4.5: Data Streams and Object Externalization, Serialization

? In Java Network Programming 4th Edition Text: - Chapter 2: Streams

? See also Java Serialization in the Java Tutorial - Tutorial -> Essential Classes -> Basic I/O -> Object Streams -

? Json (JavaScript Object Notation). see:

Principles of Distributed Software Systems? T. Lindquist 2018

January 2018

Page 3

cnSerialization.fm

Ser321 Class Notes

2.a.3 Index to Serialization Examples

? Serialize Group instance to a file: Section 2.c.3 Serializing Objects ? Java XML Serialization: Section 2.e.4 Serialization to XML ? JSON serialization: Section 2.e.3 JSON (JavaScript Object Notation)

Values ? Basic .NET IO: Section 2.f.2 Basics of Stream Input and Output in .NET

System.IO ? .NET Serialization: Section 2.f.3 Serializing an Object Graph ? .NET Collections: Section 2.f.7 XmlSerializer for IEnumerable or

ICollection

Principles of Distributed Software Systems? T. Lindquist 2018

January 2018

Page 4

cnSerialization.fm

2.b Basics of Java Execution 2.b.1 Java Virtual Machines

? Overview of JDK Compilation and Runtime Support.

Ser321 Class Notes

Principles of Distributed Software Systems? T. Lindquist 2018

January 2018

Page 5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download