tag:blogger.com,1999:blog-349260582024-03-13T12:19:15.577-07:00DSO GuyRandom thoughts about Software and other stuff...Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.comBlogger78125tag:blogger.com,1999:blog-34926058.post-63898540411208785832011-09-25T20:16:00.001-07:002011-09-25T20:17:03.010-07:00New Home...Hey readers. Just a heads up that as of today I'm doing my posting over at <a href="http://scaleaholic.blogspot.com/">http://scaleaholic.blogspot.com</a>. Check it!Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-69982391150463033232011-08-01T08:09:00.001-07:002011-08-02T20:13:00.180-07:00What Is Terracotta?One of the biggest challenges in software is telling people what your software is in a way that helps them make decisions about it. This challenge can often be as difficult as designing and building the software itself. The <a href="http://www.terracotta.org/">Terracotta</a> team recently hooked up with the gang from <a href="http://www.epipheostudios.com/">Epipheo</a> studios to create a 2 minute video to do just that. We spent a lot of time thinking about and refining things in order to get a clear succinct message. I think it came out quite well. <div><br /><div><br /></div><div><b>Check it out:</b></div></div><br /><br /><iframe width="360" height="249" src="http://www.youtube.com/embed/aAZnsofBV-I" frameborder="0" allowfullscreen></iframe>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com1tag:blogger.com,1999:blog-34926058.post-67415953276105720502011-07-11T18:13:00.000-07:002011-07-12T09:38:06.692-07:00Easy Java Performance Tuning: Manage Objects By Size On The Java Runtime Heap<div style="text-align: center;"><br /></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4quhoECnxPJ2XzR_6zTGHDeMSzL1z9GyhUTUqK0ea_c2piPDf08u7ASSFRIPzbT1BGGHHle2kKyFZwjAydFx4tiDFWv6briZvlGhPeJe8GJo5Rx12zjoi0L933XI2RillH5tRsg/s1600/TSA.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"></a><div><b><span class="Apple-style-span" style="font-size:large;">The Problem?</span></b></div><div><br /></div><div>For those of you who use caching with things like <a href="http://ehcache.org/documentation/hibernate.html">Hibernate</a>, Spring or anything else, you know what a pain performance tuning can be. The tools you have available for tuning, resource management and avoiding OOME's boil down to counts and age controls. These are actually not resource management controls at all. They are data freshness controls and should be treated as such.</div><div><br /></div><div>How do you even begin to figure out how many entries to allow in each <a href="http://ehcache.org/documentation/hibernate.html">Hibernate cache</a> when you have a hundred of them? What if things change and objects get bigger, or smaller. What if you change your heap size and/or usage patterns? </div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">You've Gotta Try This...</span></b></div><div><br /></div><div>With <a href="http://www.terracotta.org/beta">Ehcache 2.5 Beta1</a> you can just <a href="http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher">specify a percentage of heap or a heap size</a> in bytes that your graphs of Java objects are allowed to use. This is accomplished by passing a simple size description into a Cache or CacheManager. All objects held onto by the cache will borrow their space from the cache's or manager's specified pool. Entries will get evicted from the cache as space runs low without any intervention from the developer. This can be done at the Cache Tier level whether it's on heap, disk or <a href="http://www.terracotta.org/bigmemory">BigMemory</a>. It's another way to reduce tuning, improve performance while avoiding OOME's. Learn more <a href="http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher">here</a>.</div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4quhoECnxPJ2XzR_6zTGHDeMSzL1z9GyhUTUqK0ea_c2piPDf08u7ASSFRIPzbT1BGGHHle2kKyFZwjAydFx4tiDFWv6briZvlGhPeJe8GJo5Rx12zjoi0L933XI2RillH5tRsg/s400/TSA.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5628291738479093634" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 378px; " /></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><br /></span></div><div><br /></div><div><b>If you do things in config or in code it's just a one line change:</b></div><div><br /></div><div><br /></div><div><script src="https://gist.github.com/1077193.js?file=gistfile1.java"></script></div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">A few More Details...</span></b></div><div><span class="Apple-style-span" style="font-size:large;"><b><br /></b></span></div><div>It works on any 1.5 or 1.6 JVM (Tested on Oracle, JRocket and IBM). Doesn't require any object serialization for the on heap management.</div><div><br /></div><div><b>Learn More:</b></div><div><b><br /></b></div><div><div><a href="http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher">http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher</a></div></div><div><a href="http://www.terracotta.org/beta">http://www.terracotta.org/beta</a></div><div><a href="http://dsoguy.blogspot.com/2011/04/biggest-problems-in-local-caching.html">http://dsoguy.blogspot.com/2011/04/biggest-problems-in-local-caching.html</a></div><div><br /></div><div><b>Try it out and give us lots of feedback on the Terracotta Forums:</b></div><div><b><br /></b></div><div><a href="http://forums.terracotta.org/">http://forums.terracotta.org</a></div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-64984774430564542972011-05-22T23:37:00.000-07:002011-05-22T23:51:10.725-07:00Exciting Times... Terracotta and Software A.G.Exciting times over here at Terracotta.<div><br /></div><div>Read all about it:</div><div><br /></div><div><a href="http://www.softwareag.com/corporate/company/terracotta.asp">http://www.softwareag.com/corporate/company/terracotta.asp</a></div><div><span class="Apple-style-span" style=" ;font-family:Helvetica;font-size:medium;"><a href="http://terracotta.org/terracotta-joins-software-ag">http://terracotta.org/terracotta-joins-software-ag</a></span></div><div><a href="http://blog.terracottatech.com/2011/05/terracotta_joins_software_ag.html">http://blog.terracottatech.com/2011/05/terracotta_joins_software_ag.html</a></div><div><br /></div><div>This is great news for Ehcache, Quartz, and Terracotta customers and communities!</div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-67410088210670832192011-04-20T08:22:00.000-07:002011-07-01T13:47:59.286-07:00Local Caching++<div><div><div><div><div>Ok, so you've built your application in Java. You've used all the usual tools. Tomcat, Spring, <a href="http://ehcache.org/">Ehcache</a>, <a href="http://quartz-scheduler.org/">Quartz</a>, etc. Or maybe you went the <a href="http://ehcache.org/documentation/jruby.html">JRuby</a>, <a href="http://ehcache.org/documentation/grails.html">Grails</a> or Scala route. You test your new application or hand it off to run in production and it's too slow. This is just a single node application at this point. It services 20-100 users. It's churning and burning the database, creating and recreating the same Web Pages, Users and other relevant data. You want to start caching locally to solve your latency and throughput problems. Then, upon a more detailed look at your application, you get scared.</div><div><br /></div><div>You find your application has:</div><div><ul><li>40 DB tables in Hibernate that can be cached</li><li>A web cache</li><li>A user session cache</li></ul></div><div>Then it hits you. Caching is easy but cache tuning is hard.</div><div><br /></div><div><b>What Makes Cache Tuning Hard?</b></div><div><br /></div><div>In conversations with 100's of cache users there are actually a small handful of difficult to work through challenges applying caching to an application:</div><div><br /></div><div><ul><li><b><span class="Apple-style-span" style="font-weight: normal; "><b>Hibernate/</b></span>Lots of caches </b>- When using Hibernate you often end up with as many as 100 tables in your DB. How do you balance a fixed amount of resources(Heap/<a href="http://ehcache.org/documentation/offheap_store.html">BigMemory</a>) across 100 caches?</li><li><b>Indirect knobs/Bytes vs Count/TTL</b> - In local Java caching the control points are almost always measured in number of entries and time to live. But wait a minute! When I start the JVM I don't say how many objects the heap can hold and for how long. I say how many bytes of memory the heap can use?</li><li><b>Who Tunes and When?</b> - At some companies the desire is to have the "Application Administrator" do the tuning. At others it's the "Developer." They have different understandings of the application. The developer can tune by knowledge of the application. The app admin can only tune based on what's happening when the application is running.</li></ul></div><div>These are the challenges we are working to solve in the next version of Ehcache. While it's early days on the dev side we would love feedback on our approaches. You can get a sense of how it's going to <a href="http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher">work from the doc on ehcache.org</a>.</div><div><br /></div><div><b>What We Are Building</b></div><div><br /></div><div>Greg, me and the dev team spent a bunch of time pondering the above problems over the last few years. We felt that with two key improvements to how people tune we could address most of the above (and a few more items hit the rest):</div><div><br /></div><div><ul><li><b>Tune from the top</b> - Define max resource usage for the whole cache manager and then optionally define it for the individual caches underneath it as needed. So if you have a hundred caches you can start with, "Give these 100 caches N amounts of Heap/OffHeap." Then monitor and see if any specific caches need special attention.</li><li><b>Tune the constrained resource, Bytes</b> - TTL is a cache freshness concern not a resource management concern. Max entry count does not directly map to available heap resources. So we are adding "bytes" based tuning. This eliminates the mistake prone process of trying to control resources by TTL/TTI/count and hope you get it right. Instead you say, "I want to allow caching to use 30 percent of heap." We take it from there.</li></ul></div><div><br /></div><div><b>Wrapping Up</b></div><div><br /></div><div>With those two key improvements a developer or admin is now directly turning the knob (Size of cache in bytes) that maps to the resources available in the JVM and doing it at a global level or a local level as needed to avoid hard to tune individual cache constraints.</div><div><br /></div><div>This will work with all of our JVM level cache tiers (onHeap, <a href="http://ehcache.org/documentation/offheap_store.html">BigMemory</a>, Disk).</div><div><br /></div><div>When you put those features together with other items coming in the next major release like entry and <a href="http://ehcache.org/documentation/configuration.html#Pinning_of_Caches_and_Elements_in_Memory">cache pinning</a> and a <a href="http://ehcache.org/documentation/configuration.html#Cache_Warming_for_multi-tier_Caches_Ehcache_2.5_and_higher">snapshotting bootstrapper for warming</a> we feel like this will be a very powerful release.</div><div><br /></div><div>Please check out the new docs and give us feedback by commenting on this blog or posting the the <a href="http://forums.terracotta.org/">Ehcache forums</a>. </div><div><br /></div><div>Help us make Ehcache as easy to use and powerful as we possibly can.</div><div><br /></div><div><a href="http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher">http://ehcache.org/documentation/configuration.html#Memory_Based_Cache_Sizing_Ehcache_2.5_and_higher</a></div></div></div></div></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com4tag:blogger.com,1999:blog-34926058.post-5467033538037061232011-04-16T08:20:00.001-07:002011-04-16T19:03:13.437-07:00Where To Buy Your Apple Gear?<div style="text-align: left;">Most people who know me think I'm a bit of an <a href="http://www.apple.com/">Apple</a> products junkie. I can't deny it. I'm a big fan of Apple products (Typing this blog on my <a href="http://www.macmall.com/p/product~dpno~8233536~pdp.gcgaeid;jsessionid=856D67B0B82F7ED7B4FE6E5D7CB0A114?source=APPINSDRMWB27133">11.6 inch Macbook Air</a>) and the way they package and reuse great ideas across devices. Being that I'm such a fan(boy) of the Apple ecosystem I'm regularly asked for advice from wood be purchasers when they want to pickup an Apple product. I'm writing this blog in order to provide that product purchase advice for my friends and family as well as for my readers who can't ask me verbally.</div><div><br /></div><div><br /></div><div><b>"Speed of Acquisition" vs "Help During Purchase" vs "Total Cost"</b></div><div><b><br /></b></div><div>The decision making process for where to buy Apple products usually comes down to three major questions. How do you rate "Speed of Acquisition" vs "Help During Purchasing" vs "Total Cost?" (See diagram for the big picture on this issue). Once you know the answer to the above question based on your keen sense of self awareness you can then weight the various purchase options appropriately. For best results, Be Honest With Yourself! </div><div><br /></div><div>NOTE: Many people think after sale help is somehow related to the purchase decision. IT IS NOT! The Apple store Genius bar will always help you no matter where you bought the device.</div><div><br /></div><div><br /></div><div><b>What's In The Cost?</b></div><div><b><br /></b></div><div>When buying an Apple product there are 4 components to the cost of the device:</div><div><ol><li>The price tag of the device itself</li><li>State sales tax</li><li>Shipping and Handling</li><li>What you can get thrown into the deal</li></ol><div>Take into consideration all four points when looking at the price. You can often save over a hundred dollars in sales tax just by ordering from an out of state, online retailer! In addition, many of these online retailers ship for free. These online retailers usually have the best discounts aka "price tag" on devices as well. Check out the <a href="http://www.appleinsider.com/mac_price_guide/">AppleInsider.com price guide</a>. It will tell you where to get the best deal on any given Apple device and is kept very up to date. It's where I look and where you should too. Another thing to consider is that on some items <a href="http://www.macmall.com/home">MacMall</a> and <a href="http://www.macconnection.com/">MacConnection</a> are actually flexible and may throw in things like printers and bags if you call.</div></div><div><br /></div><div><br /></div><div><b>The Need For Speed?</b></div><div><b><br /></b></div><div>Some people are impatient, some people need a computer right away, and others just like the experience of being first. These are all speed questions. In the speed world there are two categories of Apple products "Hot and Constrained" and "Generally Available."</div><div><br /></div><div><b>Hot and Constrained </b></div><div><br /></div><div>If we are talking about "Hot and Constrained" usually the fastest way to get a product is buying it from Apple. Either through their online store or going to an Apple Retail location. They stock themselves first. You may have to wait on lines but it's often your best and sometimes your only bet for acquiring new, hot, Apple devices.</div><div><br /></div><div><b>General Availability</b></div><div><b><br /></b></div><div>For "general availability" devices "fastest" is broken down again into two categories. Fastest online (Generally Amazon) and fastest brick and mortar (Generally Apple's stores). <a href="http://Amazon.com/">Amazon</a> is generally the best place to buy anything online as far as fulfillment (How fast they get it to you, amount in stock, ease of using store, return policies) and Apple products are no exception. Amazon's prices aren't the absolute bottom but they are pretty darn good.</div><div><br /></div><div>When buying from a retail store, Apple's is second to none. They get you in and out fast, have all the information you need, it's easy to find what you want and they have ton's of stock of everything Apple. The only downside is the sales tax and no discounts to speak of.</div><div><br /></div><div><br /></div><div><b>Help During Purchasing</b></div><div><b><br /></b></div><div>This one doesn't apply to me as when it comes to Apple products I tend to know what I want. It's a hobby of mine to monitor Apple's products and product direction. I use product and business learning from Apple for inspiration in my job building <a href="http://www.terracotta.org/">Performance and Scale</a> software (Probably a good blog topic as well. "How I Apply My Apple Learnings To My Business"). For the rest of the world, aka "normal people," who spend precious free time doing things like traveling, dating, hanging out with friends, help might be required. For those people you should probably lean towards either the <a href="http://www.apple.com/retail/">Retail Apple Stores</a> and or the online Apple Product specialists (MacMall and MacConnection) where they know everything about the devices and can help you make good decisions. For those who are like me, stick to "Total Cost" and "Speed" in your decision making process.</div><div><br /></div><div><br /></div><div><b>Conclusions</b></div><div><b><br /></b></div><div>When looking to buy an Apple device one must evaluate a number of options. You should evaluate those options against a keen sense of self awareness? Can you wait, are you cost conscious, do you need help? By answering those questions and comparing the results against the "Apple Product Purchasing Guide" diagram below, the AppleInsider price guide and the above criteria you should be able to make the best possible decision for you.</div><div><br /></div><div>Please let me know if you have any feedback about this blog. How can it be more helpful? Where did I get it wrong?</div><div><b><br /></b></div><div><b><span class="Apple-style-span" style="font-weight: normal; "><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFtHxzKAgAu4pmEhF1rjG2MK7NcA6CnCLygSxQNTSFVaphV__f6S-E3l9wIntW7Uub8dXtCh9z0u97uYckIc7pGSboZvEyLyjuo-z_x2EM4NLOQOAdhln9mWM6Tm-j7AxzJgi_9g/s1600/ApplePurchases.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFtHxzKAgAu4pmEhF1rjG2MK7NcA6CnCLygSxQNTSFVaphV__f6S-E3l9wIntW7Uub8dXtCh9z0u97uYckIc7pGSboZvEyLyjuo-z_x2EM4NLOQOAdhln9mWM6Tm-j7AxzJgi_9g/s400/ApplePurchases.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5596262959505126002" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 197px; " /></a></span></b></div><div><b><br /></b></div><div style="text-align: left;"><span class="Apple-style-span" style="color:#0000EE;"><span class="Apple-style-span" style="color:#000000;"><br /></span></span></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com1tag:blogger.com,1999:blog-34926058.post-19613299051389440502011-04-13T13:26:00.001-07:002011-04-13T14:09:57.180-07:00Please Strengthen My Weak LinkedIn Links...<div style="text-align: left;"><b>State Of LinkedIn</b></div><div style="text-align: left;"><b><br /></b></div><div style="text-align: left;">I've had a <a href="http://LinkedIn.com">LinkedIn</a> account for many years. I find it an excellent tool for keeping tabs on ex-coworkers, recruiting new ones, and watching job trends. The problem I have is that those links/connections in LinkedIn can be weak. It doesn't take those connections to the next level by helping me manage the relationships. It doesn't help me manage and monitor the strengthen of my connections.</div><div><br /></div><div><b>What Does Manage and Monitor Relationships Mean?</b></div><div><b><br /></b></div><div>At a macro level I can keep track of my first level connections and second level connections. I can traverse these to help me find people to hire, ask for advice and even look for jobs myself. It even does a ton of stuff to help me find new connections by making suggestions, forming groups etc. But at a micro level it does nothing to help me improve and make value judgements about those relationships. I.e. I have a relationship with Joe the CEO of SomeCompany.com. By looking at that link I can't tell if that's a strong relationship or a weak one (Monitoring). I also can't set goals of improving my relationships and keep track of those goals (Managing). It just gives me a tree/graph of the relationships as if they were all the same. Further, when I'm traversing through my relationships and into my connections relationships I can't tell how strong they are connected to their connections.</div><div><br /></div><div><b>What I Want...</b></div><div><b><br /></b></div><div>What I really want is for LinkedIn to help me manage and improve my relationships as well. It would all be much more powerful if I could apply a rating to each relationship, monitor the relationship's progress and assign goals for each relationship. I could do so on a 1-10 scale.</div><div><br /></div><div>So instead of a graph like this:</div><div><br /></div><div><br /></div><div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDPx1M4ez4tjaxm8ZSlX-GgdA1mnfiRcGI5-904Qla5OIsOH5zDCrjmKMES01nvk0cWnnbJiEohQd4kfkhvlpg7T95u5GYTUdQK_WRmQtc8mM-PUn0NP15JgtZWE9dHfPha9wuGA/s400/LinkedInRelationshipsToday.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5595173677343176690" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 382px; height: 168px; " /></div><div><br /></div><div>I could have a graph like this where the thickness of the lines indicated the quality of the relationship where it is right now:</div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZOmkrJm3Y4HA-pCagqwxJiUuKPH3KzCdyJTblIXEnTM8ShG-YKR7r97y5-_YE2kdMWXPhaVOz9_F2guL4NrntObMhzkAglGH1q8cxneLkb0QAFddkEmGrpsQKVxbKWRGYpwAk_w/s400/LinkedInRelationshipsTomorrow.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5595174160670611506" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 382px; height: 168px; " /></span></div><div>That would be a great start. Then I would like it to keep a history of the relationship as well. It could show me how the relationship is progressing over time. Say it started at a 10 but I haven't talked to Joe in 3 years and now I rate it a 4. It could represent it with little arrows or color showing deterioration. </div><div><br /></div><div>What about goals for a relationship? I could set a goal of 8 and do a query on all relationships that are not at the level I wish they were. It could remind me to make a quick contact with the person in question. It could auto deteriorate a relationship over time if I don't contact people.</div><div><br /></div><div><b>Summing Up...</b></div><div><br /></div><div>LinkedIn is great. I'm more connected than ever. But... I want to monitor and manage my links to improve my connectedness to certain people and I'm hoping linked in can help me. </div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-29546417349883446962011-03-24T17:02:00.000-07:002011-03-29T12:33:18.379-07:00"What" "When" and "Where" ... Quartz Scheduler 2.0 Goes GA<b>What is Quartz?</b><span style="font-weight:bold;"></span><div><b><br /></b></div><div><a href="http://quartz-scheduler.org/">Quartz</a> is <b>The Lightweight, Open Source, Enterprise-class Job Scheduler</b> for Java. For years Quartz has put the "When" in Java applications via it's full featured scheduling capabilities. As a result, from Spring to JBoss, Quartz is embedded in just about every major Java product. Quartz is extremely robust and full featured providing things like HA, Transaction Support and all the precise guarantees one needs to assure reliable Job execution. </div><div><br /></div><div>Terracotta has done a number of incremental improvements since taking over stewardship of Quartz. We've been evolving Quartz one step at a time while collecting what features the Quartz community were really interested in. </div><div><br /></div><div>Quartz 2.0 is the realization of those user requested features!</div><div><br /></div><div><b>"What" "When" and "Where"</b></div><div><b><br /></b></div><div>Let's step back a bit and review where Quartz fits in the Terracotta world view. As most people know <a href="http://www.terracotta.org/">Terracotta</a> is focused on adding Snap-in performance to JVM based applications through Scale-out (<a href="http://www.terracotta.org/enterprise-suite/">Terracotta Server Array</a>), Scale-up (<a href="http://www.terracotta.org/bigmemory">BigMemory</a>) and Speed-up (<a href="http://ehcache.org/">Ehcache</a>). We do this while maintaining our goals of <a href="http://dsoguy.blogspot.com/2010/04/clustered.html">simplicity</a>, <a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html">predictability</a>, and <a href="http://dsoguy.blogspot.com/2011/01/ehcache-at-2-billion.html">density</a> (can your datastore hold 2 billion entries per node in-memory?) throughout our product line. We view this data layer scaling layer as solving the "What" or the data problem of an application. But when going from 1 to many nodes that's just the first of two major scale points.</div><div><br /></div><div>Up until now, Quartz Scheduler has been solely focused on the "When" part of code execution. Making sure "code execution" happens exactly "When" it's supposed. It has been pretty much ubiquitous in that space with literally 100s of thousands of users. While it Scaled-out with JDBC and Terracotta, it gave precious little control over where jobs execute.</div><div><br /></div><div>With <a href="http://www.terracotta.org/quartz/">Quartz Scheduler</a> 2.0 we've now added that "Where." This is about where code executes. Instead of randomly choosing a node for job execution in a scaled-out architecture you can now create constraints that help make the decision based on "Where" it should be executed. You can do this based on:</div><div><ul><li><b>Resource Availability</b> - CPU available, Memory Available, custom constraints</li><li><b>Ehcache's data locality</b> - Bring the work to where the data is</li><li><b>Static allocation</b> - Just decide where it goes</li></ul></div><div>This gives Terracotta the ability to Snap-in and handle both the major scale-out points.</div><div><br /></div><div><b>What's new in Quartz 2.0</b></div><div><b><br /></b></div><div>The simple answer is A LOT!</div><div><ul><li><a href="http://www.quartz-scheduler.org/docs/2.0/newInQuartz2.html">Easy to use Fluent API</a> - Quartz 2.0 has a new, easy to use fluent interface that hides the complexity of building out the description of your jobs behind a simple description of what you want to happen and when. I wrote a short<a href="http://dsoguy.blogspot.com/2010/11/quartz-scheduler-20-beta-1-welcomes-new.html"> blog about this when it was in beta</a>.</li><li><a href="http://www.terracotta.org/quartz/">Quartz "Where"</a> - Constraint based system for controlling where jobs execute based on things like CPU and Memory usage, OS, and Ehcache data locality</li><li><a href="http://www.terracotta.org/quartz">Quartz Manager</a> - A flash based GUI console for managing and monitoring your scheduler in production.</li><li>Batching - Helps improve a schedulers throughput by allowing one to make trade-offs between perfect time execution and benefiting from batching.</li><li><a href="http://www.quartz-scheduler.org/docs/2.0/newInQuartz2.html">Ton's of bug fixes and features</a> - Lots of long requested features. Check out the link for the list.</li></ul></div><div><b><br /></b></div><div><b>Quartz 2.0 Is Now GA</b></div><div><b><br /></b></div><div>Quartz 2.0 makes a big leap in usability, power, visibility and management and it's NOW GA. We did this while maintaining Quartz's reliability and predictability. We focused on making sure existing users would have an easy time moving forward so <a href="http://quartz-scheduler.org/docs/2.0/migrationGuide.html">check out the migration guide </a>if you need help. It really is the next generation of Quartz. Give it a try and give us feedback as we are constantly working to make things better!</div><div><br /></div><div><b>More Reading</b></div><div><ul><li><a href="http://www.codespot.net/blog/2010/12/quartz-where/">http://www.codespot.net/blog/2010/12/quartz-where/</a></li><li><a href="http://www.codespot.net/TC/QuartzWhere.m4v">Quartz Scheduler "Where" Screencast</a></li><li><a href="http://dl.dropbox.com/u/5433799/QuartzManager.mp4">Quartz Manager Screencast</a></li><li><a href="http://quartz-scheduler.org/docs/2.0/newInQuartz2.html">What's new in Quartz 2.0</a></li><li><a href="http://www.terracotta.org/quartz">Quartz Scheduler</a></li></ul></div><div><br /></div><div><br /></div><div><b><br /></b></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-88259503736562042052011-02-14T21:02:00.000-08:002011-02-15T16:18:15.045-08:00Quick 5:41 Intro To Ehcache Search (Now GA)<a href="http://www.terracotta.org/ehcache/">Ehcache 2.4</a> went GA today. Still lightweight (under 1MB) and still backward compatible to 1.x so no reason not to give it a try. Below are the highlights and a short video on getting started with Ehcache Search:<div><ul><li><a href="http://dsoguy.blogspot.com/2010/11/couple-minutes-with-ehcache-search.html">Search</a> - Brand new search API. Allows one to get beyond the key based lookup of objects (<a href="https://github.com/sharrissf/Ehcache-Search-Sample/downloads">Check out this sample</a>)</li><li><a href="http://ehcache.org/documentation/jta.html">Local Transactions</a> - Fast optimistic concurrency without the need for a TransactionManager (<a href="https://github.com/sharrissf/Ehcache-Local-Transaction-Sample/downloads">Check out this sample</a>)</li><li><a href="http://dsoguy.blogspot.com/2011/01/ehcache-at-2-billion.html">Bigger BigMemory</a> (ee) - 2 Billion entries, 1.3 million TPS, Extreme predictability for meeting SLA's</li><li>Bigger Disk Store (ee) - Swap your Ehcache to disk. Grow to hundreds of gigs with <b>no on heap footprint</b></li></ul><div>In the past I've enjoyed short videos that teach me something. This is my first try at doing one to benefit others. I've created this short 5 minute 41 second video to get people started on using Ehcache Search... </div></div><div><br /></div><div><a href="http://dl.dropbox.com/u/6713416/Intro%20To%20Ehcache%20Search%20Screencast.pdf">Here's the Slides...</a></div><div><br /></div><embed src="https://terracotta.box.net/embed/mv3va4gbcb42ad7.swf" width="400" height="400" wmode="opaque" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always">Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-43930211909190606672011-01-26T14:19:00.000-08:002011-02-02T09:09:40.544-08:00Ehcache At 2 Billion...<span class="Apple-style-span" style=" ;font-family:Times;font-size:medium;"><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><b><span class="Apple-style-span" style=" ;font-size:medium;">What's Up With Ehcache 2.4</span></b></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><b><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></b></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><a href="http://www.ehcache.org/">Ehcache</a></span><span class="Apple-style-span" style=" ;font-size:medium;"> is the de facto caching standard for Java that </span><a href="http://ehcache.org/customers.html"><span class="Apple-style-span" style=" ;font-size:medium;">everyone uses</span></a><span class="Apple-style-span" style=" ;font-size:medium;"> (500,000+ production deployments; the <a href="http://terracotta.org/resources/whitepapers/ehcache-user-survey-whitepaper">majority of enterprise Java applications</a>). Ehcache 2.4 is coming out soon and includes some capabilities that will make it even easier to use, more powerful, while still maintaining it's light weight.</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style="font-size:medium;">The highlights include:</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "></p><ul><li><span class="Apple-style-span" style=" ;font-size:medium;"><a href="http://ehcache.org/documentation/search.html">Search</a> - Quickly find entries based on the criteria of your choosing. String matching, dates, ranges, sums, averages etc.</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><a href="http://ehcache.org/documentation/jta.html">Fast local transactions</a> - Improved performance of JTA and added a new non-jta transaction api for user level control</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;">Even more capacity and performance</span></li></ul><p></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b>What I've been Testing</b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html"><span class="Apple-style-span" style=" ;font-size:medium;">I've written before</span></a><span class="Apple-style-span" style=" ;font-size:medium;"> about </span><a href="http://terracotta.org/bigmemory"><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory for Enterprise Ehcache </span></a><span class="Apple-style-span" style=" ;font-size:medium;">and how it solves the problem of long, unpredictable GC pauses in Java. The first release of BigMemory was… well, big. In Enterprise Ehcache 2.4, BigMemory has gotten even bigger.</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Using the Enterprise </span><a href="http://dsoguy.blogspot.com/2010/10/couple-minutes-with-ehcache-bigmemory.html"><span class="Apple-style-span" style=" ;font-size:medium;">Ehcache Big Memory Pounder</span></a><span class="Apple-style-span" style=" ;font-size:medium;"> I was able to show that Enterprise Ehcache 2.4 now easily handles:</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "></p><ul><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>Entry Count:</b> > </span><span class="Apple-style-span" style="font-size:medium;"><b>2 billion entries</b></span><span class="Apple-style-span" style=" ;font-size:medium;"> (I reached 2 billion on the hardware I had; with bigger hardware, I could probably have gone much higher).</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>Throughput:</b> 1.3 million operations per second (symmetric read and write; CPU bound)</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>SLA/Predictability: </b>No GC pauses and a predictable 38-42 ops/thread/millisecond throughout the test</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>Data Size:</b> 1-350 GB in-memory cache (again, I was limited by the hardware I had; with more RAM, I could probably have gone much higher)</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>Flexible Efficient Entry Sizes:</b> The cache can now dynamically handle very large (10-100 MB) and very small entries (just a few bytes) together more efficiently with no tuning (This test used small entries in order to fit as many entries as possible into the memory I had. I also ran tests with fewer entries in order to validate wide ranging sizes)</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;"><b>Tuning:</b> All tests were done with <b>NO TUNING</b>. Right out of the box.</span></li></ul><p></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Here's the hardware and software stack I used for my testing:</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"></span></p><blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Cisco UCS C250 Server</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Dual Intel x5670 2.93 Ghz CPU</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">384 GB RAM ( 8 GB x 48)</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Redhat 5.4 Enterprise Edition</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">Sun JDK 1.6_22</span></p></blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">For this test, all of the data was in memory. </span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b>A Bit About Ehcache BigMemory</b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory is 100% pure Java and in process with a Java application. No magic or special JVMs (works on IBM and JRocket as well). The cache data is safely hidden away from Java GC and the pauses that occur with large heaps by instead storing data in a </span><a href="http://ehcache.org/documentation/offheap_store.html"><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory off-heap store</span></a><span class="Apple-style-span" style=" ;font-size:medium;">. </span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b>Embedding</b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory got it's start as a component in the Terracotta Server Array and as a result it is particularly useful for embedding. It's performance characteristics and no tuning approach improves "The Out Of The Box Experience" and saves money on support by removing tuning required by users and problems caused by GC pauses.</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><b>You may be thinking...</b></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">"I don't have 2 billion entries in my caches?"</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">That's ok. Ehcache is a lightweight core library (under 1MB) for caching that's ubiquitous and easy to use. W</span><span class="Apple-style-span" style=" ;font-size:medium;">hen it's needed, Ehcache lets you scale up and out to billions of entries and terabytes of data. It does so at a manageable server density without changing code/architecture and without a bunch of tuning and learning. This protects not only your knowledge investment but your code investment.</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">More about BigMemory for Enterprise Ehcache:</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><a href="http://terracotta.org/bigmemory"><span class="Apple-style-span" style=" ;font-size:medium;">http://terracotta.org/bigmemory</span></a></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><a href="http://terracotta.org/resources/whitepapers/bigmemory-whitepaper"><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory Whitepaper</span></a></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><a href="http://ehcache.org/documentation/offheap_store.html"><span class="Apple-style-span" style=" ;font-size:medium;">BigMemory Documentation</span></a></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;">More about the 2010 Ehcache user survey:</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><br /></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Times; "><span class="Apple-style-span" style=" ;font-size:medium;"><a href="http://terracotta.org/resources/whitepapers/ehcache-user-survey-whitepaper">Ehcache User Survey Whitepaper</a></span></p><div><br /></div></span>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com5tag:blogger.com,1999:blog-34926058.post-22026302644832156992010-12-15T09:05:00.000-08:002010-12-15T09:38:28.744-08:00Ehcache To The Rescue (Comic Strip)<div style="text-align: left;"><span class="Apple-style-span" style="font-size: 15.9722px; "><div style="text-align: left;">Working on a product that has as much adoption as <a href="http://www.ehcache.org">Ehcache</a> is extremely rewarding. Every day millions of people's applications run faster with this tiny little library. It's one of those, "Of course I use it, doesn't everyone " kinds of products and what Greg Luck has accomplished with it is really amazing. One of the challenges we face as we improve and extend it's functionality is getting the story out to those million or so users. Yes, it's still an extremely fast extremely light weight library that pretty much everyone just uses. But it also future proofs your app with snap-in scale-up, scale-out and HA each with just 2 lines of configuration.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">In the coming release we are adding <a href="http://dsoguy.blogspot.com/2010/11/ehcache-24-beta-1-welcomes-txs-search.html">Search, Local Transactions and an even better BigMemory</a> (We've been regularly testing with 2 billion entries in memory with linear, predictable, fast, performance but that's another blog) and we want people to know about this stuff, try it, and give feedback so we can constantly make it better.</div><div><br /></div></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-size: 15.9722px; ">Anyway, after watching an inspiring talk from <a href="http://www.edwardtufte.com/tufte/">Edward Tufte</a> on visual representation I've been experimenting with ideas on how to teach people about Ehcache in quick, fun ways. In the process I wrote my very first comic strip. Check it out...</span></div><div><br /></div><div><a href="http://stripgenerator.com/strip/454991/ehcache-to-the-rescue/">Ehcache To The Rescue Comic Strip...</a></div><div><br /></div><div style="text-align: center;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-size:15.9722px;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_a-8CQ8Pkl3qLIXiuHlQZCPLOvyfJg1RakQXTChdMSqckNe3QH7b0ji3PEIfY2IlKxMcPCX11CuZVmEw8OvwQSD66-zE6uIdup2cbNSniLnBqsp9wHj-qluC_oYToiNPnJPF9oA/s400/ehcache-to-the-rescue-full.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5550963163809732370" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 311px; " /></span></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-size:15.9722px;"><br /></span></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><br /></span></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com2tag:blogger.com,1999:blog-34926058.post-4254828596206597252010-11-29T15:26:00.001-08:002010-12-03T14:32:28.631-08:00Quartz Scheduler 2.0 Beta 1 Welcomes New Fluent API and "Where"<div><a href="http://www.quartz-scheduler.org/">Quartz Scheduler</a>, the most widely used Java scheduler is getting some major improvements for 2.0. I'm going to talk a little about what to expect but you can also read the <a href="http://docs.terracotta.org/confluence/display/release/Fremantle+Beta+Release+Notes">release notes here</a>. </div><div><br /></div><div><b>Goals</b></div><div><br /></div><div>We had two major goals when planning for Quartz 2.0 began. </div><div><ul><li>Simplify/modernize the Quartz API. </li><li>Improve the Quartz experience when leveraging a cluster</li></ul><div><b>Quart 2.0 API</b></div></div><div><b><br /></b></div><div>In order to improve the usability and readability of Quartz 2.0 over passed versions we spent a lot of time evaluating the parts and how a user interacts with them. We found that too much knowledge of those parts needed to be understood at construction time. As a result we moved to a "<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent API</a>/<a href="http://weblogs.java.net/blog/carcassi/archive/2010/02/04/building-fluent-api-internal-dsl-java">DSL</a>" approach. The best way to get a feel for the kind of improvement this gives is to compare the samples from 1.8.4 to the same ones translated in 2.0 Beta 1.</div><div><br /></div><div>In the simple of case of example 1 from the Quartz Kit you can see the basic philosophy change:</div><div><br /></div><div><script src="https://gist.github.com/720867.js?file=gistfile1.java"></script></div><div><br /></div><div>Improvements include:</div><div><br /></div><div><ul><li>The date/time related methods have been moved off of the Trigger and Job classes into a Date building class called "DateBuilder"</li><li>We've removed the need to know details about which Job and Trigger classes you need and instead infer them through the building methods you call. </li><li>The construction now reads more like a sentence. new job withIdentity "job1", "group1". new trigger withIdentity "trigger1", "group1" start at runTime </li></ul></div><div>This is pretty subtle in a simple case like example 1 but gets more obvious as the cases get more complex. Let's look at example 2.</div><div><br /></div><div><script src="https://gist.github.com/720905.js?file=gistfile1.java"></script></div><div><br /></div><div>In this case notice how the constructors are growing with no real indication to what each parameter means.</div><div><br /></div><div>Now lets look at an example where you have to choose a specific Trigger type.</div><div><br /></div><div><script src="https://gist.github.com/720910.js?file=gistfile1.java"></script></div><div><br /></div><div>This example shows how in Quartz 1.8.4 you would have to know to select a different Trigger type but in 2.0 it's just abstracted away in the scheduling.</div><div><br /></div><div>It's worth going through the samples yourself and making any suggestions you may have. Still plenty of time to get your API suggestions in via the <a href="http://forums.terracotta.org/forums/forums/show/17.page">Quartz Forum</a>!</div><div><br /></div><div><b>Quartz "Where" And Other Improvements</b></div><div><br /></div><div>Clustered Quartz has gotten two major improvements in 2.0. Improved performance as node count increases and Quartz "Where"</div><div><br /></div><div>I wrote a <a href="http://dsoguy.blogspot.com/2010/07/quartz-scheduler-heading-for-20-and.html">blog about this a while back</a> but now you can play with it. Alex Snaps has written an <a href="http://www.codespot.net/blog/2010/12/quartz-where/">excellent blog with code samples on the topic</a>. Check it out to really dig in.</div><div><br /></div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-62053754587091404722010-11-29T10:44:00.000-08:002010-12-01T18:08:39.621-08:00Ehcache 2.4 Beta 1 Welcomes Search, Local Transactions and more...<span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="font-size:medium;"><div><a href="http://terracotta.org/beta/">Ehcache 2.4 Beta has been released</a>. We've been spending the last few years working hard to make Ehcache the best possible solution for users with caching needs. 2.4 beta 1 is another big step forward. The beta includes some significant new features and improvements that <a href="http://docs.terracotta.org/confluence/display/release/Fremantle+Beta+Release+Notes">can be read about here</a>. This blog is a few notes on getting started with those features and a few comments on why they are important.</div><div><br /></div><div><b>Ehcache Search</b></div><div><b><br /></b></div><div>This is one of the most requested features for Ehcache. I can't count how many times that I have had a map or cache and just wanted to quickly and easily search for an entry. Sure, one can write an iterator and use Java's matchers but that's </div><div><ul><li>A bit of annoying coding</li><li>Only practical for unclustered caches</li></ul></div><div>Ehcache 2.4 Beta 1 has a new search interface in core Ehcache that works throughout our scale continuum. We used the "<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a>/<a href="http://weblogs.java.net/blog/carcassi/archive/2010/02/04/building-fluent-api-internal-dsl-java">DSL</a>" style that we've been moving towards over the <a href="http://rifers.org/blogs/gbevin/2010/2/17/ehcache_cache_constructors">last couple of years</a> in both Ehcache and <a href="http://quartz-scheduler.org/">Quartz Scheduler</a>. This style of interface makes an API easy to use and read like english. </div><div><br /></div><div>To learn more about it check out this <a href="https://github.com/sharrissf/Ehcache-Search-Sample/downloads">self contained sample app</a> and <a href="http://ehcache.org/documentation/search.html">the documenation</a>. Give us feedback early and often on the <a href="http://forums.terracotta.org/forums/forums/show/16.page">Ehcache Forums</a> as the API is still under development and can still be improved.</div><div><br /></div><div><b>Local Transactions</b></div><div><b><br /></b></div><div>Back in Ehcache 2.0 we added JTA support. This was helpful but we found that for some use-cases people wanted a few things.</div><div><ul><li>Transactions without a JTA transaction manager</li><li>More speed</li></ul></div><div>We improved the speed across the board of our XA compliant JTA stuff and we also added the concept of local transactions. Local transactions provide optimistic concurrency and atomicity across caches. They are like XA transactions but aren't completely tolerant of external resource crashes outside of Ehcache (i.e. cache + databases don't have all the guarantees of XA in the node failure cases. Does provide the guarantees across Ehcaches), don't require a transaction coordinator (though can be used with them) and tend to be less resource intensive (read faster). </div><div><br /></div><div>I've whipped up a <a href="https://github.com/sharrissf/Ehcache-Local-Transaction-Sample/downloads">little self contained sample here.</a></div><div><br /></div><div><b>Improved Enterprise Disk Store</b></div><div><b><br /></b></div><div>In 2.3 we added an Enterprise version of unclustered Ehcache core. The version added support for very large caches through the seamless<a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html"> BigMemory</a> add-on (1 line of config). We also, somewhat more quietly, added the beginnings of a new Enterprise disk store that no longer stored keys in memory and can handle larger restartable caches. </div><div><br /></div><div>2.4 beta 1 takes this to another level. The disk store is now way more efficient, better leverages SSD drives and can efficiently grow to very large sizes without any additional heap usage or fragmenting. One can exercise the improvements using the<a href="http://dsoguy.blogspot.com/2010/10/couple-minutes-with-ehcache-bigmemory.html"> Ehcache Pounder</a>. </div><div><br /></div><div><b>Other Improvements</b></div><div><b><br /></b></div><div>While not everything for the final release was done in time for Beta 1 some significant improvements are in. </div><div><ul><li>NonStopCache now built in. Rather than have to add a jar and configure a wrapper to get the non-stop characteristics in clustered land this is now built into the product core and be turned on via configuration</li><li>Search now works clustered - The new search API is backed by the Terracotta tier. This is still early and we have a lot of performance and HA work to do here. That said, it is testable and usable so give it a try.</li><li>Explicit locking module is now in the core kit</li><li>Rejoin now works in non-stop (You can disconnect from a cluster and reconnect to that cluster without restarting)</li></ul></div><div><br /></div><div>For those interested in scheduling we have also released <a href="http://www.quartz-scheduler.org/">Quartz Scheduler 2.0 beta 1</a>. More stuff will be coming in a month or so when we do beta 2 for all products. </div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div></span></span>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com2tag:blogger.com,1999:blog-34926058.post-90968061436266419572010-11-15T09:46:00.000-08:002010-11-15T16:12:32.615-08:00Direct Buffer Access Is Slow, Really?<div>Lots of claims in the blog sphere around direct memory buffers being slow. <a href="http://ehcache.org/documentation/offheap_store.html">We have been working with them a lot</a> and hadn't seen that slowness but I'm more of a try it and see kinda guy so I did just that.</div><div><br /></div>I cooked up a quick single threaded test to compare offheap direct memory buffers to on heap byte buffers. What I found is that at least on my notebook direct is between 2-5 percent of onheap. Even on my notebook I was writing and reading 2G/second in small chunks to random parts of the byte buffer (Every operation on the test does one write and one read). <div><br /></div><div>The nice thing about them is they occupy no heap so the data stored in them is hidden away from the JVM GC. Of course whether that 2 to 5 percent matters depends on how much data your app is trying to crank through them so as always you need to look at your use-case's, latency, through-put and SLA goals and code accordingly.<br /><div><br /></div><div>While more testing can and should(and has) be done, here is a place for people to start.<div><br /></div><div>Here's the code and my results from my 1.6 ghz notebook. I only spent a few minutes on it so suggestions to improve it are welcome:</div><div><br /></div><div> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: ONHEAP Took: 8978 to write and read: 10737418368</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: DIRECT Took: 9223 to write and read: 10737418368</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: ONHEAP Took: 8827 to write and read: 10737418368</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: DIRECT Took: 9283 to write and read: 10737418368</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: ONHEAP Took: 8813 to write and read: 10737418368</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">Type: DIRECT Took: 9604 to write and read: 10737418368</p><div><br /></div><div><a href="https://gist.github.com/700690">https://gist.github.com/700690</a></div><div><script src="https://gist.github.com/700690.js"> </script></div><p></p><p></p></div></div></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com5tag:blogger.com,1999:blog-34926058.post-72941706198815122562010-11-05T12:30:00.000-07:002010-11-06T00:53:25.991-07:00A Couple Minutes With Ehcache Search...<div><b>Welcome To Ehcache Search</b></div><div><br /></div>Now that we are releasing our, GC Busting, <a href="http://dsoguy.blogspot.com/2010/10/couple-minutes-with-ehcache-bigmemory.html">Ehache BigMemory</a> product we are starting the process of gathering feedback on the new <a href="http://ehcache.org/documentation/search.html">Ehcache Search API</a>. While Ehcache Big Memory solves your <a href="http://dsoguy.blogspot.com/2007/06/latency-v-throughput.html">Latency, through-put and SLA</a> issues, Ehcache Search gives you the ability to handle a users data retrieval needs in a simple and efficient way.<div><br /></div><div><b>What is it?</b></div><div><b><br /></b></div><div>With todays <a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html">data explosion and hardware memory size explosion</a>, in-memory and caching have become an important part of everyone's software. Now, getting at the data in that cache in a flexible, simple and fast way has really become an important area of focus. Things like finding entries that match criteria, performing aggregations and calculations (eg average, sum, max, min) need to be easy and efficient. </div><div><br /></div><div>That's where the new Ehcache Search API comes in. It will provide fast efficient searches and aggregations across the Ehcache Snap in, Speed up, Scale out continuum (Single node performance through scaled out architecture). </div><div><br /></div><div>Please try out the API (It's checked into Ehache core's trunk) by grabbing the this self contained, buildable sample and open source Ehcache nightly jar I've put up on GitHub.</div><div><br /></div><div><a href="https://github.com/sharrissf/Ehcache-Search-Sample/downloads">https://github.com/sharrissf/Ehcache-Search-Sample/downloads</a></div><div><br /></div><div>It's simple to use and 100 percent open source. We are very excited about feedback and plenty of time still exists for making changes and improvements. Please ask lots of questions and give lots of feedback.</div><div><br /></div><div>To try it you can just unpack the kit:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">tar -xzvf ehcache-search-sample-0.0.1-SNAPSHOT-distribution.tar.gz</span></div><div><br /></div><div>and run it:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"> sh run.sh</span></div><div><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" ;font-family:Georgia, serif;"><div>The source code is included in the kit and can be edited in this directory:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">src/main/java/org/sharrissf/sample/</span></div><div><br /></div><div>rebuilt if you have <a href="http://maven.apache.org/">Maven</a>.</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">mvn clean install</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div>And rerun using the run.sh command.</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"><div style="font-family: Georgia, serif; ">You can even package it up yourself by using </div><div style="font-family: Georgia, serif; "><br /></div><div>mvn clean assembly:assembly</div><div style="font-family: Georgia, serif; "><br /></div><div style="font-family: Georgia, serif; ">Looking forward to hearing from the community. It will be interesting to see how projects like Grails, Hibernate, Liferay and Cold Fusion leverage cache search. Those uses will help set direction for years to come.</div><div style="font-family: Georgia, serif; "><br /></div></span></div></span></span></span></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com4tag:blogger.com,1999:blog-34926058.post-79938124637944449632010-10-08T21:10:00.000-07:002010-10-08T21:15:59.688-07:00Strange Talk On Ehcache BigMemoryI'll be giving a talk at Strange Loop On <a href="http://strangeloop2010.com/talks/14480">"The Life And Times Of BigMemory."</a> I'll put a link to the slides and the recording of the talk here when it's done. It's an excellent conference and I'm really looking forward to speaking there.Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-72466629039262987772010-10-06T17:26:00.000-07:002010-11-29T11:33:04.345-08:00A Couple Minutes With Ehcache BigMemory Pounder...<div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>Introduction</b></span></div><div><br /></div><div><b>UPDATE: This product was released (No longer in beta)</b></div><div><br /></div><a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html">Ehcache with BigMemory</a> is now out in <a href="http://www.terracotta.org/bigmemory?src=/index.html">beta</a>. One of the challenges when confronted with a new technology is exercising and understanding it's characteristics. Sure, you can read the <a href="http://ehcache.org/documentation/offheap_store.html">docs</a>, Google for some blogs, integrate it with your application and maybe write some samples, but that's a lot of work. Plus those approaches may not give you a clear picture of the various characteristics of the software. In order to make things a bit easier I've released a configurable pounder application for Standalone Ehcache with BigMemory. <div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>Getting Installed</b></span></div><div><br /></div><div>Here are the steps to get started:</div><div><br /></div><div><ul><li>Get the <a href="http://www.terracotta.org/bigmemory">Ehcache with BigMemory</a> Beta and a license key to use it.</li><li>Get the <a href="http://github.com/sharrissf/Ehcache-Standalone-Pounder/downloads">Standalone Ehcache Pounder distribution</a></li><li>Unpack the Ehcache with BigMemory distribution</li></ul><div><span class="Apple-tab-span" style="white-space:pre"> </span>tar -xzvf ehcache-core-ee-2.3-distribution.tar.gz</div></div><div><ul><li>Copy the Standalone Ehcache Pounder kit into the ehcache kit and unpack it</li></ul><div><span class="Apple-tab-span" style="white-space:pre"> </span>cd ehcache-core-ee-2.3</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cp ../ehcache-pounder-0.0.5-SNAPSHOT-distribution.tar.gz .</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>tar -xzvf ehcache-pounder-0.0.5-SNAPSHOT-distribution.tar.gz</div></div><div><br /></div><div><ul><li>Copy your license file and your ehcache core jar into the pounder kit</li></ul><div><span class="Apple-tab-span" style="white-space:pre"> </span>cd ehcache-pounder-0.0.5-SNAPSHOT</div></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cp ../lib/ehcache-core-ee-2.3.jar .</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>and copy terracotta-license.key to the ehcache-pounder-0.0.5-SNAPSHOT as well.</div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>Running the Pounder</b></span></div><div><br /></div><div>Now you are ready to go. First take a look at the start script in one of the template directories (i.e. templates/1G-BigMemory):</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">sh </span>run-pounder.sh</div><div><br /></div><div>Out of the box it looks like this:</div><div><br /></div><div>java -verbose:gc -Xms200m -Xmx200m -XX:+UseCompressedOops -XX:MaxDirectMemorySize=64G -cp ".:./jyaml-1.3.jar:./ehcache-pounder-0.0.5-SNAPSHOT.jar:./ehcache-core-ee-2.3.jar:slf4j-api-1.5.11.jar:slf4j-jdk14-1.5.11.jar" org.sharrissf.ehcache.tools.EhcachePounder</div><div><br /></div><div>This should work fine for most people. It uses a small heap of 200 meg (you may need to grow this for really big caches). It is fine to have a MaxDirectMemorySize that is larger than your memory size on your machine. Just don't have a maxOffHeap size in your config.yml that is greater than your available physical memory on your machine. Also, make sure you leave room for your OS and the JVM. For example. If you have 8G of physical memory you might do a 400m java heap, a 6G offheap and leave the rest for the OS to use.</div><div><br /></div><div>The script defaults to verbose gc because it's useful to see those stats and compressed oops BECAUSE YOU SHOULD BE USING A 64 BIT JVM and this setting makes it much more efficient (closer to 32 bit object pointers when possible using much less heap).</div><div><br /></div><div>I tend to run this script like this:</div><div><br /></div><div>./run-pounder.sh | tee out.txt</div><div><br /></div><div>That way all output of the test goes to both the screen and to the file out.txt</div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">Configuring the Pounder</span></b></div><div><br /></div><div>You configure the pounder using the config.yml file. You can learn about all the options in the README. Here is the sample config included in the kit:</div><div><br /></div><div><div>storeType: OFFHEAP</div><div>threadCount: 33</div><div>entryCount: 1000000</div><div>offHeapSize: "1G"</div><div>maxOnHeapCount: 5000</div><div>batchCount: 50000</div><div>maxValueSize: 800</div><div>minValueSize: 200</div><div>hotSetPercentage: 99</div><div>rounds: 40</div><div>updatePercentage: 10</div></div><div>diskStorePath: /export1/dev</div><div><br /></div><div>NOTE: The most important setting here is the offHeapSize. If you set this to a number greater than the amount of memory you have on your machine you will not be happy.</div><div><br /></div><div>The offHeapSize + the heap size + the amount of memory your OS needs together must be less than the amount of physical available memory on the machine.</div><div><br /></div><div><br /></div><div><b><span class="Apple-style-span" style="font-size:large;">Output</span></b></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">When running the output will look like the following:</span></div><div><span class="Apple-style-span" style="font-size:medium;"> </span></div><div><span class="Apple-style-span" style="font-size:medium;"> size:492120 time: 7434 Max batch time millis: warmup value size:796 READ: 0 WRITE: 15151 Hotset: 99</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">size = total size of cache</span></div><div><span class="Apple-style-span" style="font-size:medium;">time = total time to execute batch</span></div><div><span class="Apple-style-span" style="font-size:medium;">max batch time = either warm up for the load phase or the longest time it took to execute a batch (note that in a multi-threaded test on a cpu bound machine the batch times are going to be impacted.)</span></div><div><span class="Apple-style-span" style="font-size:medium;">value size = size of the value in this batch</span></div><div><span class="Apple-style-span" style="font-size:medium;">READ = number of reads in the batch</span></div><div><span class="Apple-style-span" style="font-size:medium;">WRITE = number of writes in the batch</span></div><div><span class="Apple-style-span" style="font-size:medium;">hotset = percentage of the time that reads are done from the on heap cache</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">At the end of each round you'll see something like this:</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;"><div>Took: 10899 final size was 995240 TPS: 91751 MAX GET TIME: 20</div><div><br /></div><div>Took = total time the round took</div><div>final size = the total size of the cache at the end (this can be impacted by eviction and be less than what you loaded)</div><div>TPS = total TPS during the run</div><div>MAX GET TIME = The maximum amount of time it took to get an entry</div><div><br /></div><div>An interesting design choice of this pounder is that the threads you define do BOTH reading and writing. So the writers can starve out the readers in a hotset test. I could have gone he other way and then the readers could starve out the writers giving overly generous TPS.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>What's Next</b></span></div><div><span class="Apple-style-span" style="font-size:large;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">The biggest gap right now is that I didn't implement a way to specify a rate. It always goes full throttle. I'll try to add that when I get some time if people think it's useful.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;"><b>Please give me lots of feedback so we can improve both the pounder and Ehcache</b></span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style=" line-height: 17px; font-family:'Trebuchet MS', Verdana, Arial, sans-serif;font-size:12px;">Learn more at:</span></span></div><div><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style=" line-height: 17px; font-family:'Trebuchet MS', Verdana, Arial, sans-serif;font-size:12px;"><a href="http://github.com/sharrissf/Ehcache-Standalone-Pounder">The source for the pounder</a></span></span></div><div><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style=" line-height: 17px; font-family:'Trebuchet MS', Verdana, Arial, sans-serif;font-size:12px;"><a href="http://github.com/sharrissf/Ehcache-Standalone-Pounder">http://terracotta.org/bigm</a><a href="http://terracotta.org/bigmemory" style="color: rgb(187, 51, 0); ">emory</a></span></span></div><div><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style=" line-height: 17px; font-family:'Trebuchet MS', Verdana, Arial, sans-serif;font-size:12px;"><a href="http://dsoguy.blogspot.com/2010/09/little-bit-about-bigmemory-for-ehcache.html">My other blog on BigMemory</a><br /><a href="http://ehcache.org/documentation/offheap_store.html" style="color: rgb(187, 51, 0); ">Check the Ehcache BigMemory docs</a><div><a href="http://www.terracotta.org/confluence/display/release/BigMemory+for+the+Terracotta+Server+Array+-+FAQ" style="color: rgb(187, 51, 0); ">Server Array BigMemory FAQ</a></div></span></span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div></span></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-3587075486849341152010-09-15T00:18:00.000-07:002010-09-16T10:01:27.060-07:00A Little Bit About BigMemory for Ehcache and Terracotta ...<span style="font-size:180%;"><span style="font-weight: bold;">Big Memory?</span></span><br /><br />In talking to our users it is clear that applications are getting more and more data hungry. According to IDC, data requirements are growing at an annual rate of 60 percent. This trend is driven further by cloud computing platforms, company consolidation and huge application platforms like Facebook. There is good news though. Server class machines purchased this year have a minimum of 8 Gig of RAM and likely have 32 Gig. Cisco is now selling mainstream UCS boxes with over 380 Gig of RAM (which I have tried and is amazing). On EC2 you can borrow 68.4 Gig machines for 2 dollars an hour (I have also tried this and it is also pretty amazing). Memory has gotten big and extremely cheap compared to things like developer time and user satisfaction.<br /><br />Unfortunately a problem exists as well. For Java/JVM applications it is becoming an ever increasing challenge to use all that data and memory. At the same time that the data / memory explosion is occurring the amount of heap a Java process can effectively use has stayed largely unchanged. This is due to the ever increasing Garbage Collection pauses that occur as a Java heap gets large. We see this issue at our customers but we also see here at Terracotta tuning our products and the products we use like third party app servers, bug tracking systems CMS's and the like. How many times have you heard "run lots of JVM's" or "don't grow the heap" from your vendor's and/or devs?<br /><br />So we set out to first identify the problem as it exists today, both in the wild and in-house. We then created a solution, first for us (an internal customer) and then for all of the millions of nodes of <a href="http://www.ehcache.org/">Ehcache</a> out there (all of you)<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">3 Big Problems Seen by Java Applications</span></span><br /><br /><span style="font-weight: bold;">My Application is too slow</span><br /><br />My application can't keep up with my users. I've got 10's of gigs of data in my database but it's over loaded and or too slow to service my needs. Either due to the complicated nature of my queriers or the volume of those queries. I want my data closer to the application so of course I start caching. Caching helps, but I want to cache more. My machine has 16 gigs of RAM but if I grow my heap that large, I get too many Java GC pauses.<br /><br /><span style="font-weight: bold;">My Application's latencies aren't predictable</span><br /><br />On average my Java application is plenty fast but I see pauses that are unacceptable to my users. I can't meet my SLA's due to the size of my heap combined with Java GC pauses.<br /><br /><span style="font-weight: bold;">My software/deployment is too complicated</span><br /><br />I've solved the Java GC problem. I run with many JVM's with heap sizes of 1-2 gigs. I partition my data and or loadbalance to get the performance and availability I need but my setup is complicated to manage because I need so many JVM's and I need to make sure the right data is in the right places. I fill up all 64 Gig's of RAM on my machine but it's too hard and fragile.<br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">The other problem</span></span><br /><br />Like many vendors, in the past we told our users to keep the heaps down under 6 gig. This forced our customers to not completely leverage the memory and or cpu on the machines they purchased and or stack JVM's on a machine. The prior is expensive and inefficient and the latter fragile and complex.<br /><br /><br />Here is a quick picture of what people do with their Java Applications today:<br /><br /><span style="font-weight: bold;">Base Case</span> - Small heap JVM on a big machine because GC pauses are a problem<br /><span style="font-weight: bold;">Big heap</span> - That has long GC's that are complicated to manage<br /><span style="font-weight: bold;">Stacked small JVM heaps </span>- This in combination with various sharding, load balancing and clustering techniques is often used. This is complicated to manage and if all the nodes GC at the same time this can lead to availability problems.<br /><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Bo49ka349tXryRFgRUlfSiohzcOAaLaoQ8mHRscxBOzOqSqhHyJqINIphYIS0dtNO-EPGOA7SZCFSS0zFGB4bfT6zWnCHHTA6psu47tYuAMWKU98zXWiLUbP8Hs_LTeCiNAkIA/s1600/JVM+on+todays+hardware.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 286px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Bo49ka349tXryRFgRUlfSiohzcOAaLaoQ8mHRscxBOzOqSqhHyJqINIphYIS0dtNO-EPGOA7SZCFSS0zFGB4bfT6zWnCHHTA6psu47tYuAMWKU98zXWiLUbP8Hs_LTeCiNAkIA/s320/JVM+on+todays+hardware.jpg" alt="" id="BLOGGER_PHOTO_ID_5517164158349071650" border="0" /></a><span style="font-size:130%;"><span style="font-weight: bold;"><br />What kind of solution would help?</span></span><br /><br />Here's what we believe are the requirements for a stand-alone caching solution that attacks the above problems.<br /><br /><ol><li>Hold a large dataset in memory without impacting GC (10s-100s of Gig) - The more data that is cached the less you have to go to your external data source and or disk the faster the app goes</li><li>Be Fast - needs to meet the SLA</li><li>Stay Fast - Don't fragment, don't slowdown as the data is changed over time</li><li>Concurrent - Scales with cpu and threads. No lock contention</li><li>Predictable - can't have pauses if I want to make my SLA</li><li>Needs to be 100 percent Java, work on your JVM on your OS</li><li>Restartable - A big cache like this needs to be restartable because it takes too long to build</li><li>Should just Snap-in and work - not a lot of complexity</li></ol><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">What have we built?</span></span><br /><br />First we built a core piece of technology, <a href="http://www.terracotta.org/bigmemory">BigMemory</a>, an off-heap, direct memory buffer store, with a highly optimized memory manager that meets and or exceeds requirements 1-6 above. This piece of technology is currently being applied in two ways:<br /><br />1) <span style="font-weight: bold;">Terracotta Server Array</span> - We sold it to our built-in customer, the <a href="http://www.terracotta.org/">Terracotta</a> Server Team, who can now create individual nodes of our L2 caches that can hold a hundred million entries, leverage 10's of gigs of memory, pause free and with linear TPS. This leverages entire machines (even big ones) with a single JVM for higher availability, a simpler deployment model, 8x improved density and rock steady latencies.<br /><br />2) <span style="font-weight: bold;">Ehcache</span> - We've added BigMemory and a new disk store to Enterprise Ehcache to create a new tiered store adding in requirements 7-8 from above (snap-in simplicity and restart-ability). The Ehcache world at large can benefit from this store just as much as the Terracotta products do.<br /><br />Check out the diagram below.<br /><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUQBhol5AoYrLjq32YXANc2x8IaR-hpES0dl27jETg0lQNn7PbPy40YUTEzGVtWck-6HRgAHOaW2OSEHAcLaE81RptWyV-HmhG9CqXVz3cCvkNqP9UtoGZ2oxcGrMLB3THujbCPA/s1600/tiered_storage.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 158px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUQBhol5AoYrLjq32YXANc2x8IaR-hpES0dl27jETg0lQNn7PbPy40YUTEzGVtWck-6HRgAHOaW2OSEHAcLaE81RptWyV-HmhG9CqXVz3cCvkNqP9UtoGZ2oxcGrMLB3THujbCPA/s320/tiered_storage.png" alt="" id="BLOGGER_PHOTO_ID_5517165188483081042" border="0" /></a><br /><br />Typically, using either of the BigMemory backed products, you shrink your heap and grow your cache. By doing so SLA's are easier to meet because GC pauses pretty much go away and you are able to keep a huge chunk of data in memory.<br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Summing up</span></span><br /><br />Memory is cheap and growing. Data is important and growing just as fast. Java's GC pauses are preventing applications from keeping up with your hardware. So do what every other layer of your software and hardware stack does: cache. But in Java, the large heaps needed to hold your cache can hurt performance due to GC pauses. So use a tiered cache with BigMemory that leverages your whole machine and keeps your data as close to where it is needed as possible. That's what Terracotta is doing for it's products. Do so simply, i.e. snap it in to Ehcache and have large caches without the pauses caused by GC. As a result create a simpler architecture with improved performance/density and better SLA's.<br /><br /><br />Learn more at <a href="http://terracotta.org/bigmemory">http://terracotta.org/bigmemory</a><br /><a href="http://ehcache.org/documentation/offheap_store.html">Check the Ehcache BigMemory docs</a> <div><a href="http://www.terracotta.org/confluence/display/release/BigMemory+for+the+Terracotta+Server+Array+-+FAQ">Server Array BigMemory FAQ </a></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com8tag:blogger.com,1999:blog-34926058.post-63239964406630785442010-07-28T07:29:00.000-07:002010-11-10T11:27:35.373-08:00Application Scale and Quartz "Where"I don't think it is to controversial to say that <a href="http://quartz-scheduler.org/">Quartz Scheduler</a> is by far the dominant Open-Source Java job scheduler. It provides fast, flexible, and extremely reliable job execution and it is embedded in just about everything out there. In the last 6 months or so we have added a new <a href="http://terracotta.org/quartz/">Terracotta</a> backed version of Quartz, lots of bug fixes and a GUI for monitoring quartz when clustered with Terracotta. We have a lot more coming. The team is hard at work on what's next. My favorite feature on the Quartz 2.0 list, the one they are working on right now, is Job Location Control or what is code named "Where".<div><div><br /></div><div>Some of the trends we are seeing in our user base include the leveraging of EC2, larger apps/user bases, demanding HA requirements and hardware farms. As a result, scaled-out architectures are becoming common place in many IT environments. Scheduling work in these large multi-node environments is becoming a part of many software developers lives. Currently, Quartz supports scale-out but with little control over how the work is distributed. While this is a good start one quickly runs into problems like assigning jobs to machines that have the processing power to the work on them at the time the job is fired. Or execute the job where the data is local. Or just perform certain jobs on certain classes of machines do to their location or by purpose.</div><div><br /></div><div>Well that is "where" we are headed. In the next few months the Quartz guys working with the Terracotta Guys and the <a href="http://www.ehcache.org/">Ehcache</a> guys are developing a solution to the above set of problems. We'll be giving the same flexible and reliable scaled out scheduler but adding a new level of control. We are adding the "Where"</div></div><div><br /></div><div>Stay tuned...</div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com2tag:blogger.com,1999:blog-34926058.post-87207747047809358502010-07-22T08:40:00.000-07:002010-07-22T08:47:55.924-07:00Hiring at Terracotta - Performance/Testing Engineer and or Lead<span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 12px; line-height: 17px; "><div>Working at Terracotta is just about the best job someone could want (my humble opinion). Fast paced, super smart people, lots of interesting problems and widely adopted products wrapped up in a nice little package known as a fast growing startup. So send your resume now!</div></span><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 12px; line-height: 17px; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 12px; line-height: 17px; ">These positions can be either in San Francisco or Noida India.</span></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 12px; line-height: 17px; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 12px; line-height: 17px; "><div><div>About Terracotta:</div><div>Terracotta is the a fast growing company behind the most widely used software for application scalability, availability and performance. Our software is deployed in more than 250,000 enterprise installations, including the majority of the Fortune 2000.</div><div><br /></div><div>Snap-in Scale and Performance</div><div>Terracotta's software products provide snap-in performance and scale for enterprise applications. With a simple change in two lines of configuration, Terracotta customers can run enterprise applications 10x faster and scale them―from one node, to 1000s, even to the cloud―without re-writing code or compromising performance or reliability.</div><div><br /></div><div>A Leader in Distributed Caching</div><div>In “The Forrester Wave™: Elastic Caching Platforms, Q2 2010,” Forrester named Terracotta a Leader in this emerging market and ranked us strongest in strategy among eight elastic caching platforms.</div><div><br /></div><div>http://www.terracotta.org</div><div><br /></div><div>Where we are:</div><div>Our main headquarters are in San Francisco, CA in the SOMA area. We have an office in Noida, India and we have super star developers all over the world.</div><div><br /></div><div>Description for LEAD QA Engineer</div><div><br /></div><div>At Terracotta quality and stability in our product are our primary</div><div>objectives. Join our highly motivated, fast paced, agile, quality driven development team</div><div>where you will have many great opportunities to make an impact on</div><div>product capabilities and success in your role as QA Lead.</div><div><br /></div><div>As a valued member of our tech lead team you will:</div><div>* Develop, maintain, and enhance both unit testing and performance</div><div>testing frameworks</div><div>* Design test strategies, develop test tools and implement test cases to</div><div>ensure highest quality deliverables for maintenace and new feature releases</div><div>* Improve the overall productivity of all of your co-workers by</div><div>identifying tools and processes to increase overall efficiency</div><div>* Create and maintain functional, performance, stress and endurance tests</div><div>* Diagnose and debug issues in a production environment</div><div>* Work closely with Engineering to understand the Product Architecture</div><div>and work on identifying, designing or enhancing existing test frameworks</div><div>to support backend test development</div><div>* Mentor and manage QA Engineers in a distributed team</div><div><br /></div><div>Qualifications</div><div><br /></div><div>* Proven track record as a lead in development and/or QA</div><div>* Motivated to improve existing processes, test strategies</div><div>* Strong knowledge of Java or other related programming languages</div><div>* Strong Knowledge in at least one scripting language such as Perl or Ruby</div><div>* Experience in creating back end test frameworks</div><div>* Ability to work independently to triage issues and prioritize tasks</div><div>* Strong understanding of QA Process</div><div>* Strong communication skills (verbal and written)</div><div>* Experience with code coverage and test tool development</div><div>* Experience with UNIX</div><div>* Experience with distributed caches, high availability products, and/or NoSQL solutions</div><div>* Experience with common java frameworks and containers such as Spring, Jetty, Hibernate, Ehcache, Quartz</div><div>* Ability to focus on multiple projects while in differing SDLC phases</div><div><br /></div><div>If that's you and you meet most of the below criteria send us your resume careers@terracottatech.com.</div></div><div><br /></div></span></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-70640658280251566032010-07-20T18:48:00.000-07:002010-07-21T00:20:35.067-07:00Hiring at Terracotta...<div>Working at Terracotta is just about the best job someone could want (my humble opinion). Fast paced, super smart people, lots of interesting problems and widely adopted products wrapped up in a nice little package known as a fast growing startup. So send your resume now!</div><div><br /></div><div><b>About Terracotta:</b></div><div><br /></div><div>Terracotta is the a fast growing company behind the most widely used software for application scalability, availability and performance. Our software is deployed in more than 250,000 enterprise installations, including the majority of the Fortune 2000.</div><div><br /></div><div><b>Snap-in Scale and Performance</b></div><div><b><br /></b></div><div>Terracotta's software products provide snap-in performance and scale for enterprise applications. With a simple change in two lines of configuration, Terracotta customers can run enterprise applications 10x faster and scale them―from one node, to 1000s, even to the cloud―without re-writing code or compromising performance or reliability.</div><div><br /></div><div><b>A Leader in Distributed Caching</b></div><div>In “The Forrester Wave™: Elastic Caching Platforms, Q2 2010,” Forrester named Terracotta a Leader in this emerging market and ranked us strongest in strategy among eight elastic caching platforms.</div><div><br /></div><div><a href="http://www.terracotta.org/">http://www.terracotta.org</a></div><div><br /></div><div><b>Where we are:</b></div><div>Our main headquarters are in San Francisco, CA in the SOMA area. We have super star developers all over the world.</div><div><br /></div><div><b>Who we are looking for:</b></div><div><br /></div><div>Have you written or worked on a distributed system, messaging system or NoSQL solution? Do you love cool, hard problems? Are you good at design API's that work well in todays Java Applications? Can you work both in a group and on your own?</div><div><br /></div><div><b>Qualifications:</b></div><div><b><br /></b></div><div><ul><li>Works hard and solves hard problems</li><li>Strong OO/Framework design sense</li><li>Understand the Java Landscape in a deep way (i.e. Spring, J2EE, <a href="http://www.ehcache.org/">Ehcache</a>, <a href="http://www.quartz-scheduler.org/">Quartz</a>, Rest, SOAP, NoSQL)</li><li>Excited about performance, caching and scale-out</li><li>Love to code and write tests</li><li>Works well in a team and individually</li><li>Believes that the only way to know if something works is to test it in a repeatable way</li></ul></div><div><br /></div><div><b>Nice to have:</b></div><div><b><br /></b></div><div><ul><li>Experience with open-source</li><li>Live in/near San Francisco</li><li>Tech Lead experience</li></ul></div><div><br /></div><div><b>Responsibilities:</b></div><div><br /></div><div><ul><li>Design and build the next generation of scale-out, performance and HA software.</li><li>Contribute to and extend Terracotta, Ehcache and/or Quartz Scheduler, some of the most popular and widely used frameworks in Java</li></ul></div><div>If that's you and you meet most of the below criteria send us your resume careers@terracottatech.com.</div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-36707949084204250512010-06-24T14:42:00.000-07:002010-07-20T19:18:18.979-07:00A Couple Minutes With Some Toolkit Samples<div>Last night we released Beta 2 of the Terracotta 3.3 release. It has a number of improvements and updates to the <a href="http://dsoguy.blogspot.com/2010/04/countdown-to-terracotta-toolkit-beta.html">Terracotta Toolkit </a> including improved naming and factoring and additional clustered classes like AtomicLong and List. You can grab that or to get the absolute latest you can grab a nightly (my preference because the beta doesn't work with maven)</div><div><br /></div>I pushed a couple of toolkit samples to <a href="http://GitHub.com/">GitHub</a> (which by the way is awesome!). I didn't do hardly any cleanup or comments so just post questions to the blog if you need help.<div><br /></div><div><a href="http://github.com/sharrissf/Terracotta-Tools-and-Samples/">http://github.com/sharrissf/Terracotta-Tools-and-Samples/</a></div><div><br /></div><div>If your a Git user already I don't need to tell you how to check it out. If your not just hit "download source" on the upper right of the web page and don't worry about Git.</div><div><br /></div><div>Four examples are included:</div><div><br /></div><div><b>PlayingWithMapOfLocksExpress</b> - A quick sample that show's how to create a clustered Map of Locks.</div><div><br /></div><div><b>PlayingWithToolkitBarrier</b> - Example of using a Cyclic barrier to coordinate between processes</div><div><br /></div><div><b>PlayingWithToolkitClusterInfo</b> - Example showing how to register a listener for cluster events.</div><div><br /></div><div><b>PlayingWithToolkitQueue</b> - Little sample on using a queue between two nodes </div><div><br /></div><div><b>PlayingWithToolkitClusterCounter</b> - Basic sample that show's using a clustered atomic long</div><div><br /></div><div>You can run these from the command line by:</div><div><br /></div><div><ol><li>Downloading and unpacking the <a href="http://www.terracotta.org/dl/?src=/index.html">nightly build</a> or <a href="http://www.terracotta.org/beta/esperance-beta?src=2010-06-08-esperance-beta-badge">beta</a> from Terracotta</li><li>Staring the Terracotta server by calling the ./bin/start-tc-server.sh</li><li>Running 2 instances of the compiled versions of any of the above</li></ol><div><span class="Apple-tab-span" style="white-space:pre"> </span>java -cp target:INSTALL_DIR/common/terracotta-toolkit-1.0-runtime-ee-1.0.0-SNAPSHOT.jar PlayingWithToolkitClusterInfo</div></div><div><br /></div><div>You can also run them using the <a href="http://www.terracotta.org/confluence/display/wiki/Terracotta+Maven+Plugin#TerracottaMavenPlugin-Configuration">Terracotta Maven Plugin</a>:</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>mvn tc:run</div><div><br /></div><div>To switch between the samples edit the pom.xml</div><div><br /></div><div><br /></div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-1520644128226135722010-06-09T12:49:00.000-07:002010-06-18T13:42:19.547-07:00A Couple Minutes With The Terracotta 3.3 BetaWith <a href="http://www.terracotta.org/beta/esperance-beta?src=2010-06-08-esperance-beta-badge">Terracotta platform version 3.3</a> our goal of creating an accessible application performance and scale-out solution is taking another big step forward. It's important to us that developers can find success using the ubiquitous <a href="http://ehcache.org/">Ehcache</a> for performance, <a href="http://www.terracotta.org/ehcache/distributed-cache/ehcache-ex-hibernate?src=/index.html">Hibernate</a> for an ORM,<a href="http://www.terracotta.org/web-sessions/?was-expanded=ehcache-submenu"> Http Web Sessions</a> for user state and <a href="http://www.terracotta.org/quartz/">Quartz</a> for scheduling in a single node application. Then, <a href="http://dsoguy.blogspot.com/2010/04/clustered.html">without much thought or effort</a>, add a couple lines of config to achieve scale-out and HA serving needs all the way through enterprise apps and into the cloud. <div><br /></div><div>We have focused on a couple of high level areas in this release to take our solution to the next level. </div><div><ul><li><b>Simple Scale</b> - Reduce the need for tuning and tweaking with an improved next gen datastore. It will allow the everyday user to achieve the kinds of scale needed for massive applications both in data size and number of nodes.</li></ul><div><br /></div><ul><li><b>Improved Visibility</b> - We have added panels for Quartz and Sessions to our developer console giving full visibility to the full suite of performance and scale-out products. We have also added a more product focused organization of information in the tool.</li></ul><div><br /></div><ul><li><b>Simple HA</b> - A new panel that makes it easier to monitor interesting events that occur in a cluster. Pre-built templates for various configurations. Simplified way of migrating nodes, better defaults.</li></ul><div><br /></div><ul><li><a href="http://dsoguy.blogspot.com/2010/05/couple-minutes-with-terracotta-toolkit.html"><b>Modularity</b></a> - We have exposed some of our most powerful pieces and parts as a versioned standard API that can be simply coded against to get things like, locking, queuing, maps and cluster topology. We use this API to build all four of our core products (Ehcache, Quartz, Hibernate 2nd level cache, Web Sessions).</li></ul></div><div>While not everything made into the beta, enough is there to get a taste of where we are going. I encourage people to download it and try it as soon as possible. GA is just around the corner. Learn more on the<a href="http://www.terracotta.org/confluence/display/docs/3.3.0+Beta+Release+Notes"> release notes page.</a></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com0tag:blogger.com,1999:blog-34926058.post-24749508035018832202010-05-18T13:12:00.000-07:002010-05-18T13:57:35.003-07:00Steve Jobs Stanford CommencementWas reading a couple stories on the web this morning and I ran into two somewhat interesting lists over at Time <span class="blsp-spelling-error" id="SPELLING_ERROR_0">Magazine</span>. I kinda mocked the first one upon reading the title "<a href="http://www.time.com/time/specials/packages/article/0,28804,1988080_1988093_1988082,00.html">Top 10 College Dropouts</a>." I laughed and said to my <span class="blsp-spelling-corrected" id="SPELLING_ERROR_1">Coworker</span> and friend Orion, "Must be a slow news day!" Followed by spending the next 10 or 15 minutes <span class="blsp-spelling-corrected" id="SPELLING_ERROR_2">dissecting</span> the article. How many were either from or lived in California? how many dropped out of Harvard? Who the heck is Buckminster Fuller? "About 10 minutes in Orion rightly pointed out, "Article can't be too bad since you've spent the last 10 minutes talking about it." Of course he was right.<div><br /></div><div>Followed that up by clicking a link taking me to the next list called "<a href="http://www.time.com/time/specials/packages/article/0,28804,1898670_1898671_1898643,00.html">Top 10 Commencement Speeches</a>." I know what your thinking now, "How much free time does this guy have?" I was enjoying a little candy after a hard working morning ;-). Anyway, I digress. I noticed that one of the names was on both lists. You guessed it, Steve Jobs, someone that anyone who has ever built anything of any kind should at least respect. </div><div><br /></div><div>I set about to watch the commencement speech he gave in 2005. He basically tells 3 stories from his life experience. Much like <a href="http://video.google.com/videoplay?docid=-5700431505846055184#">Randy Pausch's last lecture</a> their is a lot to be learned here. The first two stories are awesome and inspirational and many of us can relate to and learn from them. The third is also good/inspirational but a bit dark and kind of scary and depressing.</div><div><br /></div><div>Anyway, since in this speech Steve talks so much about time, I will lead in with the opinion that listening to this commencement is time well spent. <a href="http://www.time.com/time/specials/packages/article/0,28804,1898670_1898671_1898644,00.html">Check it out</a>!</div><div><br /></div><div><br /></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com1tag:blogger.com,1999:blog-34926058.post-46877608446420270142010-05-07T13:57:00.001-07:002010-05-30T18:17:03.320-07:00A Couple Minutes With Non-Stop Ehcache<span><span><div>Sometimes you just want to have an SLA (Service Level Agreement) when dealing with a component like a cache. You want to know that no matter what goes wrong, disk failures, deadlocks, network down, database locked up (for write-through) your threads won't be blocked for longer than your SLA. In the security world this is analogous to <a href="http://en.wikipedia.org/wiki/Layered_security">Layered Security </a>where one is protected at multiple layers from breaches. In this case you are protected at multiple layers from hangs.</div><div>
<br /></div><div><b><span class="Apple-style-span" style="font-size:large;">Non-Stop Ehcache</span></b></div><div>
<br /></div><div>In comes <a href="http://www.ehcache.org/documentation/non_stop_cache.html">NonStopCache</a>. This is a decorator for <a href="http://ehcache.org/">Ehcache</a> that allows one to specify an SLA. When using this decorator no operation is allowed to take longer than the SLA provided. All operations are isolated from the cache via a thread pool providing complete protection. The NonStopCache has multiple ways of configuring it. One can setup whether to serve stale data, perform noops or throw exceptions when SLA's are being violated covering most of the cases one needs.</div></span></span><div>
<br /></div><div><b><span class="Apple-style-span" style="font-size:large;">Getting Started</span></b></div><div>
<br /></div><div>Here's what I did to get started using clustered Ehcache and NonStopCache:</div><div>
<br /></div><div><ul><li>Download <a href="http://sourceforge.net/projects/ehcache/">Ehcache 2.1</a></li><li>Download the <a href="http://sourceforge.net/projects/ehcache/">NonStopCache 1.0</a></li><li>Start the Terracotta server</li></ul><div><span class="Apple-tab-span" style="white-space:pre"> ehcache-2.1.0-beta/terracotta/bin</span>/start-tc-server.sh</div><ul><li>run the below program (source code below)</li></ul><div><span class="Apple-tab-span" style="white-space:pre"> </span>java -cp .:ehcache-core-2.1.0-beta.jar:slf4j-api-1.5.8.jar:slf4j-jdk14-1.5.8.jar:ehcache-terracotta-2.1.0-beta.jar:ehcache-nonstopcache-1.0.0-beta.jar MyFirstNonStopEhcacheSample</div><div>
<br /></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><b>NOTE: </b>Kill the Terracotta server when the printed output instructs you too.</div><div>
<br /></div><div>Let's review the output:</div><div></div><blockquote><div>
<br /></div><div>Regular cache. No Decorator
<br />The size of the cache is: 0
<br />After put the size is: 1
<br />Here are the keys:
<br /> Key:0
<br />Done with cache.
<br />
<br />Sleeping, Stop your server
<br />Disconnected NonStop with noop cache.
<br />The size of the cache is: 0
<br />After put the size is: 0
<br />Here are the keys:
<br />Done with cache.
<br />
<br />Disconnected NonStop with local reads cache.
<br />The size of the cache is: 1
<br />After put the size is: 1
<br />Here are the keys:
<br /> Key:0
<br />Done with cache.
<br />
<br />Disconnected NonStop with exception cache.
<br />Exception in thread "main" net.sf.ehcache.constructs.nonstop.NonStopCacheException: getKeys timed out
<br /> at net.sf.ehcache.constructs.nonstop.behavior.ExceptionOnTimeoutBehavior.getKeys(ExceptionOnTimeoutBehavior.java:114)
<br /> at net.sf.ehcache.constructs.nonstop.behavior.ClusterOfflineBehavior.getKeys(ClusterOfflineBehavior.java:120)
<br /> at net.sf.ehcache.constructs.nonstop.NonStopCache.getKeys(NonStopCache.java:264)
<br /> at MyFirstNonStopEhcacheSample.addToCacheAndPrint(MyFirstNonStopEhcacheSample.java:45)
<br /> at MyFirstNonStopEhcacheSample.<init>(MyFirstNonStopEhcacheSample.java:40)
<br /> at MyFirstNonStopEhcacheSample.main(MyFirstNonStopEhcacheSample.java:60) </init></div></blockquote><div><init>
<br /><b><span class="Apple-style-span" style="font-size:large;">What Just Happened?</span></b>
<br />
<br />The cache is first loaded into an ordinary undecorated cache. This is performed before the server kill and proceeds without incident. The next round of operations on the cache were performed with the server down. <div>
<br /></div><div>Since that cache is configured as noop all operations are ignored and the size of the cache appears as zero. This is great for when you just want to not bother with the caching if it isn't available.<div>
<br /></div><div>Next round is local reads. This allows you to use the values that are available locally while the cache is unavailable. This is especially nice for read only or mostly read only caches that fit in memory and are always available.</div><div>
<br /></div><div>After that we go to the exception version. If you have a cache of important coherent data but you don't want threads blocked this setting is for you. It will blow cache operations out of the thread so your container can just keep going by either showing an error page or getting the data from elsewhere. </div><div>
<br /></div><div>Some interesting points here:</div><div><ul><li>These decorators are all being used on the same cache. This way you can make the behavior specific to the user of the cache. It gives tremendous flexibility.</li><li>You'll notice this little sample flies through despite the timeout being set to 13 seconds. This is because it's in fail fast mode. In this configurable mode if the cache knows it can't communicate it will return the failure case immediately. If that's not what you want you can instead set it up to not fail fast and wait the full timeout no matter what.</li><li>I did this work in config but the same setup can be done in code</li></ul></div><div><div><b><span class="Apple-style-span" style="font-size:large;">The Code</span></b></div><div>
<br /></div><div>MyFirstNonStopEhcacheSample.java
<br /><script type="syntaxhighlighter" class="brush: java"><![CDATA[
<br />import net.sf.ehcache.CacheManager;
<br />import net.sf.ehcache.Ehcache;
<br />import net.sf.ehcache.Element;
<br />
<br />public class MyFirstNonStopEhcacheSample {
<br /> CacheManager cacheManager = new CacheManager("src/ehcachenonstop.xml");
<br />
<br /> public MyFirstNonStopEhcacheSample() {
<br />
<br /> // Get the same cache 4 times:
<br /> // First undecorated,
<br /> // Second decorated for noop
<br /> // Third decorated for localReads
<br /> // Fourth decorated for exception on timeout
<br />
<br /> Ehcache regularCache = cacheManager.getEhcache("testCache");
<br /> Ehcache noopCache = cacheManager.getEhcache("nonstopNoop");
<br /> Ehcache localReadsCache = cacheManager.getEhcache("nonstopLocalReads");
<br /> Ehcache exceptionCache = cacheManager.getEhcache("nonstopException");
<br />
<br /> // Undecorated, will succeed and adding an entry to the cache
<br /> System.out.println("");
<br /> System.out.println("Regular cache. No Decorator");
<br /> addToCacheAndPrint(regularCache);
<br /> try {
<br /> System.out.println("Sleeping, Stop your server");
<br /> Thread.sleep(10000);
<br /> } catch (InterruptedException e) {
<br /> e.printStackTrace();
<br /> }
<br />
<br /> System.out.println("Disconnected NonStop with noop cache.");
<br /> addToCacheAndPrint(noopCache);
<br />
<br /> System.out.println("Disconnected NonStop with local reads cache.");
<br /> addToCacheAndPrint(localReadsCache);
<br />
<br /> System.out.println("Disconnected NonStop with exception cache.");
<br /> addToCacheAndPrint(exceptionCache);
<br /> }
<br />
<br /> private void addToCacheAndPrint(Ehcache cache) {
<br />
<br /> int cacheSize = cache.getKeys().size();
<br /> System.out.println("The size of the cache is: "
<br /> + cache.getKeys().size());
<br />
<br /> cache.put(new Element("" + cacheSize, cacheSize));
<br /> System.out.println("After put the size is: " + cache.getKeys().size());
<br /> System.out.println("Here are the keys:");
<br /> for (Object key : cache.getKeys()) {
<br /> System.out.println(" Key:" + key);
<br /> }
<br /> System.out.println("Done with cache.");
<br /> System.out.println("");
<br /> }
<br />
<br /> public static void main(String[] args) throws Exception {
<br /> new MyFirstNonStopEhcacheSample();
<br /> }
<br />}
<br /> ]]></script>
<br />
<br />
<br />And the Config file ehcachenonstop.xml:
<br />
<br /><script type="syntaxhighlighter" class="brush: xml"><![CDATA[ <?xml version="1.0" encoding="UTF-8"?><br /><br /><ehcache xsi="http://www.w3.org/2001/XMLSchema-instance" nonamespaceschemalocation="ehcache.xsd"><br /><br /> <terracottaConfig url="localhost:9510"><br /><br /> <defaultCache/><br /><br /> <cache name="testCache" eternal="true"><br /> <terracotta clustered="true"><br /> <cacheDecoratorFactory class="net.sf.ehcache.constructs.nonstop.NonStopCacheDecoratorFactory" properties="name=nonstopNoop, timeoutMillis=13000, timeoutBehavior=noop"><br /> <cacheDecoratorFactory class="net.sf.ehcache.constructs.nonstop.NonStopCacheDecoratorFactory" properties="name=nonstopException, timeoutMillis=13000, timeoutBehavior=exception"><br /> <cacheDecoratorFactory class="net.sf.ehcache.constructs.nonstop.NonStopCacheDecoratorFactory" properties="name=nonstopLocalReads, timeoutMillis=13000, timeoutBehavior=localReads"><br /> </cache><br /><br /></ehcache><br /><br />]]></script><div>
<br /></div><div>
<br /></div></div></div></div></init></div></div>Steve Harrishttp://www.blogger.com/profile/17342689039838434111noreply@blogger.com6