Google vs Oracle: Fair Use?

On Monday April 5th, 2021, the Supreme Court ruled 6-2 against Oracle in its long-running copyright dispute with Google over the use of Java APIs in Android, claiming to be owed some $9 billion from Google who never paid Oracle for a license on their intellectual property.

To understand the full story however, some background is needed.

Banner-1.jpg

In the early days of the smartphone race when Android was originally under development, Google needed to decide which technology to base their new platform on. The operating system itself is based on Linux which is completely open source, so they could modify it to run on smartphones without issue. But Google needed to decide on the language that would be used by third party developers to write software for Android and decided on Java as it was one of the most widely used at the time.

Banner-2.jpg

However, unlike many popular programming languages today, Java is not open source. It was originally developed by Sun Microsystems which was acquired by Oracle in 2010.

Programming languages in general cannot be copywritten but a language is much more than just its syntax; every language comes with something called (or equivalent to) a standard library. This contains functions and APIs to handle basic tasks without which the language alone would be largely useless.

Google, in using Java for its new operating system, copied these APIs so that any Java developer would be comfortable developing for Android. While developers would still need to learn Android specific APIs, all of their background knowledge in Java would greatly ease the transition.

Declaration vs Implementation

Many are reporting that Google copied thousands of lines of code from Oracle-owned Java which is technically true (and makes Oracle’s case sound somewhat reasonable), but it misses crucial context which is at the center of this case and that is how technology that's used every day could change. It also explains why Oracle had very few supporters in Silicon Valley from either corporates or individuals.

To understand what's going on you need to need to know 2 things, what an API is (in the context of this lawsuit) and the difference between declaration and implementation. It has always been possible to copywrite code that you've written; the reason Google was able to get away with this is down to the difference between declaration and implementation.

To greatly oversimplify, when writing code, you first declare what functions are available (what parameters they take, what if anything they return) and then write code to actually implement this functionality. This is clearest in C and languages based directly on it where there are .h files (for header), where any functions available are declared, and each of which is paired with a file where the code satisfying the requirements in the header are implemented, such as:

.c files (for the c programming language)

.cpp files (for the C++ programming language)

.m files (for implementation, used in Apple's Objective-C)

Although more modern languages such as Java and Apple's swift (a replacement for the older Objective-C) don't have different files for code declaration and implementation, basically all programming languages have some analog to this system.

For code to be modular and maintainable, each part of an application should know only the parts it needs to know, only declare what code other parts need to know, and to keep any implementation details that only concern it private.

So while these declarations (like the ones in the files above) are technically "lines of code" they are really only describing what functions are available. They contain no information about how these functions are completed. As long as they satisfy the requirements laid out in the declaration it doesn't matter to the caller how exactly it works.

Banner-3.jpg

Another important concept is an API. Most people in any way involved in tech have heard of APIs and understand basically what they're for. An API is a description of functionality with the implementation kept private similar to the declaration / implementation example.

The difference is an API is not just code files. One end of an API could be on an entirely different application on a server halfway across the world. If you declare that a HTTP request sent in some format to some url will return data back to the caller in a reliable format, that's an API.

And that's how most people think of APIs, as web-based layers of interaction.

But the Google vs Oracle case was about something much lower level. In programming, an API is a much broader term than what these web-based APIs entail. Essentially, anything can count as an API. If, as in the above example, I declare some code in a .h file and write the corresponding implementation, that is technically an API of sorts.

The line between when something is just "code for doing something" and an official API is quite blurry, which is likely why there's been an unspoken rule for as long as Silicon Valley has been around: You can't copyright APIs.

If you copy the code someone wrote to implement functionality, that's copyright infringement and you can be sued. But if you write your own code which just happens to have all the same declarations of all the same functions which accept the same parameters and return the same type of response BUT you write the implementations yourself, then you are considered to have copied no code from the original and therefore have infringed no one’s copyright.

Notable Examples

A couple of notable examples of this include:

  • Apple

Apple's developer platforms were based on Objective-C (now Swift is their main focus, although Objective-C is still supported) and its equivalent to a standard library is called Foundation. These contain the foundational APIs for things like date processing, not the sort of thing that's baked into a language but it's kind of essential to actually write anything in Objective-C.

Objective-C was made open source but Foundation wasn't, so while developers could port Objective-C to other platforms, it was largely useless without Foundation. So some Objective-C developers created an open source project to re- implement Foundation so they could use it on platforms other than Apple's. The project never got a ton of traction and has been rendered moot by Swift which Apple made open source, so Apple also open-sourced the Swift version of Foundation.

  • Mono

Mono is an open-source implementation of Microsoft's .NET, the APIs that are basic to programming for Windows. It's most notably used by Xamarin, a long-running solution to writing iOS and Android apps with a single code base, as well as the Unity game engine which is one of the most popular game engines around. Just like Google in 2005, game companies wanted to build a new platform while leveraging APIs familiar to millions of developers. Microsoft never sued and have in fact partnered with Xamarin in the past.

The ambivalent or supportive stance tech giants have taken to the copying of their APIs reveals something deeper about Silicon Valley and tech in general. Whether APIs can be copyright-protected has been a grey area forever and everyone has just agreed to let it be. After all, why should Microsoft care if someone uses the APIs from their huge developer base to power a game engine? They'd never bother licensing .NET to the small startup Unity began as, but if there's an open source re-implementation, that gives their developers a little extra bonus.

Since one of the most popular game development tools uses Microsoft APIs, there are more career paths available, and people who start in Unity are already on their way to being windows developers, if they so choose.

Enterprising API Rent-Seekers

On top of that why open the can of worms when it could have dire consequences?

Imagine an extreme example if APIs suddenly became copyright-able and some enterprising individual claimed copyright on some widely used API that had already been implemented many times and used on a wide variety of platforms.

Rent-seekers.jpg

Suddenly tech giants could become beholden to a rent-seeker, or have to spend a huge amount of development resources ripping those APIs out and forcing developers to learn new ones.

Even third party applications could be affected and their owners hounded through the courts until they replace some API with a completely unique one.

This would be similar to the patent wars that were in their heyday circa 2015 when patent trolls made a living out of suing random companies over extremely broad patents they usually hadn't even made themselves, just purchased.

This scenario would also hurt the cross compatibility that technology relies on - if everyone has to use their own unique (or at least superficially different) version of an API then none of them work together and we could enter a new nightmare world of compatibility issues.

This explains why Oracle had so few public backers in tech. Oracle just wanted Google to pay a lucrative license fee for Java likely not considering the broader change that could cause. Google on the other hand did not want to become beholden to a third party just for developers to write applications for their new open source operating system.

This isn't necessarily over though. It's important to note the court did not make any decision regarding the copyrighting of APIs in general, only that Google's conduct in this specific case was fair use. The door has been left open for another company to try and sue in similar circumstances and settle the matter either way.

That said any company thinking of doing this in the future will likely be discouraged since there is now precedent leaning towards the principle of APIs existing for fair use. Who's going to want to spend a decade and millions of dollars when they'd likely encounter the same fate as Oracle?

This case also displays how much technology is used, litigated (and worse of all) regulated by people who don't really understand it. There were some pretty awful analogies used to argue both sides in this court case. The decision in the end probably came down to the fact that making a decision in Oracle's favor would cause massive upheaval in the tech world and damage one of America's most valuable industries.

Tiernan

Tiernan is our lead mobile architect specializing in iOS development for the last 6 years

Previous
Previous

Skunk Works for Software

Next
Next

The Future of Augmented Reality (AR)