pdfDownload PDF

Industry
Social Network & Entertainment

About Popcorn

Popcorn Technologies is the company that created Popcorn, the place where people share, discover and talk about movies. Post movie questions, see what others are saying and share your thoughts. Go ahead, be a critic!

http://www.popcornmovieapp.com

Popcorn logo

Popcorn uses OrientDB to scale its Social Movie Network

Popcorn is a place where people share, discover and talk about movies. Larry Aasen and Eric Ying recognized that conversations about movies were quickly lost in Facebook and Twitter. That sparked an idea which became Popcorn: a new kind of social network based around movies, designed for short conversations that are different from what you may find elsewhere. Something more like Instagram for movies, and less like IMDB, that connects movie lovers and their conversations.

“The past two years of using OrientDB in the Popcorn platform have been a success. We’ve experienced almost zero downtime in the past 18 months with OrientDB. We ran into one issue with a full disk that we were quickly able to resolve. The other downtime included upgrading the software and some Amazon EC2 outages.“

– Larry Aasen, CTO and Cofounder, Popcorn Technologies

Early on during the design of Popcorn, the development team was looking at MySQL, PostgreSQL*, Neo4j* and OrientDB. Relational databases have been around for some time, but they perform poorly locating relationships. You must put a lot of thought at the start in your design by joining tables through foreign keys. Joins are slow, so the more you have, the slower your performance.

Not only do graph databases link connections but they also allow organizations to analyze and understand vast graphs of connected data. Not only can they find connections between different points of data, but they also can rank the relevance or weight of those relationships. This makes them perfect for social networks and recommendation engines. Without joins, applications can benefit from the speed of graph databases.

After reading about the architecture of Facebook, Twitter, LinkedIn, and Instagram and understanding their data requirements, they understood the benefits and importance of using a graph database to represent the social data in a better way than provided by traditional relational databases. They needed to choose a database that avoided table joins, could scale and be partitioned and it also had to be dependable.

MySQL* and PostgreSQL* are well known and have a strong following, but they were ruled out pretty quickly. The team at Popcorn Technologies desired to use a modern graph database and this became more and more important. That left only two remaining choices: Neo4j* and OrientDB. Both vendors offered reasonable technology for a graph database and were well supported by the vendor and communities. Also, documentation was easy to understand.

Challenge

Use a graph database to show social relationships such as followers and likes, include saved and watched movies, timeline entries, and any other lists like a user’s device list, or list of comments on a post. The nodes (vertices/nouns) would be represented by users, posts, devices, sessions, and any other normal database object. The edges (verbs) would be represented by following, likes, posted, timeline, and others.

Fast and Easy to Get Started

“Getting started with OrientDB is fast and easy. Just download a ZIP file to your computer, unzip the file, and start the server. That’s it. I initially learned how to create vertices and edges using the supplied console app, which I found easy to use because of its SQL syntax,“ said Larry Aasen.

Support Standard SQL

Some graph database solutions require learning new query languages, such as Neo4j’s* own query language called Cypher*. Training is required to learn a new language. OrientDB’s query language is built on SQL and is augmented with a few extensions to manipulate trees and graphs. Considering most developers are familiar with SQL, working with OrientDB is just easier.

“The fact that standard SQL was supported in OrientDB was a big plus. I did not want to learn another query language and I did not want to push a new language on my team.“ - Larry Aasen, CTO and Cofounder, Popcorn Technologies

Feature Rich Community Edition

When it comes to databases, many solutions like Neo4j* offer limited features in their community versions, with tools necessary to run production environments only available in Enterprise editions. Instead, OrientDB Community edition includes scaling, replication and many security capabilities.

Low Total Cost of Ownership

There is absolutely no cost associated with using OrientDB Community Edition. Not only does it eliminate the need for multiple products and multiple licenses, with an Apache 2 license, there are no restrictions when using their open source community edition. Neo4j’s* licensing model GPL can be limiting as well as costly.

“If we could get by without paying licensing fees for the first million users, I would be happy. Incurring DB license costs later would be more reasonable.” - Larry Aasen, CTO and Cofounder, Popcorn Technologies

OrientDB’s Fantastic User Community and Team

Golang was the language of choice for Popcorn, so the team decided on OrientGo, a Go client for the OrientDB database. This Go client was a critical part of the infrastructure and was also important for the success of OrientDB in Popcorn. When issues with OrientGo arose and brought development to a halt, the Popcorn Technologies Team worked with the OrientGo community to solve issues and create integration tests that showed reliable performance from the database while thoroughly verifying all aspects of the servers.

On a few occasions, the development team was not able to resolve problems on their own, but found answers to questions and problems on the OrientDB GitHub account. One issue with a table was resolved using a server-side function suggested by a Github user. They also posted other questions that were answered quickly by the OrientDB team.

“The past two years of using OrientDB in the Popcorn platform have been a success. We’ve experienced almost zero downtime in the past 18 months with OrientDB. We ran into one issue with a full disk that we were quickly able to resolve. The other downtime included upgrading the software and some Amazon EC2 outages,“ said Larry Aasen, CTO and Cofounder of Popcorn Technologies.

 

*All trademarks are the property of their respective owners.

About OrientDB

OrientDB is the world’s leading distributed graph database and the 2nd in the general graph category. By combining the power of graphs with document, key/value, object-oriented, geospatial and reactive models into one core native engine, OrientDB extended the basic graph database concept into a Multi-Model open source DBMS.

It allows schema-less, schema-full and schema-mixed modes, supports SQL and TinkerPop/Gremlin standards and its strong security has been developed together with global banks who use it to power thousands of transactions per second. Fortune 500 companies, government entities and startups all use OrientDB to build large-scale innovative applications including: Accenture, Barclays, Cisco, Comcast, Dell, United Nations, Verisign, Pitney Bowes, Sky, Diaku, CenturyLink and Sonatype.

If you’d like to receive more information about OrientDB’s services and subscriptions, please contact us.  If you’re a startup company or are currently unsatisfied with your current graph database, request a custom quote!