Unstructured Data Transfer in Rest.li

Sheng Liang
8 min readadvanced
--
View Original

Overview

The article discusses the release of Unstructured Data Reactive in Rest.li, an open-source REST framework developed at LinkedIn. It highlights the limitations of handling unstructured data within Rest.li and introduces the concept of reactive streaming for efficient data transfer.

What You'll Learn

1

How to implement unstructured data handling in Rest.li applications

2

Why reactive streaming is essential for non-blocking data processing

3

When to use EntityStream for efficient data transfer

Prerequisites & Requirements

  • Understanding of RESTful APIs and JSON data structures
  • Familiarity with GitHub for accessing source code(optional)

Key Questions Answered

What are the limitations of handling unstructured data in Rest.li?
Rest.li traditionally requires data to be in a JSON-like structure, which limits its ability to handle unstructured data such as PDFs or images. This limitation has become increasingly problematic as unstructured data use cases grow, prompting the need for a more unified solution.
How does reactive streaming improve data processing in Rest.li?
Reactive streaming allows for asynchronous, non-blocking data transfer, ensuring that neither the data producer nor consumer is held up by slow operations. This approach enhances performance and resource management, particularly in scenarios with high data throughput.
What is the purpose of the EntityStream in Rest.li?
EntityStream is an abstraction for representing request or response bodies in Rest.li, facilitating asynchronous data transfer between a Writer and a Reader. It ensures that data is consumed only as requested, allowing for efficient back pressure management.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Framework
Rest.li
Used for building robust, scalable RESTful architectures.
Platform
Github
Source code for Unstructured Data Reactive is available here.

Key Actionable Insights

1
Implementing unstructured data handling in Rest.li can significantly enhance your application's capability to process diverse data types, such as images and documents.
As applications increasingly rely on various data formats, enabling unstructured data support can improve user experience and broaden functionality.
2
Utilizing reactive streaming in your data transfer processes can lead to better performance and resource utilization.
By adopting non-blocking I/O, your application can handle larger volumes of data without being constrained by slow operations, making it more responsive.

Common Pitfalls

1
Assuming that EntityStream can span across network connections can lead to misunderstandings in data flow management.
EntityStream operates within the same JVM, and misinterpretation of its scope can cause inefficiencies in data handling and back pressure management.

Related Concepts

Restful API Design Principles
Asynchronous Programming
Data Streaming Techniques