Foundations of Python Network Programming
Chapter 8 ■ CaChes and Message Queues 138 The actual procedure for using Memcached is designed to be simple. • You run a Memc ...
Chapter 8 ■ CaChes and Message Queues 139 Listing 8-1. Using Memcached to Accelerate an Expensive Operation !/usr/bin/env python ...
Chapter 8 ■ CaChes and Message Queues 14 0 even be preemptively cleared of stale items related to the changed value. But sometim ...
Chapter 8 ■ CaChes and Message Queues 141 The solution is that the clients all implement a single, stable algorithm that can tur ...
Chapter 8 ■ CaChes and Message Queues 14 2 The hash() function is Python’s own built-in hash routine, which is designed to be bl ...
Chapter 8 ■ CaChes and Message Queues 143 The other innovation message queues offer is that instead of supporting only the point ...
Chapter 8 ■ CaChes and Message Queues 14 4 • A publisher-subscriber or fanout topology looks like a pipeline but with a key d ...
Chapter 8 ■ CaChes and Message Queues 145 To keep the example in this section self-contained, Listing 8-3 tackles a simple probl ...
Chapter 8 ■ CaChes and Message Queues 14 6 Listing 8-3. A ØMQ Messaging Fabric Linking Five Different Workers !/usr/bin/env pyth ...
Chapter 8 ■ CaChes and Message Queues 147 def pythagoras(zcontext, url): """Return the sum-of-squares of number sequences.""" zs ...
Chapter 8 ■ CaChes and Message Queues 14 8 digits match the filter string. Your pair of subscribers, then, are guaranteed to rec ...
Chapter 8 ■ CaChes and Message Queues 149 Many programmers use message queues behind a friendlier API, such as the Celery projec ...
151 Chapter 9 HTTP Clients This is the first of three chapters about HTTP. In this chapter, you will learn how to use the protoc ...
Chapter 9 ■ http Clients 152 so that you can try the examples in this chapter on your own machine without needing to hit the pub ...
Chapter 9 ■ http Clients 153 libraries but need to perform advanced HTTP operations, then you will want to consult not only the ...
Chapter 9 ■ http Clients 154 The request is the block of text that begins with GET. The response begins with the version HTTP/1. ...
Chapter 9 ■ http Clients 155 The two basic methods, GET and POST, provide the basic “read” and “write” operations of HTTP. GET i ...
Chapter 9 ■ http Clients 156 Many HTTP servers will signal a client error unless the client supplies at least a Host header reve ...
Chapter 9 ■ http Clients 157 • 405 Method Not Allowed: The server recognizes the method and path, but this particular method ...
Chapter 9 ■ http Clients 158 Here, two popular sites have taken opposite stances on whether the www prefix should be part of the ...
«
3
4
5
6
7
8
9
10
11
12
»
Free download pdf