ReasonOne of the reasons for today's slow access to a project is that it is slow to read Oracle, the amount of data is small, the configuration table is ignored, and the business table is 380,000 records. One solution is to use the cache.So the question is, which caching framework is good?EhcacheThe project has been using it, but the version may be a bit low. It's really handy, just get a jar bag on the line. Java's preferred.MemcachedWrite in C, more trouble, to install. The data that is integr
redis to find the longest free time, which I think I have 1 million records, it casually find three and began to delete.
Good, clean up the mood again to see the 3.0 version of the improvement: now every random five records, inserted into a length of 16 in the queue of idle time, and then delete the line of the Pai, and then find five out, continue to try to insert the queue ... Well, a little bit, at least two times at random, at least not only in a random five to find the longest in the artic
local server, one to the other server. This scheme has high throughput and low latency, but requires the introduction of an XA transaction manager, with two cache managers writing two data that results in a large write overhead, and the write latency over the WAN can still cause the system to respond to bottlenecks.
The third scenario: Messaging based (AMQ) replication.
In this scenario, batch processing and queues are introduced to mitigate the bottleneck of the WAN, while processing read req
read business. With higher throughput and lower latency, the separation of read/copy guarantees a complete message distribution guarantee and conflict handling, but it is more complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretation of Oscache, where the "Web Support" secti
the node read business. With higher throughput and lower latency, the separation of read/copy guarantees a complete message distribution guarantee and conflict handling, but it is more complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretation of Oscache, where the "Web Suppo
read business. With higher throughput and lower latency, the separation of read/copy guarantees a complete message distribution guarantee and conflict handling, but it is more complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretation of Oscache, where the "Web Support" secti
complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretation of Oscache, where the "Web Support" section has detailed analysis of the principles.Finally, on the performance of Ehcache, the following figure is from Ehcache's founder,
limit is reached, Ehcache will clean up the memory according to the specified policy. The default policy is LRU. You can set it to FIFO or LFU.
Clearonflush: If the maximum amount of memory is cleared.
Memcache:Memcache is a set of distributed cache systems By maintaining a unified, huge hash table in memory, it can be used to store data in a variety of formats, including images, videos, files, and the results of database retrieval. The simple
more complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretation of Oscache, where the "Web Support" section has detailed analysis of the principles.Finally, on the performance of Ehcache, the following figure is from Ehcache's foun
impact of the WAN deterioration on the node read business. With higher throughput and lower latency, the separation of read/copy guarantees a complete message distribution guarantee and conflict handling, but it is more complex and requires a message bus.There are some Ehcache features that are less or more marginalized, not mentioned, such as support for JMX, and others with similar features and descriptions, such as Web support, see my interpretati
, when Ehcache and hibernate integration, can be queried out of the collection of objects into memory, next time if you query this query, will return this data collection directly from memory, no need to query the database, at the same time, you can configure the cache refresh mode, there are several modes of read-only,nonstrict-read-write,read-write, Where read-only indicates that the cache is not refreshed (to refresh only restart), Nonstrict-read-w
Copyright NOTICE: This article is the original article, without the owner's permission to reprint.
recently, the project team used these three caches and went to their respective authorities to see if they were really different. Today deliberately summed up the advantages and disadvantages of each cache, for reference only.
Ehcache
Widely used in Java projects. It is an open source, designed to increase the cost of the data from the RDBMS to take out
To address this problem:Net. SF. ehcache. config. configurator # configure: No ConfigurationFound. Grouping ing ehcache from ehcache-failsafe.xml found inClasspath:Jar: file:/E:/ytools/ssh/tools/Eclipse/myeclipse % 206.0/Eclipse/plugins/com.genuitec.org. hibernate. eclipse_6.0.1.zmyeclipse60316710/myeclipse-data/3.0/lib/ehcac
1. Ehcache's main features and cluster scenariosEHCache EHCache is a pure Java in-process cache, the default cacheprovider in Hibernate, minimal dependencies, comprehensive documentation and testing, the latest version is 2.0.1. Caching is applied to multiple domains and functions, Ehcache can be applied to database access caches, secure authentication caches, web caches, soap and RESTFul service caches, ap
http://haohaoxuexi.iteye.com/blog/2119733Ehcache Support for concurrencyIn the case of high concurrency, when using the Ehcache cache, the data we read may be wrong due to concurrent reads and writes, and the data we write may be accidentally overwritten. Fortunately, Ehcache provides us with a read (read), write-lock for the cache element key. When a thread acquires a read lock on a key, the other thread a
Use Spring AOP to configure and manage your level 2 cache (ehcache)If spring + Hibernate is used in our project, we will first think of the ehcache cache tool that comes with spring, the popular Cache Policy ehcache has been integrated in spring. Currently, many cache policies such as Oscache and memcached are used. th
No configuration found. Grouping ing ehcache from ehcache-failsafe.xml found in the classpathHttp://zhangguyou2009.blog.163.com/blog/static/34691638200872285854795/If no ehcache. xml file exists under/sandh/Web-INF/classes, this error is returned, no configuration found.
Caching ing ehcache from
The following content is reproduced from http://blog.csdn.net/jationxiaozi/article/details/8509732
recently, the project team used these three caches and went to their respective authorities to see if they were really different. Today deliberately summed up the advantages and disadvantages of each cache, for reference only.
Ehcache
Widely used in Java projects. It is an open source, designed to increase the cost of the data from the RDBMS to take out
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.