Portal Home > Knowledgebase > Articles Database > Memcached or Oracle Coherence


Memcached or Oracle Coherence




Posted by djorgensen, 05-24-2008, 05:36 PM
I understand there is a price difference, that aside I wonder if anyone has any experience using both? I.e. What if anything would make someone switch to Coherence over Memcached? And does anyone have any thoughts on a different alternative specially for .NET

Posted by apollo, 05-25-2008, 03:18 AM
I would use memcached due to it's simplicity and available APIs to most scripting languages. I am not saying Coherence is not good, I just feel better with open-source based software.

Posted by lockbull, 05-25-2008, 04:44 PM
I've had experience with both, but honestly I've never been in a situation where one was considered as a substitute for the other, due to technology choices, philosophical choices (proprietary vs. open source), etc. Coherence is very popular in the financial industry (which is where I was exposed to it), where it is typically used with Java, Oracle, etc. There is a .Net version of Coherence but I personally don't have any experience with that. Memcached is usually used by a different sort of organization (large Internet startups vs. Fortune 500/Global 2000) typically using PHP, MySQL, etc. I've worked in both worlds, and as I said I've never seen consideration of using the other. I think a large part of it is the nature of the data being handled. Coherence bills itself as a "data grid" as opposed to simply a distributed cache, and has a lot more functionality than memcached. It offers multiple caching topologies--local, replicated, partitioned, near, etc.--which can dramatically affect performance and scalability, distributed locks, write back caching, etc. All of this is very useful (and oftentimes necessary) for important transactional data that a financial institution deals with, but maybe less so when dealing with a massive social networking site where budgetary or time constraints are tight (Coherence is definitely not cheap and considerably more difficult to implement). Is there anything specific in memcached that isn't working for you, or a feature in Coherence that you find desirable?

Posted by djorgensen, 05-26-2008, 02:21 PM
Well one of our biggest issues was session state, at the moment we use the ASP.NET session service which is our only single point of failure. We also use the ASP.NET cache object but becuase of our web cluster we end up with data on different boxes which doesnt match i.e. slghtly out of sync so if we stick a large dataset of search results into such an object it may not have the same results on the second page. And of course we end up using large amounts of ram on each web process on each web server. Sometimes using about 2GB per process. Which all seems like overlap. I've been trying out memcached using the enyim.com Memcached Client, which has worked quite well. However I've found a few issues, under heavyish load it decides to drop connection to the memcache server and thus hits the DB instead. Using "Memcached Providers" also a codeplex project I replace the session provider. However that turned out to need rebuilding to get it to work with the latest enyim.com client, and then I discovered just how flawed a client it was. So after a bit of reworking I got the session working ok, closing connections correcty (it was using huge amounts of ram) only the find the enyim.com client then liked to drop connections to the memcache server. I've tried around on a few different boxes and configs and got back the same kind of error. Now the question is can I be bothered to fix the enyim.com client and divert resources away from other things which need doing or go for a commercial solution. NCache also seems like a solution, im waiting for their sales rep to get back to me to talk about pricing as it talks about on a CPU basis and doesnt make clear if that per web server or NCache server. Basically I dont want to make the wrong choice and waste time trying to get something to work which isnt going to work. The kind of stuff its caching is for social networking, so its not critical that its always accurate, it just needs to be quick and reduce the DB load which is high enouch as it is.

Posted by djorgensen, 05-30-2008, 11:08 AM
I thought I'd update this. Memcached I had problem after problem in production (didnt take long) with it opening up stupid numbers of connections and then getting Windows 2008 to lock down the NIC. I've been trying indexUs which is designed and built in .NET and I have to say it works like a charm. http://www.codeplex.com/SharedCache It has got lots of nifty features for replicating the cache objects between boxes so it has a lot of the advantages Oracle had over Memcached.

Posted by mikojava, 09-21-2014, 10:33 AM
If you are using Java, Hazelcast is the most popular open source alternative to Oracle Coherence. It supports Memcached protocol on the wire, among other things.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
IP Blacklist (Views: 814)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.