Changeset 687
- Timestamp:
- 12/19/07 09:27:19 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/binary/server/doc/binary-protocol-plan-v2.txt
r684 r687 69 69 3.4. Data Types . . . . . . . . . . . . . . . . . . . . . . . . 6 70 70 4. Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 71 4.1. get/getq . . . .. . . . . . . . . . . . . . . . . . . . . 672 4.2. delete . . . . . . . . . . . . . . . . . . . . . . . . . . 773 4.3. set/add/replace .. . . . . . . . . . . . . . . . . . . . 771 4.1. Get, Get Quietly . . . . . . . . . . . . . . . . . . . . . 6 72 4.2. Delete . . . . . . . . . . . . . . . . . . . . . . . . . . 7 73 4.3. Set, Add, Replace . . . . . . . . . . . . . . . . . . . . 7 74 74 4.4. noop . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 75 4.5. incr/decr . . . . .. . . . . . . . . . . . . . . . . . . 875 4.5. Increment, Decrement . . . . . . . . . . . . . . . . . . . 8 76 76 5. Example Session . . . . . . . . . . . . . . . . . . . . . . . 9 77 77 6. Security Considerations . . . . . . . . . . . . . . . . . . . 13 … … 123 123 124 124 Memcache was originally written to make LiveJournal [LJ] go faster. 125 It now powers all of the fastest web sites that you love. 125 126 126 127 1.1. Conventions Used In This Document 127 128 128 FIXME: Use RFC 2119 [KEYWORDS] because otherwise we'll never agree on 129 what MUST means. 129 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 130 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 131 document are to be interpreted as described in [KEYWORDS]. 130 132 131 133 … … 154 156 +---------------+---------------+---------------+---------------+ 155 157 Total 16 bytes 156 157 158 158 159 159 … … 286 286 0x0A No-op 287 287 0x0B Version 288 0x0C GetR 289 0x0D SetR 288 290 289 291 3.4. Data Types … … 291 293 Possible values of the one-byte field: 292 294 0x00 Raw bytes 293 0x01 My name is what?294 0x02 My name is Sean!295 295 296 296 297 297 4. Commands 298 298 299 4.1. get/getq299 4.1. Get, Get Quietly 300 300 301 301 MUST have extras. … … 343 343 can send 'n' getqs, followed by an 'echo' or 'noop' command. 344 344 345 4.2. delete345 4.2. Delete 346 346 347 347 MAY have extras (FIXME: Is it OK to issue a delete without … … 373 373 within its purview). 374 374 375 4.3. set/add/replace375 4.3. Set, Add, Replace 376 376 377 377 MUST have extras. … … 409 409 Total 16 bytes 410 410 411 If the Data version check is present and nonzero, a set will succeed 412 iff the value exists and has a version identifier identical to the 413 provided value. 411 If the Data Version Check is present and nonzero, the set MUST 412 succeed if the key exists and has a version identifier identical to 413 the provided value, and MUST NOT succeed if the key does not exist or 414 has a different version identifier. The set response packet will 415 include the same values in all three fields. 416 417 If the Data Version Check is zero, the set MUST succeed 418 unconditionally. The set response packet will include idential 419 values for flags and expiration, and a new value for Data Version 420 Check, which the client SHOULD keep track of. 421 422 The key MAY be reserved according to Section 4.2, causing the set to 423 fail. 414 424 415 425 4.4. noop … … 421 431 Used as a keep alive. Flushes outstanding getq's. 422 432 423 4.5. incr/decr433 4.5. Increment, Decrement 424 434 425 435 MUST have extras. … … 430 440 o 8 byte initial value (unsigned) 431 441 o 4 byte expiration time 432 433 434 435 436 437 438 439 440 441 442 442 443 443 … … 676 676 6. Security Considerations 677 677 678 Memcache has no authentication or security layers and is intended 679 strictly for use on closed, protected, back-end networks within a 680 single data center, within a single cluster of servers, or even on a 681 single host, providing shared caching for multiple applications. 682 Memcache should not ever be made available on a public network. 678 Memcache has no authentication or security layers whatsoever. It is 679 RECOMMENDED that memcache be deployed strictly on closed, protected, 680 back-end networks within a single data center, within a single 681 cluster of servers, or even on a single host, providing shared 682 caching for multiple applications. Memcache MUST NOT be made 683 available on a public network. 683 684 684 685 685 686 7. Normative References 686 687 687 [LJ] Danga Interactive, "LJ NEEDS MOAR SPEED", 10 1999. 688 689 [UDP] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 690 August 1980. 688 [KEYWORDS] 689 Bradner, S., "Key words for use in RFCs to Indicate 690 Requirement Levels", BCP 14, RFC 2119, March 1997. 691 692 [LJ] Danga Interactive, "LJ NEEDS MOAR SPEED", 10 1999. 693 694 [UDP] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 695 August 1980. 691 696 692 697 … … 700 705 Jamie McCarthy, Philip Neustrom, Andrew O'Brien, Josh Rotenberg, 701 706 Robin H. Johnson, Tim Yardley, Paolo Borelli, Eli Bingham, Jean- 702 Francois Bustarret, Paul G, Paul Lindner, Dormando, Dustin Sallings,703 Chris Goffinet, Tomash Brechko, and others for their work reporting704 bugsand maintaining memcached client libraries and bindings in many707 Francois Bustarret, Paul G, Paul Lindner, Alan Kasindorf, Chris 708 Goffinet, Tomash Brechko, and others for their work reporting bugs 709 and maintaining memcached client libraries and bindings in many 705 710 languages. 706 707 The author takes no credit for the protocol described in this708 document, though certainly any errors in transcription or in prose709 are his.710 711 711 712 … … 724 725 725 726 726 727 727 Aaron Stone Expires June 16, 2008 [Page 13] 728 728 branches/binary/server/doc/binary-protocol-plan-v2.xml
r684 r687 60 60 <t> 61 61 Memcache was originally written to make <xref target="LJ">LiveJournal</xref> go faster. 62 It now powers all of the fastest web sites that you love. 62 63 </t> 63 64 <section anchor="conventions" title="Conventions Used In This Document"> 64 <t> 65 FIXME: Use RFC 2119 [KEYWORDS] because otherwise we'll never agree on what MUST means. 65 <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 66 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 67 document are to be interpreted as described in <xref target="KEYWORDS"/>. 66 68 </t> 67 69 </section> … … 153 155 </section> 154 156 155 <section title="Defined Values">156 <section title="Magic Byte">157 <section anchor="values" title="Defined Values"> 158 <section anchor="value-magic" title="Magic Byte"> 157 159 <t> 158 160 <list hangIndent="8" style="hanging"> … … 187 189 </section> 188 190 189 <section title="Response Status">191 <section anchor="value-status" title="Response Status"> 190 192 <t> 191 193 Possible values of this two-byte field: … … 199 201 </section> 200 202 201 <section title="Command Opcodes">203 <section anchor="value-opcodes" title="Command Opcodes"> 202 204 <t> 203 205 Possible values of the one-byte field: … … 219 221 </section> 220 222 221 <section title="Data Types">223 <section anchor="value-types" title="Data Types"> 222 224 <t> 223 225 Possible values of the one-byte field: 224 226 <list hangIndent="8" style="hanging"> 225 227 <t hangText="0x00">Raw bytes</t> 226 <t hangText="0x01">My name is what?</t>227 <t hangText="0x02">My name is Sean!</t>228 228 </list> 229 229 </t> … … 232 232 233 233 <section title="Commands"> 234 <section title="get/getq">234 <section anchor="command-get" title="Get, Get Quietly"> 235 235 <t> 236 236 <list style="empty"> … … 291 291 </section> 292 292 293 <section title="delete">293 <section anchor="command-delete" title="Delete"> 294 294 <t> 295 295 <list style="empty"> … … 332 332 </section> 333 333 334 <section title="set/add/replace">334 <section anchor="command-set" title="Set, Add, Replace"> 335 335 <t> 336 336 <list style="empty"> … … 369 369 370 370 <t> 371 If the Data version check is present and nonzero, a set will succeed iff the 372 value exists and has a version identifier identical to the provided value. 373 </t> 371 If the Data Version Check is present and nonzero, the set MUST succeed if the 372 key exists and has a version identifier identical to the provided value, and 373 MUST NOT succeed if the key does not exist or has a different version identifier. 374 The set response packet will include the same values in all three fields. 375 </t> 376 377 <t> 378 If the Data Version Check is zero, the set MUST succeed unconditionally. 379 The set response packet will include idential values for flags and expiration, 380 and a new value for Data Version Check, which the client SHOULD keep track of. 381 </t> 382 383 <t> 384 The key MAY be reserved according to <xref target="command-delete"/>, 385 causing the set to fail. 386 </t> 374 387 </section> 375 388 … … 388 401 </section> 389 402 390 <section title="incr/decr">403 <section anchor="command-incr" title="Increment, Decrement"> 391 404 <t> 392 405 <list style="empty"> … … 589 602 </section> 590 603 591 <section title="Security Considerations">592 <t> 593 Memcache has no authentication or security layers and is intended594 strictly for use on closed, protected, back-end networks within a595 single data center, within a single cluster of servers, or even on596 a single host, providing shared caching for multiple applications.597 Memcache should not everbe made available on a public network.604 <section anchor="security" title="Security Considerations"> 605 <t> 606 Memcache has no authentication or security layers whatsoever. It is 607 RECOMMENDED that memcache be deployed strictly on closed, protected, 608 back-end networks within a single data center, within a single cluster of 609 servers, or even on a single host, providing shared caching for multiple 610 applications. Memcache MUST NOT be made available on a public network. 598 611 </t> 599 612 </section> … … 616 629 </reference> 617 630 <dwdrfc-ref anchor='UDP' src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.0768.xml'/> 631 <dwdrfc-ref anchor='KEYWORDS' src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'/> 618 632 </references> 619 633 620 634 <section anchor="acknowledgments" title="Acknowledgments"> 621 635 <t> 622 Thanks to Brad Fitzpatrick, Anatoly Vorobey, Steven Grimm, and Dustin Sallings,623 for their work on the memcached server.636 Thanks to Brad Fitzpatrick, Anatoly Vorobey, Steven Grimm, and Dustin 637 Sallings, for their work on the memcached server. 624 638 </t> 625 639 … … 629 643 McCarthy, Philip Neustrom, Andrew O'Brien, Josh Rotenberg, Robin H. 630 644 Johnson, Tim Yardley, Paolo Borelli, Eli Bingham, Jean-Francois 631 Bustarret, Paul G, Paul Lindner, Dormando, Dustin Sallings, Chris 632 Goffinet, Tomash Brechko, and others for their work reporting bugs and 633 maintaining memcached client libraries and bindings in many languages. 634 </t> 635 636 <t> 637 The author takes no credit for the protocol described in this document, 638 though certainly any errors in transcription or in prose are his. 645 Bustarret, Paul G, Paul Lindner, Alan Kasindorf, Chris Goffinet, Tomash 646 Brechko, and others for their work reporting bugs and maintaining 647 memcached client libraries and bindings in many languages. 639 648 </t> 640 649 </section>
