As the data landscape has become more complex, data access has followed suit. Once upon a time, data-driven applications only required a single relational database with connectivity, generally either through Open Database Connectivity (ODBC) or Java Database Connectivity (JDBC). But that time has passed. We now live in a world with heterogeneous data sources. We have data stored in relational databases, columnar databases, on-premise, in the cloud—the list goes on.
With so many flavors and structures of data available, connectivity becomes much more complex. On top of that, there are also different potential add-ons: predictive analytics, the Internet of Things, artificial intelligence, virtual intelligence, and more—all of which bring in more information and context around your data. For optimum results, you’ll want to leverage as many systems as possible in your solutions.
Connecting With REST APIs
As data landscapes continue to increase in complexity, your applications can no longer rely on a single point of entry. Between the change in data and developers moving towards a more service-oriented approach, advanced programming interfaces (APIs) are now the most common way to access data in the current complex landscape. APIs allow programs to speak to each other directly, and provide you with a great framework for how client server communications work.
As communications across platforms become more important, your teams need a good way to ensure those communications are effective. REST—or REpresentational State Transfer—provides a good solution.
REST is a stable and proven way of connecting applications, and provides you with important security features that were previously unavailable. For instance if you want to control access to the data, you want to make sure you have authentication mechanisms that support that particular security paradigm, which REST can do. Another feature is data masking, which hides personally identifiable or sensitive information. All these different policies around access and control are a strong testament as to why REST is an important model when accessing data through applications.
Creating RESTful APIs: OData vs GraphQL
REST can be a great choice for accessing data through applications, but you have many options when choosing a query language for creating and manipulating APIs. Two of the most common languages are OData and GraphQL:
- OData: Created by Microsoft in 2007, the OData (or Open Data) protocol is a stable and reliable method of exchanging data over the web. On top of that, its scalability and reliability have made it an industry standard, so much so that around 80% of implementations use it. Since it is a RESTful API, OData can connect your clients with servers using http requests, much like a traditional website.
- GraphQL: GraphQL protocol is a powerful new syntax that provides your developers more opportunities than OData. GraphQL was created by Facebook in 2012, and went public in 2015, and acts more like a programming language than an API. Your programmers will need to have more of an idea of what they’re looking for in their requests, but GraphQL offers much more flexibility in terms of how you interact with your data and how your data is brought back to you.
Before choosing a protocol, consider performance, scalability, flexibility, and reliability. Once you gauge all these different variables, you can decide which standard works best for your use cases.
- In modern analytics, applications cannot rely on a single point of data. Today’s data types are complex and include relational, columnar, on-premises, in the cloud.
- Consider performance, scalability, flexibility, and reliability before you decide whether OData or GraphQL is best for your particular use case.
- GraphQL protocol is known for keeping performance as the foremost priority while RESTful services like OData maintain reliability.