Appgree is a Spain-based startup bringing new innovations to the real-time surveying of small to large audiences about products, entertainment and more. The company has created an algorithm that enables querying users in a form factor that’s similar to chat - but where the set of answers to a given question is “democratically” ranked based on the assessments of those answers that the group carries in real-time.
Appgree’s vision is in evolving “many-to-one” communication to allow companies and communities (such as NGO’s, public entities or groups with a common interest) to generate insights that better reflect what’s most important to a group. Whether a consumer brand is polling its customer base for feedback on a new product, or a popular band wants to query a large metro area in advance of scheduling its tour dates - the use cases for Appgree are vast, and the demand for this type of real-time information is very high as a new stream of marketing data for Big Data crunching.
A typical Appgree campaign may consist of thousands of respondents on its mobile app. For example, an Appgree survey during a Spanish television show last year resulted in 90,000 concurrent users and 150,000 total users (during one of the 3 hour shows) so the company has very high peak usage challenges to contend with, where “real-time” responsiveness is a must. Because of the burstiness of its traffic and the requirement to purchase more compute from Amazon during peak intervals, it was also critical for Appgree to find a solution that made it simple to add or subtract nodes or machines.
Adding to the computational complexity of the back-end of Appgree’s services is the requirement to share very large data objects with millions of concurrent users. The set of answers presented to each user is based on the answers gathered from previous users, and then run through the Appgree algorithm.
With thousands, or even millions, of users needing access to the same result set, synchronizing the data object and handling all of the transactions on the back end is a problem set that led Appgree to the Typesafe Reactive Platform.
The component of the Typesafe Reactive Platform that was of most interest to Appgree was Akka, because of its ability to manage complex, distributed systems through its concurrency model. Additionally, to support Appgree’s “centric” data layer, Appgree’s CTO,Eduardo Fernandes, added some functionality on top of Akka: a cluster enabled pipelining and an object hot swapping schema. With the pipelining, Fernandes has improved the number of transactions per second by a factor greater than 10, which has a direct impact in costs in the infrastructure. The hot swapping enables the system to create a snapshot, saving time when an object fails. This functionality makes it possible for a huge object (more than 8Gigs) to be swapped in milliseconds, instead of recovering its state from a persistent storage.
Benefits of Akka
- Easy to Cluster—“When you send packets to the back-end, the way Akka clusters is very nice,” said Fernandes. “It spreads out the requests, then the systems spread out the Actors for you.”
- Path to Reactive—“It was very important to us to design our system in such a way where we could be Reactive in the future,” said Fernandes.
- Built for Scale—“How to manage support of millions of transactions spread across many nodes is the core idea behind Akka,” said Fernandes.
- Flexibility and Simplicity—Fernandes said that he found the Akka concepts and documentation clear and easy to understand, and that he picked up on the key points in less than an hour. He cites that simplicity as especially important in the context of growing his engineering team and getting other colleagues up to speed.
- Extensibility—“Akka enables us to build up new features on top of the core functionality, says Fernandes, “this was critical for us to support our centric data object model.”
- Java API—“Scala is very nice, but the engineers at Appgree don’t know enough the language yet,” said Fernandes. “The Java API was important to us.”
Inspired by this story? Contact us to learn more about what Lightbend can do for your organization.
Share This Case Study
Lightbend is the proud provider of the world's leading Reactive application development platform. We are a passionate crew of technology pioneers committed to building amazing software. We build and maintain the Play web framework, the Akka message driven runtime, and the Scala programming language. Our mission is to help developers build high-performance applications that are responsive resilient, elastic and message driven.