-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Welcome to the devwebsphere Samples wiki! The purpose of this is to host code written by myself for the blog in a form thats much more consumable than a zip file attached to a blog entry. I’ll be tracking issues only through github from now on and I’m trying to use it as a maven repository for the code also. All code is provided with the same license as normal IBM sample programs and can be used by any IBM WebSphere customer. See the license in the repository for more details.
There are several projects hosted here:
WXS Utils
This is a set of utility classes useful for WebSphere eXtreme Scale customers.
Redis WXS
This is a prototype of a Redis like API to WebSphere eXtreme Scale. It experiments with adding list and set based key/value entries as a first class operation. It features a very simple API.
Google Bot
This is a sample showing how WebSphere eXtreme Scale can be used to ‘host’ a highly available BOT which can respond to user requests. A BOT is an automatic agent connected to something like googletalk or another IM system. It looks like any other instant messaging users except for the fact that it’s a program. It accepts chats from other IM users and responds with some useful information. Stock quotes for example or the weather or the current build status and so on.
The grid consist of X JVMs, any of which can be the actual bot engine. WXS places a primary in exactly one container at a time and the ObjectGridEventListener callback sends an event to the application to register with googletalk to indicate the BOT is both online and hosted within that JVM. If the JVM fails then WXS will fail it over to another container which then takes over.
This is a sample showing how to build a simple thrift based gateway to support commands with a WXS grid. This gateway allows non Java
clients to use a WXS grid for storage. Any client language supported by thrift can be used (.Net, C/C++, Python, Ruby, Erlang…)
Manual Partition
Usually, the keys for a Map are uniformly distributed across a fixed number of partitions. This assures that from a memory point of view that everything is spread out evenly. However, sometimes, the customer wants to manually assign which keys go to specific partitions. This is usually because some keys receive a lot more requests than others, for example stock trading. The sample uses a database table (KEY/PARTITION ID)
chirp-webapp
This is a twitter clone based on the retwis php twitter clone which uses redis. I ported it to Java and it uses the Rediswxs package for IBM WebSphere eXtreme Scale. It’s possible to get this running in 10 minutes. Make a MYSQL database with the right schema. Start a redis-wxs test server and then start chirp-webapp using netty.
wxslucene
This is a directory plugin for Apache Lucene. This allows Lucene indexes to be stored within a grid rather than on disk or using a RAMDirectory. This allows large indexes to be stored in memory instead of on disk. The large indexes are transparently stored on a grid of several JVMs. The heaps of the JVMs collectively provide the storage for the large indexes. This data can be replicated for fault tolerance also. It should provide performance levels faster than most disk based systems as practically as fast as SAN based systems.