Overview
The article discusses the introduction of Pegasus Data Language (PDL), a new schema definition language designed to replace the existing Pegasus Data Schema (PDSC) for data modeling in Rest.li services. It highlights the improvements in usability, readability, and IDE support that PDL offers over PDSC.
What You'll Learn
1
How to migrate existing PDSC files to PDL format using a command line tool
2
Why PDL is a more user-friendly schema definition language compared to PDSC
3
How to utilize IntelliJ plugin features for PDL to enhance schema writing
Key Questions Answered
What are the main advantages of using Pegasus Data Language over PDSC?
Pegasus Data Language (PDL) offers a more readable Java-like syntax, reduced verbosity, and improved IDE support compared to Pegasus Data Schema (PDSC). This results in fewer errors during schema writing and a better overall developer experience.
How can developers migrate from PDSC to PDL?
Developers can migrate existing PDSC files to PDL format using an automated command line tool provided by LinkedIn. The command './gradlew convertToPdl' allows for easy conversion, and an automated migration tool facilitates code reviews and commits.
What features does the IntelliJ plugin for PDL provide?
The IntelliJ plugin for PDL includes syntax highlighting, error highlighting, autocomplete suggestions, and auto-suggestions for fixing common errors. These features significantly enhance the schema writing experience and reduce human error.
What are the future plans for PDL at LinkedIn?
Future plans for PDL include expanding IntelliJ plugin support to provide context-specific auto-complete suggestions and completely replacing other schema formats like Avro with PDL across LinkedIn, making it the standard for schema definition.
Key Statistics & Figures
Percentage of PDSC schemas migrated to PDL
90%
This migration was achieved in one quarter, highlighting the efficiency of the automated migration tool.
Technologies & Tools
Schema Definition Language
Pegasus Data Language
Used for defining data models in a more user-friendly format compared to PDSC.
IDE
Intellij
Provides rich support for writing PDL schemas, enhancing the developer experience.
Key Actionable Insights
1Leverage the new PDL syntax to improve schema readability and reduce errors in your projects.By adopting PDL, developers can write schemas that are easier to understand and maintain, which can lead to fewer bugs and faster development cycles.
2Utilize the IntelliJ plugin for PDL to enhance your development workflow.The rich features of the plugin, such as syntax highlighting and autocomplete, can help developers write schemas more efficiently and with greater accuracy.
3Consider using the automated migration tool to transition existing PDSC schemas to PDL.This tool simplifies the migration process, allowing teams to quickly adopt PDL without extensive manual effort, thereby improving productivity.
Common Pitfalls
1
Writing verbose PDSC files can lead to increased errors and maintenance challenges.
Developers often struggle with the complexity and lack of IDE support in PDSC, which can result in mistakes that are hard to track down.
Related Concepts
Pegasus Data Schema
Rest.li Services
JSON Schema Definitions