DALi: A database abstraction layer for multiuser web applications
Channel: esugboard
Date: 05/10/2011

Johan Brichau

Abstract

Multiuser web applications often need to manage concurrent (and potentially conflicting) operations on shared data. The parallel processing of web requests and the disconnected client-side view on that shared data raise ample opportunities for users to make conflicting changes. When such conflicts arise, we may or we may not need to inform the user of the conflict. To this end, database transaction mechanisms are a performant and proven technology for detecting and managing conflicting changes. When each user's web session maintains its isolated view on the database and operations are wrapped in transactions, we are able to prevent, detect and handle all such conflicts. At the same time, however, such applications easily become dependent on a particular database's technical abilities. Even when only considering the object-oriented databases GOODS, Magma and Gemstone, the differences in how database views and transactions work are vast. For example, Magma supports nested transactions while GOODS does not. An even more important difference is that when using Magma and GOODS, we can maintain a separate database view per web session and rely on the transaction mechanism to handle all conflicts. In Gemstone's GLASS integration of Seaside, however, incoming requests always share the same database view. This means only parallel execution conflicts are trapped by the transaction mechanism. With DALi, a database abstraction layer, we build Seaside-based web applications that are database independent and rely on database transactions to manage inter-user application-level conflicts as well as parallel execution conflicts directly. DALi is currently implemented for Pharo Smalltalk (with GOODS, Magma or image-based backends) and GemStone GLASS.

http://esug.org/wiki/pier/Conferences/2011/Schedule-And-Talks/Dali