protocols
What are the advantages of using a GET request over a POST request?
I generally set up the question as thus: Does anything important change after the request? (Logging and the like notwithstanding). If it does, it should be a POST request, if it doesn’t, it should be a GET request. I’m glad that you call POST requests “slightly” more secure, because that’s pretty much what they are; … Read more
Why are HTTP proxies able to support protocols like IRC and FTP?
HTTP proxy is able to support high level protocols other than HTTP if it supports CONNECT method, which is primarily used for HTTPS connections, here is description from Squid wiki: The CONNECT method is a way to tunnel any kind of connection through an HTTP proxy. By default, the proxy establishes a TCP connection to … Read more
Why does a SYN or FIN bit in a TCP segment consume a byte in the sequence number space?
It’s not particularly subtle – it’s so that the SYN and FIN bits themselves can be acknowledged (and therefore re-sent if they’re lost). For example, if the connection is closed without sending any more data, then if the FIN did not consume a sequence number the closing end couldn’t tell the difference between an ACK … Read more
GWT RPC data format
EDIT: Brian Slesinsky just documented the protocol (by reverse-engineering the code): https://docs.google.com/document/d/1eG0YocsYYbNAtivkLtcaiEE5IOF5u4LUol8-LL0TIKU/edit First, GWT-RPC protocol is asymmetric so that it’s always optimized for the client-side: fast to deserialize something coming from the server, and fast to serialize something to send to it. It’s obviously not binary, as you suspected, but text-based. client-to-server protocol is pipe-delimited … Read more
ZeroMQ + Protocol Buffers
If you are 100% certain that the programs that are going to communicate over ZMQ will at all times be capable of understanding each other’s binary format (eg because they are always distributed together and were all compiled with the same compiler options anyways) I see no benefit to the overhead that’s added by serialization. … Read more
Swift Protocol Implements Equatable
1) Allow two Cacheables of the same type to be compare protocol Cacheable: Equatable { //….// func identifier() -> String } func ==<T : Cacheable>(lhs: T, rhs: T) -> Bool { return lhs.identifier() == rhs.identifier() } Pros This is the simplest solution. Cons You can only compare two Cacheable objects of the same type. This … Read more
Why does Java’s URL class not recognize certain protocols?
Issue Java throws a MalformedURLException because it couldn’t find a URLStreamHandler for that protocol. Check the javadocs of the constructors for the details. Summary Since the URL class has an openConnection method, the URL class checks to make sure that Java knows how to open a connection of the correct protocol. Without a URLStreamHandler for … Read more
No module named google.protobuf
There is another possibility, if you are running a python 2.7.11 or other similar versions, sudo pip install protobuf is ok. But if you are in a anaconda environment, you should use conda install protobuf