Welcome!

Blog Feed Post

What’s New with OData 4: OData 2 vs OData 4

OData 4 differs significantly from OData 2. Learn about the differences between them when using Hybrid Data Pipeline and decide whether you need OData 2, OData 4 or both.

OData (Open Data Protocol) defines a set of best practices for building and consuming RESTful APIs. OData is very popular and has been adopted by many technologies and companies including SAP, IBM, Salesforce, Tableau, Databoom, Progress, Red Hat and Dell. If you’d like to learn the basics of OData, see our OData FAQs.

Progress is proud to serve on the OData Technical Committee. In fact, we were one of the original members of this committee, along with other technical giants such as IBM, Microsoft, SAP, Redhat, CA and Citrix. We offer Hybrid Data Pipeline, the industry’s first vendor-agnostic data gateway, which lets you OData-enable your data source through simple clicks.

10 Major Differences Between OData 2 and OData 4

As you consider enabling your application or data source with an OData endpoint, you will invariably ask yourself if you should use OData 2, OData 3 or the latest OData 4 version. While OData 3 and OData 2 are very similar, OData 4 is drastically different from OData 2. With the latest release, Hybrid Data Pipeline can help you produce both OData 2 as well as OData 4 from your data sources. Understanding the differences between these endpoints from Hybrid Data Pipeline can help you decide if you need OData 2, OData 4 or both:

  • OData 2 was a Microsoft Open Specification Promise (OSP), while OData 4 is approved by OASIS and ISO. While developers were apprehensive about adopting OData 2, we are observing more adoption for OData 4.
  • According to the OData 2 specification, payload had to be retrieved in both XML and JSON formats. In OData 4 however, XML is optional. So, Hybrid Data Pipeline today supports both XML and JSON in OData 2 and only JSON in OData 4. However, the metadata can still be retrieved in the XML format in OData 4.
  • In OData 4, the JSON data format now allows you to control the amount of metadata that is returned in query responses. There are three levels of metadata supported:
    • Full—The response contains all the metadata needed to describe the response.
    • Minimal—The response metadata references the metadata document. Information in the metadata document is not repeated in the response.
    • None—The response contains no metadata. The application must understand the response structure.
  • Hybrid Data Pipeline supports batch requests in OData 4 only. Batch requests allow you to submit multiple operations in the form of a single endpoint request. Operations are submitted in the HTTP request payload and can include individual requests and change sets. (For more information on batch requests, see this article.)
  • OData 4 adds a new flexible search capability, $search. The search feature allows you to query a collection for entities that match a specified search expression. Unlike the existing filter capability, which allows a query to specify that a specific property or properties match certain criteria, the search feature can apply the search expression to any of the properties of an entity. Hybrid Data Pipeline extends this feature to OData 2 as well using the $ddsearch feature.
  • The $expand system query option has been enhanced in OData 4. This feature specifies the related resources to be included in line with retrieved resources. In OData 2, if a single value navigation property is expanded, you get all the properties of the entity if it was a single value navigation property. And if a collection navigation property is expanded, you get all of the entities in the collection and all of the properties of those entities. In OData 4, you can now refine the results using the $select, *, $filter and $top operations:
      * Used to expand all relationships for the entity.
      $filter Used to filter the child entities that appear in the expanded result.
      $top Used to limit the rows that appear in the expanded result.
      $select Used to limit the fields that appear in the expanded result.
  • When doing an update there are two ways to update an entity: replace the definition of the entity with a new entity (Replace semantics). Or, you can change individual properties of an existing entity (Edit semantics). The HTTP PUT method is used to update an entity with Replace semantics. In OData 4, the standard HTTP PATCH method is used to update an entity with Edit semantics. OData 2 used the non-standard MERGE HTTP method for updates with Edit semantics.
  • $count replaces $inlinecount in OData 4. $count has been enhanced to be used with $filter, $expand and $orderby options.
  • Changes in support for data types in OData 4:
    • DateTime has been deprecated. The lack of timezone information in OData 2 causes significant problems. Use DateTimeOffset instead.
    • Edm.Time has been replaced with Edm.Duration and Edm.TimeOfDay to make it clear whether it is duration of a specific time of day.
    • Edm.Date has been added as there was no way to express just a date in OData 2.
    • Edm.Float has been eliminated.

All these and many other enhancements in OData 4 give a significant performance boost to your application compared to OData 2. You can learn about the other differences in this article from OASIS.

Support OData 2 and OData 4—or Both—Using Hybrid Data Pipeline

Due to the significant changes in the way these frameworks are defined, you’ll need different clients to consume both the OData 2 and OData 4 endpoints. Thanks to all the latest changes, OData 4 shows significant performance improvement compared to OData 2. While some functions have been replaced and enhanced, some of them have been deprecated — for example support for the XML Data Format. 

If you’re building an application for the modern ecosystem, OData 4 is a no brainer as it gives you a significant performance boost. However, some existing applications need OData 2 or an XML payload. For that reason, you should leverage Hybrid Data Pipeline, which supports both interfaces without any coding at all.

GET STARTED

Read the original blog entry...

More Stories By Progress Blog

Progress offers the leading platform for developing and deploying mission-critical, cognitive-first business applications powered by machine learning and predictive analytics.

Latest Stories
Continuous Delivery makes it possible to exploit findings of cognitive psychology and neuroscience to increase the productivity and happiness of our teams. In his session at 22nd Cloud Expo | DXWorld Expo, Daniel Jones, CTO of EngineerBetter, will answer: How can we improve willpower and decrease technical debt? Is the present bias real? How can we turn it to our advantage? Can you increase a team’s effective IQ? How do DevOps & Product Teams increase empathy, and what impact does empath...
As many know, the first generation of Cloud Management Platform (CMP) solutions were designed for managing virtual infrastructure (IaaS) and traditional applications. But that's no longer enough to satisfy evolving and complex business requirements. In his session at 21st Cloud Expo, Scott Davis, Embotics CTO, explored how next-generation CMPs ensure organizations can manage cloud-native and microservice-based application architectures, while also facilitating agile DevOps methodology. He expla...
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, discussed how given the magnitude of today's application ...
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
You know you need the cloud, but you're hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You're looking at private cloud solutions based on hyperconverged infrastructure, but you're concerned with the limits inherent in those technologies. What do you do?
Sanjeev Sharma Joins June 5-7, 2018 @DevOpsSummit at @Cloud Expo New York Faculty. Sanjeev Sharma is an internationally known DevOps and Cloud Transformation thought leader, technology executive, and author. Sanjeev's industry experience includes tenures as CTO, Technical Sales leader, and Cloud Architect leader. As an IBM Distinguished Engineer, Sanjeev is recognized at the highest levels of IBM's core of technical leaders.
Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...
In his general session at 21st Cloud Expo, Greg Dumas, Calligo’s Vice President and G.M. of US operations, discussed the new Global Data Protection Regulation and how Calligo can help business stay compliant in digitally globalized world. Greg Dumas is Calligo's Vice President and G.M. of US operations. Calligo is an established service provider that provides an innovative platform for trusted cloud solutions. Calligo’s customers are typically most concerned about GDPR compliance, application p...
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone inn...
Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
Product connectivity goes hand and hand these days with increased use of personal data. New IoT devices are becoming more personalized than ever before. In his session at 22nd Cloud Expo | DXWorld Expo, Nicolas Fierro, CEO of MIMIR Blockchain Solutions, will discuss how in order to protect your data and privacy, IoT applications need to embrace Blockchain technology for a new level of product security never before seen - or needed.