02.Memcached
Memcached
  많은 업체들이 memcached 통신 protocol을 지원한다.
memcached client 를 구현하면 뒷단에 캐쉬 서버는 다양한 제품으로
교체가 가능하다는 장점이 있다.
  site
    http://danga.com/memcached/
  for window
    memcached 사이트에 가면 윈도우용이 없다.
아래 사이트에 가서 다운로드 받아서 테스트해봐야 한다.
    download & reference site
      http://www.splinedancer.com/memcached-win32/
    install
      c:\memcached\memcached.exe -d install
    run
      c:\memcached\memcached.exe -d start
    Install
1. Unzip the binaries in your desired directory (eg. c:\memcached)
2. Install 'c:\memcached\memcached.exe -d install' from the command line
3. Start 'c:\memcached\memcached.exe -d start'
4. Use the server, by default listening to port 11211
  실행옵션
    memcached.exe -h
    memcached 1.2.4
-p <num> TCP port number to listen on (default: 11211)
-U <num> UDP port number to listen on (default: 0, off)
-s <file> unix socket path to listen on (disables network support)
-a <mask> access mask for unix socket, in octal (default 0700)
-l <ip_addr> interface to listen on, default is INDRR_ANY
-d start tell memcached to start
-d restart tell running memcached to do a graceful restart
-d stop|shutdown tell running memcached to shutdown
-d install install memcached service
-d uninstall uninstall memcached service
-r maximize core file limit
-u <username> assume identity of <username> (only when run as root)
-m <num> max memory to use for items in megabytes, default is 64 MB
-M return error on memory exhausted (rather than removing items)
-c <num> max simultaneous connections, default is 1024
-k lock down all paged memory
-v verbose (print errors/warnings while in event loop)
-vv very verbose (also print client commands/reponses)
-h print this help and exit
-i print memcached and libevent license
-b run a managed instanced (mnemonic: buckets)
-P <file> save PID in <file>, only used with -d option
-f <factor> chunk size growth factor, default 1.25
-n <bytes> minimum space allocated for key+value+flags, default 48
    한 서버에 여러 서버를 띄우고자 한다면 -p 옵션으로 포트를 바꿔 주면 된다.
  client 정보
    memcached를 구현한 많은 제품이 있고 또 클라이언트도 다양하다.
적당한 모듈을 사용하여 구현하면 된다.
우리는 gwhalin 선택^^
    http://code.google.com/p/memcached/wiki/Clients
    Java
spymemcached
http://code.google.com/p/spymemcached
An improved Java API maintained by Dustin Sallings.
Aggressively optimised, ability to run async, supports
binary protocol, etc. See site for details.
Java memcached client
http://www.whalin.com/memcached
https://github.com/gwhalin/Memcached-Java-Client
A Java API is maintained by Greg Whalin from Meetup.com.
More Java memcached clients
http://code.google.com/p/javamemcachedclient
http://code.google.com/p/memcache-client-forjava
http://code.google.com/p/xmemcached
Integrations
http://code.google.com/p/simple-spring-memcached
http://code.google.com/p/memcached-session-manager