LIquid: The soul of a new graph database, Part 1

Scott Meyer
14 min readintermediate
--
View Original

Overview

The article introduces LIquid, a new graph database developed by LinkedIn, designed to facilitate real-time querying of the economic graph. It highlights LIquid's architecture, its relational model implementation, and the challenges it addresses in managing second-degree connections within large networks.

What You'll Learn

1

How to utilize LIquid for efficient graph data querying

2

Why conventional relational databases struggle with graph data

3

How to implement a flexible schema using edges in graph databases

Prerequisites & Requirements

  • Understanding of graph databases and relational models
  • Familiarity with querying languages like SQL(optional)

Key Questions Answered

What is LIquid and how does it function as a graph database?
LIquid is a graph database developed by LinkedIn that implements a relational model to support fast, constant-time traversal of graph edges. It uses a declarative query language based on Datalog and is designed for real-time access to the economic graph, optimizing performance for complex queries.
Why does LinkedIn need a graph database like LIquid?
LinkedIn requires a graph database to efficiently manage second-degree connections, which are crucial for user interactions and networking. These connections are too numerous to pre-materialize, making LIquid's on-demand computation essential for maintaining performance and relevance.
How does LIquid handle schema evolution compared to object-oriented databases?
LIquid avoids the schema evolution issues common in object-oriented databases by using a flexible schema based on edges that can represent various relationships. This allows for easier adaptation and extension of the data model without the rigid constraints of traditional object-oriented approaches.

Technologies & Tools

Database
Liquid
A graph database designed for real-time querying of LinkedIn's economic graph.
Query Language
Datalog
The declarative query language used by LIquid for processing queries.

Key Actionable Insights

1
Implementing LIquid can drastically reduce page load times by replacing hand-coded queries with optimized graph queries.
This is particularly beneficial for applications that require real-time data access, as it allows for faster user interactions and improved performance.
2
Utilizing a declarative query language like Datalog in LIquid can simplify complex query constructions.
This approach enables developers to focus on what data they need rather than how to retrieve it, streamlining the development process.
3
Understanding the limitations of conventional relational databases in handling graph data can guide better architectural decisions.
By recognizing these limitations, engineers can choose more suitable database technologies for applications that require complex relationship management.

Common Pitfalls

1
Relying solely on object-oriented databases can lead to schema evolution challenges and performance issues.
Many developers may assume that OODBs are sufficient for all use cases, but they often fail to provide the flexibility and optimization needed for complex relationships in large datasets.

Related Concepts

Graph Databases
Relational Models
Query Optimization Techniques