This is a discussion on Why we need Memcache? within the PHP Programming forums, part of the Web Development category; "version" is a command with no arguments: version\r\n In response, the server sends "VERSION <...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| "version" is a command with no arguments: version\r\n In response, the server sends "VERSION <version>\r\n", where <version> is the version string for the server. "verbosity" is a command with a numeric argument. It always succeeds, and the server sends "OK\r\n" in response (unless "noreply" is given as the last parameter). Its effect is to set the verbosity level of the logging output.
__________________ With, J. Jeyaseelan Everything Possible |
| Sponsored Links |
| |||
| "quit" is a another command quit\r\n Upon receiving this command, the server closes the connection. However, the client may also simply close the connection when it no longer needs it, without issuing this command.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| UDP protocol For very large installations where the number of clients is high enough that the number of TCP connections causes scaling difficulties, there is also a UDP-based interface. The UDP interface does not provide guaranteed delivery, so should only be used for operations that aren't required to succeed; typically it is used for "get" requests where a missing or incomplete response can simply be treated as a cache miss. Each UDP datagram contains a simple frame header, followed by data in the same format as the TCP protocol described above. In the current implementation, requests must be contained in a single UDP datagram, but responses may span several datagrams. (The only common requests that would span multiple datagrams are huge multi-key "get" requests and "set" requests, both of which are more suitable to TCP transport for reliability reasons anyway.)
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| The frame header is 8 bytes long, as follows (all values are 16-bit integers in network byte order, high byte first): 0-1 Request ID 2-3 Sequence number 4-5 Total number of datagrams in this message 6-7 Reserved for future use; must be 0
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| The request ID is supplied by the client. Typically it will be a monotonically increasing value starting from a random seed, but the client is free to use whatever request IDs it likes. The server's response will contain the same ID as the incoming request. The client uses the request ID to differentiate between responses to outstanding requests if there are several pending from the same server; any datagrams with an unknown request ID are probably delayed responses to an earlier request and should be discarded.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| The sequence number ranges from 0 to n-1, where n is the total number of datagrams in the message. The client should concatenate the payloads of the datagrams for a given response in sequence number order; the resulting byte stream will contain a complete response in the same format as the TCP protocol (including terminating \r\n sequences).
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi, Typically, you use a client library from your application to access one or more memcached servers. See Clients / memcached or memcached: client apis for a list of available libraries, which are available for Perl, C, C#, PHP, Python, Java, Ruby, and Postgresql Stored Procedures and Triggers. You can also write your own client library using the memcached protocol documentation found here: http://code.sixapart.com/svn/memcach...c/protocol.txt
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi all of you Actually i want to know.What is memcached? Thanks in advance. |
| |||
| Miakoda, Actually memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. The threaded system allows memcached to utilize more than a single CPU and share the cache between all of them. It does this by having a very simple locking mechanism when certain values, items, etc need to be updated. This helps make multi gets more efficient, versus running multiple nodes on the same physical server to achieve performance.
__________________ With, J. Jeyaseelan Everything Possible |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to delete memcache? | Kamalakannan | PHP Programming | 11 | 10-25-2007 11:30 PM |
| memcache commands and behavior | prasath | Database Support | 4 | 09-27-2007 12:04 AM |
| Phpaccelerator & Memcache | sivaramakrishnan | PHP Programming | 0 | 08-31-2007 07:59 AM |
| Memcache with Mysql | write2ashokkumar | Database Support | 0 | 08-02-2007 02:41 AM |
| memcache in PHP | DuraiBabu | PHP Programming | 6 | 07-18-2007 12:43 AM |