Queues, Pools and Caches – Hotsos 2012 Presentation and FAQ

Mar 9, 2012 / By Gwen Shapira

Tags: , ,

Thanks to everyone who attended my presentation “Queues, Pools and Caches” at Hotsos 2012. I had a blast and I hope you did too.

I posted the slides and paper on SlideShare for your enjoyment. The paper is by far more complete and contains a lot of material I had to leave out of the slides.

I think the presentation was a bit long to comfortably fit in an hour. In the next iteration I will drop the section about queues and expand more about Connection Pools and Memcached. The audience definitely showed the most interest in those topics.

There were many questions asked after the presentation, so I thought I’ll post a short FAQ to address those:

  1. During RAC node failure, how do we make sure the connections in the pool reconnect to the right location?
    Hopefully, the data source your application uses supports FAN and can be configured to handle notifications from the RAC cluster regarding node availability. Otherwise, you’ll want to use TAF – configure failover in tnsnames.ora or in JDBC url, and make sure your application can handle exceptions that occur as a result of a disconnected session. The following papers dive deeply into the available solutions and how to implement those:
    http://www.oracle.com/technetwork/database/clustering/overview/awm11gr2-130711.pdf
    http://www.oracle.com/technetwork/database/features/availability/maa-wp-11gr2-client-failover-173305.pdf
  2. How much Memcached cost? Does anyone actually use it?
    It is an open-source product, and can be downloaded and installed for free from http://memcached.org. In the same website you can also find out that numerous companies use Memcached for their scalability, including: Wikipedia, Twitter, Youtube and Craigslist.
  3. How does Memcached compare to TimesTen or Coherence?
    I do not have experience with TimesTen and Coherence, so I can’t compare them. In general, Coherence should be similar to Memcached as it is also a distributed, in-memory key-value store. TimesTen is not distributed, so it will not scale as well as Memcached and Coherence and it uses a full relational model instead of simple key-value model, so developing for TimesTen is completely different and may or may not be what you need in a specific situation.
  4. Why can’t I just cache data as part of my Java application?
    You certainly can. The downside is that you probably can’t write a distributed data store, those can be complicated. So each server can only use its own memory for caching, and depending on how you write it, the same value can be cached on many servers, resulting in waste of memory space. Why go to all the trouble of reinventing the wheel if you end up with inferior result? Just use Memcached.

Those are all the questions I remember answering. Have more questions? Let me know.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>