Rolling out an agile development process

I have been asked to help in introduction of a development process for the team working on a greenfield project. The team consist of dozen or so developers with a given task to replace an old legacy system with something which will perform better, will be more flexible and easier to maintain. The existing process that is based on individuals being assigned to never-ending stream of tasks (mostly maintenance, bugfixes and improvements) might work, in my opinion, when system is not in active development stage, therefore not ideal for the greenfield project when there is much bigger density of innovation and collaboration required to succeed.

Interesting task I have to say. I think I will approach this by addressing both project management and engineering requirements by setting up an iterative process based on bits and pieces from Scrum and XP. It shouldn’t be a surprise to anyone involved in the past in Web21C Experiment. The Scrum process will kick off with pretty standard set of features hence I will not bother you with details.

What I want to achieve in field of team organisation is to:

  • grow a successful team that delivers business value (doh!) as soon as possible (doh!)
  • improve internal and external communication and information flow
  • share common understanding of the domain and the system
  • learn how to cope with inevitable change
  • activate developers to be more encouraged to introduce new ideas and solutions
  • put the team in position to be more in the partner relationship with business
  • improve motivation and satisfaction from work
  • encourage being passionate about technology and sharing that passion

In the same time in field of engineering practices I’ll stand my ground on:

  • automation, automation, automation
  • continuous integration
  • code coverage
  • automated integration tests
  • patterns
  • non mandated on-request pairing (you wonder what it is?)
  • lightweight solutions
  • shared code-ownership

There is an interesting lean Kanban process on horizon which looks as a good match for the environment however I will not be pushing for this initially. As the process should evolve over time there is always time to navigate original agile scrum process towards something which can be maybe a better choice. Only time will prove.

Comments, advice?

Popularity: 2% [?]

Comments

Bupa London 10000

I meant to write about something different than running, but it seams I more enjoy writing about this topic right now, so I will not be constraining myself and will give you an update.

Bupa London 10kI participated yesterday in the Bupa London 10k race, second edition of this, as organizers were trying to sell, premiere London 10k run. They are not far from the truth to be honest. Click on the image of the route. With starting line on next to Buckingham Palace and St. James’s Park and with the finish on The Mall, taking runners almost for a sightseeing including Westminster Abbey, Houses of Parliament, Big Ben, The London Eye, Cleopatra’s Needle, Tate Gallery, Millennium Bridge, The Monument, Lloyds of London, Leadenhall Market, Bank of England, Mansion House, St. Paul’s Cathedral, Horseguards, Nelson’s Column and Admiralty Arch is a running event in the capital not to miss for medium to long distance runners. It is a race organized by the same people working hard each year to make the London Marathon what it is, so everything what was needed was there. Even weather, comparing with previous year’s torrential rain, was just perfect.

I haven’t been preparing for this race in particular, mainly because after finishing Paris Marathon I decided to have a month off running. Only a week ago I started some training, first week of the 18 weeks programme which I am going to follow this time as preparation for the Berlin Marathon, Royal Parks Half Marathon and the Frankfurt Marathon. Yes, 2 marathons and a half in 5 weeks. I know, I know. I will write a bit more about this another time.

Coming back to the Bupa 10k. My time was 48 min 26 sec (5k split 24m56s), the official new personal best for this distance. Taking into account irresponsible but much appreciated BBQ the night before I am really happy with the time. It is slightly worse than my unofficial 46m52sec for first 10k from the Lisbon Half Marathon. I am using Garmin 405 for GPS tracking now so the details of the run are available on the Garmin Connect site.

The public registration for the London Bupa 10k 2010 opens next week on the 10th of June. It seems pretty early for a run happening in 12 months, but if someone wants to take part in the next year’s event I recommend signing up asap as I am sure the places will be sold out quickly.

Congratulations to Dave for achieving his dream target of sub-1h, Milan for not showing up, Andrew and Rachel for finishing their first 10k in a very good style and Maciej for being just scary fast for a first timer.

Popularity: 9% [?]

Comments (2)

Paris Marathon 2009

More than 31,000 runners lined up last Sunday at 8.45am on the the Champs-Elysées to take part in 33rd edition of the Paris Marathon, among them me in an attempt to finish my first marathon.

It is an awesome tour of Paris. The route leads from the Champs-Elysées to the  Place de la Concorde, Rue de Rivoli along the Louvre, then Place de la Bastille and roundabout of the Place de la Nation. Not far next is the second biggest park in the city: Bois des  Vincennes where runners make a 7km loop. Half marathon mark is on the way back from the park to Bastille where slight downhill helps save some energy for the second and final part. From Bastille the route goes towards the river Saine and the next 10km give everyone chance to enjoy river side views of Paris. The famous-infamous 31km mark is next to the Eiffel Tower where couple of hundred meter up hill stints remind about the distance behind and the already drained to minimum resources in the body. The biggest park in Paris, Parc de Boulogne, is a place for final effort where each passed kilometer brings us closer to the finish line on the Avenue Foch overlooking Arc de Triomphe.

It was the fastest race in Paris of all time, this year. Winner of the men’s event Vincent Kipruto of Kenya set a course record of 2:05:47.

On personal note I am happy with my own performance, far from above mentioned time, but within my sub-4h target. The official split times from the chip were:

5km      00:28:29
10km     00:56:34
15km     01:22:50
21.1km 01:55:44
25km     02:18:02
30km     02:47:28
35km     03:15:43
42,2km  03:57:21

Second part, let say from 32km hasn’t been easy but I managed to avoid hitting the wall and kept my pace at reasonable level. GPS track from the race is here and here (my phone crashed!). The race course and conditions were very good, maybe slightly too hot but is there anyone who knows how to control it? Great experience in a beautiful city though! I paid my personal price for this by missing the best snowboarding trip of the year to Laax but I think at the end it was worth it. That’s what she said.

So, the first marathon done! I already have got plans for the next one. Berlin in September, here we go.

Popularity: 23% [?]

Comments (1)

Lisbon Half Marathon 2009

Update on my running journey. Week and a bit ago, on Sunday 22nd March 2009, I’ve participated in the Lisbon Half Marathon. Starting in Almada, high on the toll plaza of the 25 de Abril suspension bridge, the race run over the bridge towards the city and eastwards along the river Tagus. It then turned towards Belém to finish at the Mosteiro dos Jerónimos.

For me it was a tune-up race before the Paris Marathon. I tried to take this as easy as possible which in race conditions is not a trivial task to do. As a result of this I have beaten my personal best by 11min :) Official time from the chip was 1h 47min 14sec. As always more details on the run together with GPS data is on the Nokia Sports tracker site.

Interesting city, ok organisation of the race, nice route and superb weather. Clearly worth doing.

Countdown to Paris continues. 5 days left, excitement is getting more and more obvious every day. I have to say I am really looking forward for that one. I am really lucky with my health, no major injuries during the prep. As it turns out at the Runner’s World forum there is a quite big group of runners from UK so I believe I will meet some of them in Eurostar on the way to Paris this Friday. If not then certainly in the Corcoran’s after the run!

Race starts on Sunday at 8.45am local time. Target time 3h 55min. Wish me good luck.

Popularity: 21% [?]

Comments

12 weeks marathon training plan

I spent some time at the beginning of the year looking for a marathon training plan suitable for me. If I had to find a common pattern in the structure of the plans I found it would be fair to say that most of them consist of a one long weekend run (20km - 25 km) and, depending how long and intensive the plan is, 2 - 3 other shorter runs (5km - 10km, intervals, hills) a week. The main message usually is: the more kilometers a week you run, the better you are prepared. D’oh!

My plan

It is a 12 week program which intends to accommodate my existing sport activities to replace some of the shorter runs with just around 30km of actual running a week. It is intended for people who are already in overall good shape as the plan is rather short. The week structure is:

Monday - rest

Tuesday - 5-a-side foolball - 60 min

Wednesday - squash 45 min

Thursday - fast run <= 10km

Friday - squash 45min

Sathurday - gym - cross training

Sunday - long run >= 20 km

The intention is that the squash and football replace hills repetitions and intervals often used in marathon preparation plans. Important to mention is that exercises at gym are not focused on legs. Rather everything else but legs. The distance of the long run should start with around 15km, then gradually get to 25km with maybe one 30km run during the training cycle. Last two weeks is a tampering time when  training impact should be decreased. Allocation of activities to the days of the week is flexible with only the long run to be done preferably on weekend.

My plan doesn’t really follow the rule mentioned above about making as much distance a week as possible but instead gives me a range of different activities. I believe it prevents fatigue often caused by excessive running which then might lead to injuries and overall lower performance.

Certainly it prevents boredom and allows you to have a social life for those 12 weeks! Also the length of the training is suitable for preparation for European marathons taking place at the beginning of April allowing someone to have normal Christmas and New Year’s break unlike the longer schedules. You know what I am talking about, don’t you?

I should know how well the training works in just 5 weeks as I will stand on the start line of the Paris Marathon on April the 5th. I replaced a usual long run 2 weeks before the final race day with a start in the Lisbon half marathon. That will be the gear, hydration and feeding strategy test day. More to come.

Popularity: 22% [?]

Comments (2)

Install Erlang on Mac OSX from sources

If you don’t want to use Flink or MacPorts to get you up and running with Erlang environment then you can follow these steps to compile and install Erlang from sources on your Mac.

First make sure you have installed latest Apple’s Xcode Developer Tools which will provide gcc compiler among the other toys.

The next step is to download Erlang sources and man pages. At the time of writing this post the latest version of Erlang was R12B-5. Consult the Erlang download page for details of current release. Let’s get the above mentioned files :

%  wget http://erlang.org/download/otp_src_R12B-5.tar.gz
%  wget http://erlang.org/download/otp_doc_man_R12B-5.tar.gz

Untar the sources and change current directory:

%  tar xzvf otp_src_R12B-5.tar.gz
%  cd otp_src_R12B-5

What we have to do now is to do usual configure/make/make install steps of compilation. To check available configuration options run:

%  ./configure --help

I will configure Erlang with:

%  ./configure --prefix=/sw/erlang --enable-threads
--enable-smp-support --enable-kernel-poll

Next steps are creating the target directory, compilation and installation, uncompressing the man pages:

%  sudo mkdir /sw/erlang
%  make
%  sudo make install
%  sudo cp ../otp_doc_man_R12B-5.tar.gz /sw/erlang/
%  cd /sw/erlang
%  sudo tar xzvf otp_doc_man_R12B-5.tar.gz
%  sudo rm otp_doc_man_R12B-5.tar.gz

The last step will create man folder in /sw/erlang. Everything almost ready. We should add Erlang to the PATH and man pages to the MANPATH i.e. in ~/.bashrc.

export PATH=$PATH:/sw/erlang/bin
export MANPATH=$MANPATH:/sw/erlang/man

The last step is to load the updated .bashrc file:

%  . ~/.bashrc

Everything should be up and running now. Try:

%  man erlang
%  erl

Popularity: 42% [?]

Comments (2)

On dynamic cluster configuration using Terracotta Cluster Events

World awaits Obama’s magic but I’ll write about something slightly more down-to-earth. I’ve been thinking recently about an implementation possibilities for the dynamic cluster configuration. Lets simplify and assume that a system will consist of identical nodes which can take on different responsibilities depending only on a configuration on the node. The communication between nodes would be achieved by using some kind of messaging technology. So, where am I going with this? It would be good to be able to dynamically reconfigure the cluster nodes to serve as required at the time. The cluster can obviously change over time, some nodes might fail, some other nodes might join the cluster and having a cluster manager which can apply configuration to the current cluster shape and size would be great from flexibility and maintainability perspective. And then the Terracotta comes into the picture. Its feature which can be really useful here is set of cluster events which one can listen to:

  • com.tc.cluster.event.thisNodeConnected — The local client connecting to a Terracotta server
  • com.tc.cluster.event.thisNodeDisconnected — The local client disconnecting from a Terracotta server
  • com.tc.cluster.event.nodeConnected — Another client connecting to a Terracotta server
  • com.tc.cluster.event.nodeDisconnected — Another client disconnecting from a Terracotta server

To consume the events we will use javax.management classes and first we will get reference to a MBeanServer:

MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();

Then we should get the cluster bean. I created small helper class ClusterUtils as described in the Terracotta JMX Guide:

ObjectName clusterBean = ClusterUtils.getClusterBean(mbeanServer);

We can alrady check what is the identificator of the current node:

String nodeId = mbeanServer.getAttribute(clusterBean, "NodeId").toString();

The only remaining step is registration to the JMX notifications:

mbeanServer.addNotificationListener(clusterBean, new SimpleJmxNotificationListener(), null, null);

Where the SimpleJmxNotificationListener implements javax.management.NotificationListener. We are ready now to consume the events and react accordingly to the changes in the size of the cluster. There is also a JMX Util library that makes using Terracotta Cluster Events even more easy.

By default the cluster nodes will be indentified by strings in format ClientID[SEQ_NUMBER] like ClientID[85]. If we wanted to set different identification in theory we could use -Dtc.node-name=NAME property when starting a given JVM. However there is currently (Terracotta 2.7.1) an open problem with handling of that property which hopefully will be resolved soon.

Everything what is needed to create a dynamic cluster manager is in place now. Cluster manager would be deployed on each node and share own state in Terracotta cluster. It is not difficult to imagine creating a bit of logic to handle connections/disconnections of new nodes in a cluster and dynamically reconfigure the existing nodes to accommodate to the change. There is always a recurring topic of partitioning when using Terracotta, how to follow paradigm of locality of reference when building a low latency, scalable systems. Combination of the cluster management described above with dynamic subscription to messaging topics with sticky routing could be a nice solution to the problem. Just musing…

Popularity: 38% [?]

Comments (2)

Last value queues in Apache Qpid

Apache Qpid is an open source implementation of Advance Message Queuing Protocol (AMQP), an emerging open standard for inter-operable Message Oriented Middleware (MOM) communication in financial market data delivery. I have been looking recently at Red Hat MRG Messaging which is based on Apache Qpid.
The feature of Qpid which I wanted to write about today is called Last Value Queues. Definition from MRG User Guide:

“The last value queue type causes logically updated versions of previous messages to appear to overwrite the older messages. To use this feature, add a qpid.last_value_queue key to the arguments supplied. The value of the key is irrelevant. Messages published to the queue then need to specify a value for the qpid.LVQ_key in the headers of messages they publish. The last value queue uses the value of the qpid.LVQ_key to determine whether a newly published message is an update to an existing message on the queue. If this is the case, the new message will appear to overwrite the older message. A subscriber that requests messages after this has occurred will see only the newer message.”

Common example would be a queue with latest price updates per symbol when we are interested only in the last value per instrument. The documentation of MRG Messaging mentions only last value queues defined by providing qpid.last_value_queue parameter when creating a queue. There is also slightly different implementation of this feature defined by parameter qpid.last_value_queue_no_browse. The difference is described on qpid website.

Let start and create a last value queue using qpid-config tool:

qpid-config add queue lvq --last-value-queue

Check if the queue has been created:

qpid-config queues

Queue Name                                        Attributes
======================================================================
lvq                                               --last-value-queue

The messages with the same value of the qpid.LVQ_key property will be replaced, so if we wanted to write simple price publisher that publishes 12 messages of four symbols SYMBOLS = new String [] {”Crude”, “Gold”, “Silver”, “Copper”} which uses the last value queue feature the code would look like:

Destination destinationQueue = new AMQQueue("amq.direct", "lvq");
MessageProducer producerQueue = session.createProducer(destinationQueue);
TextMessage txtQueueMsg = session.createTextMessage();
for (int i=1; i < = 12; i++) {
    String symbol = SYMBOLS[(i-1)%4];
    txtQueueMsg.setStringProperty("qpid.LVQ_key", symbol);
    txtQueueMsg.setText(String.format("Tick %d for symbol %s", i, symbol));
    producerQueue.send(txtQueueMsg);
    log.info(String.format("Producer: sent message => %s",  txtQueueMsg.getText()));
}

Let’s create a synchronous client to consume the messages:

Destination destinationQueue = new AMQQueue("amq.direct", "lvq");
MessageConsumer consumerQueue = session.createConsumer(destinationQueue);

boolean finished = false;
while(!finished) {
    TextMessage message = (TextMessage) consumerQueue.receive(5000);
    if (message != null) {
        log.info(String.format("Consumer: received message %s key=%s", message.getText(), message.getStringProperty("qpid.LVQ_key")));
        message.acknowledge();
    } else {
        log.info("Timeout");
        finished = true;
    }
}

Assume that consumer subscribed to the queue after publisher finished publishing the 12 messages. In this case the consumer will receive only 4 messages, one per symbol:

Consumer: received message Tick 9 for symbol Crude key=Crude
Consumer: received message Tick 10 for symbol Gold key=Gold
Consumer: received message Tick 11 for symbol Silver key=Silver
Consumer: received message Tick 12 for symbol Copper key=Copper

Popularity: 72% [?]

Comments (2)

Installing Midnight Commander on Mac OSX

Midnight Commander (mc) is one of the tools which I always like to see on *nix systems I use. I just can’t understand why Orthodox file managers like good old Norton Commander on DOS or more up to date excellent Total Commander on Windows are not more popular, but nevertheless I am not here to convince anyone to use them, just want to mention that even if you are a deep command line devotee you could find the tools useful. And certainly if you are deep mouse devotee you should try.

I will explain quickly how to install mc on mac (Mac OSX Leopard 10.5.6) using Fink. Installation with Fink should be painless and this blog post should not exist but I experienced an issue with the process I wanted to share quick solution:

1. If you don’t have Fink yet install it
2. Run:

sudo apt-get install mc

3. Try to start Midnight Commander:

mc

4. Fink should install all dependencies but if you encounter following error go to step 5, if not you are done:

dyld: Library not loaded: /sw/lib/libintl.1.dylib  Referenced from: /sw/bin/mc

Reason: image not found

5. Small dirty hack to fix the previous problem:

sudo ln -s /sw/lib/libintl.3.4.3.dylib /sw/lib/libintl.1.dylib

I know that there are more clean solutions than this one. Share this with me! What’s your favourite OFM?

Popularity: 44% [?]

Comments (2)

Evaluating Terracotta

Close to two years ago I had my first look at Terracotta when researching available technology for sharing state and scaling Aloha. First impressions were good. Terracotta delivered what promised: easy integration with an existing single node application and virtual shared heap available across whole cluster. However it has much more to offer. I have been looking again recently in the distributed cache and data grids area trying to assess options for a project I am working on currently. Below is a digest from my web-crawling of publicly available data on the topic. In each of the paragraphs I will try to put some light on a specific aspect that someone would like to know when considering Terracotta.

Resilience

Terracotta clusters offer simple and scalable HA implementations based on the Terracotta server array. Terracotta server arrays can vary from a basic two-node array consisting of an active server instance backed by a hot standby (for instant failover), to a multi-node array with many active server instances providing scale and deep failover coverage. Terracotta give high availability of the data by not only replicating it across servers for redundancy, but also by providing a simultaneous permanent storage of all current shared (in-memory) data to disk – available to all server instances (no loss of application state). Temporarily disconnected server instances and clients are automatically reconnected, hot standbys restored without operator intervention. There is no single point of failure and bottleneck in the Terracotta architecture.

Failover

Terracotta server array provides instant failover and continuous uptime and services using a hot standby or multiple active servers. Multiple Terracotta servers can be clustered together in active-active or active-passive configurations, helping to further scale Java applications and to provide disaster recovery.

DB Persistence

Terracotta helps to protect database in a scale out architecture. There is a problem with usual approach with a cache in front of the database. The performance of the cache is degradated when the number of nodes increases. Hibernate offers a second-level cache option, which can improve the performance of the Hibernate application by eliminating the need to fetch often used data objects from the database, instead storing, or caching, that data in process with your application. Without any mechanism to provide replication of the underlying cache, data written in one node can be stale on another node. This problem is not solved by Hibernate, rather it is up to the underlying cache to provide a replication scheme to keep multiple copies synchronized. Terracotta provides a consistent mechanism to keep any cache written in Java synchronized, and therefore provides this support for caches such as EHCache. Advantages: Performance — Reading and writing to replicated data with Terracotta can be 10x - 100x faster than other solutions, Cluster-wide load — Replication of data eliminates the need for more than one node to load data from the database. In a scaled-out application, this can reduce database load by a significant factor due to the fact that only one node needs to request any piece of data for a cache miss and all subsequent requests on other nodes will result in cache hits.

Distributed caching implementation

Terracotta uses concept of the Network-Attached Memory. It clusters JVMs directly underneath applications providing distributed, shared heap. The implementation doesn’t rely on serialization of whole objects, rather on instrumentation of the byte code and injecting hooks in there which allow synchronizing of deltas in the object state. State changes in a Client JVM are published to Terracotta Server Array and all other Client JVMs are seamlessly updated. Other Terracotta’s features apart from shared heap are: distributed locking, distributed data structures – (HashMap, ArrayList, LinkedBlockingQueue, any POJO), guaranteed coherent clustered objects. Objects do not have to implement Serializable to work with Terracotta.

OS/Platform restrictions

Terracotta is a 100% Java solution.

Certified platforms: Solaris 10, Solaris 9, RedHat ES4, SUSE ES10.1 (32/64bit), Windows Server 2003 R2, WindowsXP (dev only)
Server JDKs: Sun Hotspot 1.5.0_16, Sun Hotspot 1.6.0_07
Client JDKs: Sun Hotspot 1.4.2_18, Sun Hotspot 1.5.0_16, Sun Hotspot 1.6.0_07
Containers: Tomcat 6.0.18 / 5.5.26 / 5.0.28, Apache Geronimo 1.1.1, BEA WebLogic 8.1 sp6, BEA WebLogic 9.2.MP2, JBoss 3.2.8.sp1 / 4.0.5, Jetty 6.1.11, WebSphere CE 1.0.1.2 / AS 6.1.0.7, Glassfish V1 ur1-p01-b02, Glassfish-v2 ur2-b04

Ease of implementation

Big advantage of Terracotta. A clustered application looks no different than a standard Java applications. In theory a correct multi-threaded application can be clustered just by providing a simple xml config defining roots of application state hierarchy which one wants to share across multiple JVMs. Distributed locking and thread coordination uses usual language artefacts like ’synchronized’, ‘wait’/'notify’ and java.util.concurrent support. Pre-existing Terracotta Integration Modules (TIMs): purpose-built, tested, and tuned to implement a particular clustered architecture pattern or integrate with a particular third-party technology, for example use TIMs for Spring, Hibernate, Quartz, Compass, Lucene, Guice, Camel, Struts, Joda time and more to seamlessly add clustering to an application. Last but not least: Terracotta is an open source product with an active community.

Hardware requirements

Client:

Memory Sizing - Java Heap: each client JVM should do work on data that fits in its local heap
Memory Sizing - RAM: enough RAM to accommodate the heap of the Terracotta client JVM
Number of client nodes: determined by the total size of the active clustered data set and total required throughput. Entire data set will fit in the sum of the total heap available for clustered object storage across all Terracotta client JVMs.

Server:

Memory Sizing - Java Heap: Ideally, all of the clustered object data should fit into its heap, note: allow for garbaged objects, not recommended heap > 6/8GB
Memory Sizing - RAM: enough RAM to accommodate the heap of the Terracotta server JVM. In addition, there should be enough RAM headroom to keep the blocks of the Sleepycat data store files in the host operating system’s filesystem cache for fast access.
CPU: dedicated server, capacity planning needed. Note: The more garbage your application creates, the more CPU resources will be consumed by the Terracotta Distributed Garbage Collector. Likewise, the higher the object read or write rate between Terracotta client nodes and a Terracotta server instance, the more CPU resources that server instance consumes.
Number of server nodes: min 2 for HA and failover

Network

Gigabit full duplex between server and clients, and server array, low latency network, redundant NICs and redundant switches with automatic failover

Performance

According to Terracotta: it is faster than other distributed cache, data grid solutions. It is due to the nature of synchronizing only deltas of object state. Terracotta scales much better than i.e. Coherence even with big transaction payloads. At small scale it has throughput 2x Oracle’s at all transaction sizes. At high scale (8 nodes) throughput was as much as 10x higher than Oracle. However independent tests of a specific use case scenario should be performed to back up the results.

Support package

There are Enterprise Subscription packages: production support GOLD 7X24 | SILVER 5X12 with issue escalation privileges and procedures. Also consulting and training services. Pricing individually discussed.

Code stability

Current version 2.7.1. Code is mature as the company started to work on Terraccota in 2003. Two years ago project has been opensourced. Licensed as Terracotta Public License, based on the Mozilla Public License. Free version requires displaying the words “Powered by Terracotta” in user interfaces. Commercial Version removes this requirement. Typical price $7,000 per node. A single Terracotta server can handle up to 150 nodes, but on heavy Java applications, such as those used in online reservation systems, that gets reduced to somewhere between 15 to 20 nodes per Terracotta server.

Partitioning

Workload partitioning:

Terracotta does not ship with a particular workload partitioning strategy in the box. Layer 7 sticky load balancer that is able to route requests for a particular user session to the same Terracotta client application server and is likewise able to balance user sessions evenly across all available application servers can be used to achieve workload partitioning. Use of round-robin or a non-sticky load balancing is strongly discouraged. Other forms of workload partitioning may be required for different use cases. Implementing workload partitioning algorithms in Java that can then be made cluster-aware via Terracotta is often a simple way to meet custom workload partitioning requirements.

Data partitioning

Each application server should only have the data that its workload requires access to in heap. (Magic warning!) Terracotta detects how your application uses its data and optimizes the data location automatically to minimize network updates. Terracotta manages replicating in the most efficient way. Only deltas to your object graph are pushed, objects automatically reside in JVMs that need them, and not in JVMs that don’t (vs. alternatives that always force you to configure and partition up front).

Transactional

Terracotta transactions are sets of clustered object changes that must be applied atomically. Transactions are bounded by lock acquisition and release. When a clustered lock is acquired by a thread, a Terracotta transaction is started and all changes to clustered objects made within the scope of that lock are added to that transaction. When the lock is released, the Terracotta transaction is committed. If a thread attempts to modify a clustered object outside the context of a terracotta transaction, a runtime exception will be thrown.

Replication and consistency

Fully synchronous replication between nodes. The data is always coherent and doesn’t suffer any cache drifts.

Popularity: 69% [?]

Comments (6)

« Previous entries

Close
E-mail It