Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance
connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service
returns a com.twitter.util.Future representing the result of the operation. We listen to this
future, printing an appropriate message when the response arrives.

The Finagle homepage contains useful documentation and
resources for using Finagle.

Thrift codecs

The type of the server codec is Service[Array[Byte], Array[Byte]]
and the client codecs are Service[ThriftClientRequest,
Array[Byte]]. The service provided is that of a "transport" of
thrift messages (requests and replies) according to the protocol
chosen. This is why the client codecs need to have access to a
thrift ProtocolFactory.

Gets a field value encoded as a binary blob using TCompactProtocol. If the specified field
is present in the passthrough map, that value is returned. Otherwise, if the specified field
is known and not optional and set to None, then the field is serialized and returned.

Sets a field using a TCompactProtocol-encoded binary blob. If the field is a known
field, the blob is decoded and the field is set to the decoded value. If the field
is unknown and passthrough fields are enabled, then the blob will be stored in
_passthroughFields.

If the specified field is optional, it is set to None. Otherwise, if the field is
known, it is reverted to its default value; if the field is unknown, it is removed
from the passthroughFields map, if present.

If the specified field is optional, it is set to None. Otherwise, if the field is
known, it is reverted to its default value; if the field is unknown, it is removed
from the passthroughFields map, if present.