Serialize
직렬화는 객체를 바이트 데이터로 변환하는 과정을 의미합니다.
Serialization is the process of converting an object’s state to a byte stream. Serialization allows us to save the data associated with an object and recreate the object in a new location
Serialization Format
JSON, XML, Binary 등 다양한 포맷으로 변환시킬 수 있습니다. (JSON, XML은 사람이 읽기 쉬운 형태여서 현재 자주 사용되는 포맷입니다.)
스프링에서는 Jackson을 통해 간편하게 객체 → JSON 형태로 변환하여 클라이언트에게 전달해 줍니다.

Deserialize
역직렬화는 문자열이나 바이트 데이터를 객체로 변환하는 과정을 의미합니다.
Deserialization is the process of reconstructing a data structure or object from a series of bytes or a string in order to instantiate the object for consumption.

Storage and Transmission
직렬화/역직렬화는 객체를 쉽게 저장하고 다른 시스템으로 전송하기 위해 중요한 작업입니다.
특히, 이것은 분산 시스템에서 서로 다른 시스템끼리 데이터를 주고받을 때 유용하게 사용될 수 있습니다.
a web application allows users to create and save documents. When a user saves a document, the application needs to store and document’s state in a database.
1. the application must first serialize the document object to a byte stream and then store the byte stream in the database.
2. Later, when the user wants to open the document, the application must retrieve the byte stream from the database.
2-1. it first deserializes the byte stream back into a document object and then displays the document to the user.
Serialize/Deserialize 처리 과정
1. 사용자가 애플리케이션에게 문서를 전달한다.
2. 애플리케이션은 요청한 정보를 객체로 변환한다.(JSON → Web Server : Deserialize)
2-1. 변환된 객체를 데이터베이스에 저장한다.(Object → SQL query : DB write)
3. 사용자가 작성한 문서를 애플리케이션에게 요청한다.
3-1. 애플리케이션은 데이터베이스로부터 데이터를 조회한다.(SQL query→ Object : DB read)
3-2. 애플리케이션은 사용자에게 요청한 문서를 반환한다.(Object → JSON : Serialize)
'CS > Network' 카테고리의 다른 글
Segment vs Packet: OSI 전송 계층과 네트워크 계층 이해하기 (0) | 2025.03.16 |
---|---|
HTTP와 HTTPS 차이, 왜 HTTPS를 사용해야 할까? (0) | 2025.02.01 |
[Network] HTTP 프로토콜 버전 이해 - HTTP/1.0, HTTP/1.1, HTTP/2.0, HTTP/3.0, and QUIC (0) | 2024.06.18 |
네트워크 TCP/IP 모델 4계층 이해하기 - Internet Protocol Stack (0) | 2024.06.18 |
[Socket] 웹 소켓 이해하기 - 양방향 실시간 통신, 메시지 프로토콜, 채팅 (0) | 2024.02.24 |
Serialize
직렬화는 객체를 바이트 데이터로 변환하는 과정을 의미합니다.
Serialization is the process of converting an object’s state to a byte stream. Serialization allows us to save the data associated with an object and recreate the object in a new location
Serialization Format
JSON, XML, Binary 등 다양한 포맷으로 변환시킬 수 있습니다. (JSON, XML은 사람이 읽기 쉬운 형태여서 현재 자주 사용되는 포맷입니다.)
스프링에서는 Jackson을 통해 간편하게 객체 → JSON 형태로 변환하여 클라이언트에게 전달해 줍니다.

Deserialize
역직렬화는 문자열이나 바이트 데이터를 객체로 변환하는 과정을 의미합니다.
Deserialization is the process of reconstructing a data structure or object from a series of bytes or a string in order to instantiate the object for consumption.

Storage and Transmission
직렬화/역직렬화는 객체를 쉽게 저장하고 다른 시스템으로 전송하기 위해 중요한 작업입니다.
특히, 이것은 분산 시스템에서 서로 다른 시스템끼리 데이터를 주고받을 때 유용하게 사용될 수 있습니다.
a web application allows users to create and save documents. When a user saves a document, the application needs to store and document’s state in a database.
1. the application must first serialize the document object to a byte stream and then store the byte stream in the database.
2. Later, when the user wants to open the document, the application must retrieve the byte stream from the database.
2-1. it first deserializes the byte stream back into a document object and then displays the document to the user.
Serialize/Deserialize 처리 과정
1. 사용자가 애플리케이션에게 문서를 전달한다.
2. 애플리케이션은 요청한 정보를 객체로 변환한다.(JSON → Web Server : Deserialize)
2-1. 변환된 객체를 데이터베이스에 저장한다.(Object → SQL query : DB write)
3. 사용자가 작성한 문서를 애플리케이션에게 요청한다.
3-1. 애플리케이션은 데이터베이스로부터 데이터를 조회한다.(SQL query→ Object : DB read)
3-2. 애플리케이션은 사용자에게 요청한 문서를 반환한다.(Object → JSON : Serialize)
'CS > Network' 카테고리의 다른 글
Segment vs Packet: OSI 전송 계층과 네트워크 계층 이해하기 (0) | 2025.03.16 |
---|---|
HTTP와 HTTPS 차이, 왜 HTTPS를 사용해야 할까? (0) | 2025.02.01 |
[Network] HTTP 프로토콜 버전 이해 - HTTP/1.0, HTTP/1.1, HTTP/2.0, HTTP/3.0, and QUIC (0) | 2024.06.18 |
네트워크 TCP/IP 모델 4계층 이해하기 - Internet Protocol Stack (0) | 2024.06.18 |
[Socket] 웹 소켓 이해하기 - 양방향 실시간 통신, 메시지 프로토콜, 채팅 (0) | 2024.02.24 |