TCache: A Transactional cache with user-defined persistence

[ bsd3, data, database, library ] [ Propose Tags ]

TCache is a transactional cache with configurable persitence. It allows conventional STM transactions for objects that syncronize with their user defined storages. Default persistence in files is provided for testing purposes State in memory and into permanent storage is transactionally coherent. 0.9.0.3 : Solved a "lost registers" bug. 0.9.0.1 : Solves a bug when object keys generate invalid filenames. changes in defaultPersistence to further separate serialization from input-output

  1. 9: This version now has full text search. Serialization is now trough byteStrings

This version support the backward compatible stuff, that permits transparent retrievals of objects and transcactions between objects without directly using STM references ('with*Resource(s)' calls), Now it goes in the oposite direction by providing explicit STM persistent references (called DBRefś) that leverage the nice and traditional haskell reference syntax for performing database transactions.

DBRefs are in essence, persistent TVars indexed in the cache, with a traditional readDBRef, writeDBRef Haskell interface in the STM monad. Additionally, because DBRefs are serializable, they can be embeded in serializable registers. Because they are references,they point to other serializable registers. This permits persistent mutable and efficient Inter-object relations.

Triggers are also included in this release. They are user defined hooks that are called back on register updates. That can be used for easing the actualization of inter-object relations and also permit more higuer level and customizable accesses. The internal indexes used for the query language uses triggers.

It also implements an straighforwards non-intrusive pure-haskell type safe query language based on register field relations. This module must be imported separately. See Data.TCache.IndexQuery for further information

Now the file persistence is more reliable.The IO reads are safe inside STM transactions.

To ease the implementation of other user-defined persistence, Data.TCache.DefaultPersistence needed to be imported explcitly for deriving file persistence instances.

The 0.9 version adds full text indexation and search, incorporated in the experimental query language

It also changes the default Persistence mechanism. Now ByteStrings are used for serialization and deserialization . a Serializable class and a Persist structure decouple serialization to/from bytestring and write-read to file. Both can be redefined separately, so default persistence can be changed with setPersist to write to blobs in databases, for example. Default persistence has'nt to be in files.

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.4, 0.6.5, 0.8.0, 0.8.0.1, 0.8.0.2, 0.9, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.10.0.0, 0.10.0.1, 0.10.0.2, 0.10.0.3, 0.10.0.4, 0.10.0.5, 0.10.0.6, 0.10.0.8, 0.10.0.9, 0.10.0.10, 0.10.0.11, 0.10.0.12, 0.10.1.0, 0.10.2.0, 0.10.2.1, 0.10.2.2, 0.10.2.3, 0.10.2.4, 0.11.0.0, 0.12.0, 0.12.1, 0.13.3
Dependencies base (>=4 && <5), bytestring, containers (>=0.1.0.1), directory (>=1.0), old-time (>=1.0), stm (>=2), text, transformers (>=0.2 && <0.3) [details]
License BSD-3-Clause
Author Alberto Gómez Corona
Maintainer agocorona@gmail.com
Category Data, Database, Concurrency
Uploaded by AlbertoCorona at 2012-02-08T23:06:24Z
Distributions LTSHaskell:0.13.3, NixOS:0.13.3
Reverse Dependencies 6 direct, 3 indirect [details]
Downloads 36140 total (51 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]