The. NET version of memcache is planned to be developed, and the name is dipperriver. net.

Source: Internet
Author: User
Origin:
I watched dnt3 a few days ago. CodeIt has already integrated the memcache access function. similar to the cache server software on the net platform, the velocity of MS is estimated to be a little bit longer, so I have a rough idea of the functional structure of memcache. It looks a bit similar to the TCP communication framework designed last year, because the framework concurrency of TCP is 2-3 K and a large amount of data is processed in the database, some cache functions and policy design are also involved. Now I want to design a complete memcache-like system.

System Structure
The distributed mode where memcache does not communicate with each other is adopted in advance. The content stored by each Cache Server is determined by the application system. That is, the application needs to design a set of cache access and location policies.

Function Design

Cahce:
Actually stores the cache data of the application system
Byte [] Array Storage

TCP communication:
Binary communication protocol
Protocol description

Cache Policy:
Expiration timeAlgorithm
LRU Algorithm
LFU Algorithm

Memory Management:
Memory Access
Memory cleanup Mechanism
Memory Pool Management

System Monitoring:

Management client:

Version plan
V0.1 structure design and communication protocol design.
The basic functions of v0.2 are implemented. The cache uses the. NET built-in collection class.
V0.3 implements the Cache Policy module and Memory Management Module
The v0.4tcp communication model adopts the asynchronous model of. net3.5, And the asynchronous context uses a cache pool (in the past, 2.0 was used, with memory fragments, and outofmemory would be used under 1.1 ).
V0.5 extends the memory management function. The cache uses the cache pool technology and the fragment function.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.