ABSTRACT
Out of the many NoSQL databases in use today, some that provide simple data structures for records, such as Redis and MongoDB, are now becoming popular. Building applications out of these complex data types provides a way to communicate intent to the database system without sacrificing flexibility or committing to a fixed schema. Currently this capability is leveraged in limited ways, such as to ensure related values are co-located, or for atomic updates. There are many ways data types can be used to make databases more efficient that are not yet being exploited.
We explore several ways of leveraging abstract data type (ADT) semantics in databases, focusing primarily on commutativity. Using a Twitter clone as a case study, we show that using commutativity can reduce transaction abort rates for high-contention, update-heavy workloads that arise in real social networks. We conclude that ADTs are a good abstraction for database records, providing a safe and expressive programming model with ample opportunities for optimization, making databases more safe and scalable.
References
- L. Baertlein. Ellen's Oscar 'selfie' crashes Twitter, breaks record. http://www.reuters.com/article/2014/03/03/us-oscars-selfie-idUSBREA220C320140303, Mar. 2014.Google Scholar
- B. H. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13(7): 422--426, July 1970. Google Scholar
Digital Library
- O. Boykin, S. Ritchie, I. O'Connell, and J. Lin. Summingbird: A Framework for Integrating Batch and Online MapReduce Computations. Proceedings of the 40th International Conference on Very Large Data Base (VLDB 2014), 7(13), 2014. Google Scholar
Digital Library
- J. C. Corbett, J. Dean, M. Epstein, A. Fikes, C. Frost, J. J. Furman, S. Ghemawat, A. Gubarev, C. Heiser, P. Hochschild, W. Hsieh, S. Kanthak, E. Kogan, H. Li, A. Lloyd, S. Melnik, D. Mwaura, D. Nagle, S. Quinlan, R. Rao, L. Rolig, Y. Saito, M. Szymaniak, C. Taylor, R. Wang, and D. Woodford. Spanner: Google's globally-distributed database. In USENIX Conference on Operating Systems Design and Implementation, OSDI'12, pages 251--264, 2012. Google Scholar
Digital Library
- G. Cormode and S. Muthukrishnan. An improved data stream summary: the count-min sketch and its applications. Journal of Algorithms, 55(1): 58--75, 2005. Google Scholar
Digital Library
- T. P. P. Council. Tpc-c. http://www.tpc.org/tpcc/.Google Scholar
- A. Fekete, N. Lynch, M. Merritt, and W. Weihl. Commutativity-based locking for nested transactions. Journal of Computer and System Sciences, 41(1): 65--156, Aug. 1990. Google Scholar
Digital Library
- P. Flajolet, Éric Fusy, O. Gandouet, and F. Meunier. Hyper-LogLog: the analysis of a near-optimal cardinality estimation algorithm. In International Conference on Analysis of Algorithms, 2007.Google Scholar
- Graph 500. http://www.graph500.org/, July 2012.Google Scholar
- D. Hendler, I. Incze, N. Shavit, and M. Tzafrir. Flat combining and the synchronization-parallelism tradeoff. In Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures, pages 355--364. ACM, 2010. Google Scholar
Digital Library
- M. Herlihy and E. Koskinen. Transactional Boosting: A Methodology for Highly-concurrent Transactional Objects. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '08, pages 207--216, 2008. Google Scholar
Digital Library
- J. Kim, R. Palmieri, and B. Ravindran. Enhancing Concurrency in Distributed Transactional Memory through Commutativity. In EuroPar 2013, pages 150--161. 2013. Google Scholar
Digital Library
- M. Kulkarni, D. Nguyen, D. Prountzos, X. Sui, and K. Pingali. Exploiting the Commutativity Lattice. In Conference on Programming Language Design and Implementation, PLDI '11, pages 542--555, 2011. Google Scholar
Digital Library
- C. Li, D. Porto, A. Clement, J. Gehrke, N. Preguiça, and R. Rodrigues. Making Geo-Replicated Systems Fast as Possible, Consistent when Necessary. In USENIX Symposium on Operating Systems Design and Implementation (OSDI 12), pages 265--278, 2012. Google Scholar
Digital Library
- N. Narula, C. Cutler, E. Kohler, and R. Morris. Phase Reconciliation for Contended In-Memory Transactions. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), pages 511--524, Broomfield, CO, Oct. 2014. Google Scholar
Digital Library
- S. Sanfilippo. Redis. http://redis.io/.Google Scholar
- M. Shapiro, N. Preguiça, C. Baquero, and M. Zawirski. Conflict-free Replicated Data Types. In Proceedings of the 13th International Conference on Stabilization, Safety, and Security of Distributed Systems, SSS'11, pages 386--400, 2011. Google Scholar
Digital Library
- N. Shavit and A. Zemach. Combining funnels: A dynamic approach to software combining. Journal of Parallel and Distributed Computing, 60(11): 1355--1387, 2000. Google Scholar
Digital Library
- W. E. Weihl. Commutativity-based Concurrency Control for Abstract Data Types. In Proceedings of the Twenty-First Annual Hawaii International Conference on Software Track, pages 205--214, 1988. Google Scholar
Digital Library
- P.-C. Yew, N.-F. Tzeng, and D. H. Lawrie. Distributing hotspot addressing in large-scale multiprocessors. Computers, IEEE Transactions on, 100(4): 388--395, 1987. Google Scholar
Digital Library
- Y. Zhang, R. Power, S. Zhou, Y. Sovran, M. K. Aguilera, and J. Li. Transaction Chains: Achieving Serializability with Low Latency in Geo-distributed Storage Systems. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP '13, pages 276--291, 2013. Google Scholar
Digital Library
Index Terms
Claret



Comments