[FEATURE]: Empowering Dgraph with Multilingual Capabilities Through AST for Mutations #8887
Labels
dgraph
Issue or PR created by an internal Dgraph contributor.
kind/feature
Something completely new we should consider.
Use case
By introducing Abstract Syntax Trees (AST) for mutations, Dgraph can evolve into a truly multilingual database engine, effortlessly catering to a wide array of data languages and formats such as CSV, JSON-LD, RDF variants, and more. Below are compelling reasons for adopting AST for mutations in Dgraph:
Language Agnosticism: By using AST, Dgraph can become language-agnostic. Since AST is a hierarchical and abstract representation of source code, it can represent various data formats without being tied to any particular language syntax. This ensures that Dgraph can accept and interpret data in diverse formats seamlessly.
Ease of Parser Creation: With an AST-based approach, creating parsers for different languages becomes a trivial task. Parsers can be developed to convert source code in various languages into an AST, which Dgraph can then process uniformly. This enhances flexibility and makes Dgraph adaptable to any data writing language.
Enhanced Interoperability: In a multi-platform environment, systems often use different data formats. By supporting multiple languages through AST, Dgraph can easily integrate and communicate with different systems, regardless of the data format they employ. This interoperability is essential for building cohesive and robust systems.
Future-Proofing: As new data representation formats emerge, the ability to easily create parsers for them ensures that Dgraph remains relevant and adaptable. This future-proofing is invaluable in a fast-paced technological landscape where new standards can quickly become the norm.
Wider Adoption and Collaboration: By accommodating various data formats, Dgraph becomes an appealing choice for a broader audience. This wider adoption can foster a collaborative ecosystem, with contributions from a diverse community, enhancing the overall quality and capabilities of Dgraph.
Reduced Complexity for End Users: End users often work with data in formats they are most comfortable with. By supporting multiple languages, Dgraph allows users to interact with the database in their preferred format, reducing the learning curve and complexity, and enhancing user satisfaction.
But the major advantage of having an AST for mutations is the ability to make Dgraph multilingual, with little effort. Both the community and ourselves could create parsers for any type of mutation.
For example, SQL:
We could have a parser in the Beta group that converts it into a Dgraph native AST.
Other examples include
JSON Patch:
XML:
Apache Avro:
In conclusion, incorporating AST for mutations in Dgraph is a strategic move that paves the way for a more versatile, performant, and future-proof database engine. By breaking the barriers of language limitations, Dgraph can become a universal solution catering to diverse data formats, and consequently, a larger, more diverse user base.
Links to Discuss, RFC or previous Issues and PRs
No response
Links to examples and research
No response
Current state
No response
Solution proposal
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: