Wednesday, January 19, 2011

ACE TCP Offload

This white paper provides more details about 2 options regarding ACE TCP offload, namely TCP connection reuse and SSL Acceleration.

TCP connection reuse - TCP connections pooling to eliminate the server connection processing bottleneck
SSL Acceleration - Offloading SSL processing onto the ACE Module

HTTP persistent connections, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using the same TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new one for every single request/response pair. Using persistent connections is very important for improving HTTP performance. The advantages are even more obvious with HTTPS or HTTP over SSL/TLS. There, persistent connections may reduce the number of costly SSL/TLS handshake to establish security associations, in addition to the initial TCP connection set up.

See more info about HTTP keep-alive in JDK http://download.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html

SSL hardware accelerator is performing SSL offloading, because part of the SSL processing is “offloaded” from the server’s CPU to the card’s co-processor. The term “offloading,” however, is generally used to describe an appliance or a completely separate computer that performs all SSL processing, so that the SSL load is taken off of the Web server completely.

SSL offloading can greatly increase the performance of your secure Web servers, thus increasing customer satisfaction. However, offloading means the SSL connection extends only from client to offloader, not from client to server. Data passes across the network unencrypted from offloader to server.

Tuesday, January 18, 2011

No urlencode resulted in HTTP 505 error

HTTP GET always need URL encoding the request, one typical case is space should get encoded to %20. IE will do the encoding automatically, but when you program using httpclient in Java, do not forget to do this, otherwise you will possibly get 505 error (HTTP Version Not Supported)

Here is one example:
Without URL encoding (505 code)
GET /context/api.do?token=encrypted&p1=xxx&p2=xxx xx HTTP/1.1

With URL encoding (200 code)
GET /context/api.do?token=encrypted&p1=xxx&p2=xxx%20xx HTTP/1.1

In JDK, there is a URLEncoder utility class to provide methods for URL encode and decode.
http://download.oracle.com/javase/1.4.2/docs/api/java/net/URLEncoder.html

Note that because the <space> character is very commonly used, a special code ( the "+" sign) has been reserved as its URL encoding.  Thus the string "A B" can be URL encoded as either "A%20B" or "A+B". Therefore in JDK, it was converted to plus sign (+).


Here are excerpts from SUN javadoc
--------------------------------------------------
When encoding a String, the following rules apply:

  • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the same.
  • The special characters ".", "-", "*", and "_" remain the same.
  • The space character " " is converted into a plus sign "+".
  • All other characters are unsafe and are first converted into one or more bytes using some encoding scheme. Then each byte is represented by the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the byte. The recommended encoding scheme to use is UTF-8. However, for compatibility reasons, if an encoding is not specified, then the default encoding of the platform is used.

Wednesday, January 5, 2011

Windows XP 1394 connection

The IEEE 1394 interface is a serial bus interface standard for high-speed communications and isochronous real-time data transfer, frequently used by personal computers, as well as in digital audio, digital video, automotive, and aeronautics applications. The interface is also known by the brand names of FireWire (Apple), i.LINK (Sony), and Lynx (Texas Instruments). IEEE 1394 replaced parallel SCSI in many applications, because of lower implementation costs and a simplified, more adaptable cabling system.

It is very common to see 4-circuit firewire connector shipped with digital camera, camera recorder, smartphone, external hard driver and so on.






The history and more info regarding to 1394 interface can be found from wikipedia http://en.wikipedia.org/wiki/FireWire

However, recently my laptop lost wireless connection I open "Network Connections" from Start -> Settings, and found there is a "Connected" status connection called 1394 connection. After some research, it has nothing to do with network connection, because 1394 interface is designed for real-time data transfer explained above. However, Windows XP labeled 1394 adapter as a new network device.

The details are explain by Microsoft at http://support.microsoft.com/kb/307736
New Windows XP users might notice a new network device labeled 1394 Connection on their system. This network device is actually your FireWire card. Although most users use FireWire to connect video and storage peripherals, Microsoft chose to list FireWire as a network device, which might confuse some users. Either you can ignore this connection, or you can disable it by right-clicking the connection from within Network Connections (from the Start menu, go to Settings, Network Connections) and selecting Disable.

Therefore, "1394 adapter" is for your "firewire" port -- a port you can use to hook up your video camera (or some external hard drives) -- as in many instances it (FireWire 800) can be faster than USB 2.0. This port will have absolutely NOTHING to do with your internet.