«Top»

This page introduces the User Event Cache, which is the example application used
throughout our series on software caches in Java application servers.

The goal is to have a very simple example application that can be implemented
using different cache architectures.

example-app

The User Event Cache has a simple Web interface that can be used to perform
the following steps:

  • Generate events, like “fabian logged in” or “tobias tried to log in
    with a wrong password”.
  • Search for entries for a user, like all entries for “fabian” or
    all entries for “tobias”.
  • View the latest entries for that user.

The User Event Cache is used to illustrate common cache features:

  • housekeeping (automatically deleting old events)
  • concurrent access (multiple browser windows accessing the Servlet)
  • clustering (multiple Servlet containers sharing a cache)
  • real-time access (no disk IO during read and write)
  • full text search
  • transactions (order of log messages)

Web Interface

The example application has a Web interface for testing the different
implementations.

index-page

On the start screen, there are two links:

  • A simple interface for writing and reading single events.
  • An interface to schedule the creation of multiple events, which
    can be used for testing concurrent access.

The following screen shot shows the simple interface:

simple-read-write-page

The concurrency test page is shown here:

concurrency-page

The web page interacts with the server via a REST Web service, i.e.
the tests can also be performed using the command line
curl
instead of the Web front-end.

How to run

The source code for the example application is hosted on GitHub:

https://github.com/ConSol/java-caches-demo.

The examples can be run via maven.
With each example introduced in the following parts, we will show
which maven goal can be used to run the example.

Next

The remainder of part 01 introduces the example application as follows: