The Guide is the best way to get started using Jofti. It contains a number of examples to help explain the concepts and if you have any feedback please use the support forums.
This document provides detailed technical information for installing, configuring and developing with Jofti.
Jofti is an indexing mechanism to allow aribitrary querying and retrieval of objects in a cache or Map type Collection structure (see later sections for details). The intention is to enable applications to use property fields in the object itself, rather than only some primary key, to retrieve the object from the cache.
This indexing should be transparent to the user of the cache and provide a minimal overhead and programming effort. In addition, the index should be able to cope with frequent updates, multi-threaded usage and a high data churn rate.
Jofti does NOT depend on a particular cache implementation, nor does it supply its own implementation of a cache. Rather, at run time a particular cache implementation can be plugged into the index (providing an adapter has been written for it - see later section on configuration and usage). This allows you to keep your own preferred cache and still use the index with very minimal changes to your code.
In addition, it is possible to configure the indexes to run with multiple caches from different vendors, so for instance you may want to use EHCache for a local in memory cache for a certain set of data and JBossCache to replicate other types of data to different machines. Although the implementations may have different usage idioms, once wrapped in Jofti the Caches can be used in an identical manner from a code perspective. (see configuration and usage section for details). This then allows an easy swapping of cache implementations without changing any code when requirements change.
Jofti is a way of indexing objects, it does not do full text indexing in the same way say Lucene does and is not really suited to this task - it is better to choose a text indexer to do this. However, unlike text engines the indexes do take into account types, so numeric and date data, for instance, is not indexed lexically but rather by the value that type represents.
There are several terms used throughout this document:
Although Jofti ships with a number of Cache adapters, the indexing is not only suitable for use with a Caching solution. It also is suited to act as a general indexing mechanism for data stored in a Map. Often when placing data in a Map it would be useful to have a way to look up data in by something other than the key. Jofti provides that ability in a simple way.
Jofti is downloadable as a .zip file for windows or a .tar.gz for Unix and Linux. Once it has completed downloading, expand the .zip file (using WinZip or the unzip command-line utility) or the .tar.gz file (using gunzip and tar) to the location of your choice. Expanding the .zip or .tar.gz will create a Jofti directory with several sub-directories and libraries.
To expand the .tar.gz file on Unix, go to the directory into which you want to install, such as /opt, and issue the following command, supplying the path to the .tar.gz file if necessary:
gunzip -dqc jofti.tar.gz | tar -xvf
To use Jofti in your application you will need to make sure that jofti.jar library (found in Jofti/) is in the CLASSPATH (or the equivalent mechanism that your application uses).
Alternatively, if your application server supports it, you can package the jofti.jar library into your application's .ear, .jar or .war file.
For purposes of compilation, you will need to make sure that jofti.jar library is in the CLASSPATH (or the equivalent mechanism that your compiler or IDE uses).
Jofti also needs the following libraries at runtime:
If you are using the source files you will need to obtain the following libraries (in addition to the four above) in order to build the project: