What it is
Cayley is an open-source graph database written in Go and released under the Apache-2.0 license. It stores and queries Linked Data, the graph-shaped data model standardized by the W3C for the Semantic Web, and its design takes direct inspiration from the graph database that sat behind Google's Knowledge Graph, formerly known as Freebase. The project lives in the Go ecosystem and has been maintained in public for roughly twelve years, accumulating about 15,000 stars and 1,238 forks, with 93 open issues at the time of writing. Its topics — cayley, go, graph, graph-database, linked-data — describe both the language it is built in and the data model it targets.
The concrete problem Cayley solves is that relationships between records are first-class citizens rather than joins reconstructed at query time. Applications that need to ask multi-hop questions, such as which films star both of two given actors, express that traversal directly instead of assembling a chain of relational joins by hand. Cayley exposes this through multiple query languages and a modular architecture, so an application can connect through its preferred language or driver and persist data in a back-end store of choice rather than being locked to one storage engine.
Key capabilities
- Built-in query editor, visualizer and REPL, so queries can be written and inspected interactively.
- Gizmo, a query language inspired by Apache TinkerPop's Gremlin.
- A GraphQL-inspired query language.
- MQL, a simplified query language aimed at users of Freebase.
- Modular design that makes it straightforward to connect to other programming languages and back-end stores.
- Storage of Linked Data, the graph model used across Semantic Web standards.
- Query optimization aimed specifically at application workloads rather than batch analytics.
Who uses it and how
- Companies run Cayley for production workloads, per the project's own statement that it is well tested and production ready.
- Developers explore and debug graphs interactively through the built-in query editor, visualizer and REPL before wiring queries into application code.
- Teams adopting a graph model migrate Linked Data and Freebase-style datasets and query them with MQL or Gizmo.
- Users of other languages integrate through the modular connectors rather than rewriting services in Go.
- Community members ask questions on the project's Slack workspace, its Discourse list, which doubles as a mailing list, and follow updates on the @cayleygraph account.
Getting started
Cayley is distributed through the Snap Store, which the README highlights with a get-it-from-Snap-Store badge. Full documentation lives at cayley.gitbook.io/cayley, with the project website at cayley.io.
When to use it — and when not to
Cayley suits teams that want a graph model with several query languages and freedom to choose a storage backend