4 Gotcha’s of text-based protocols

As I stated many times, I think binary encoding is superior to text based encoding. However, usually, when you are a software engineer implementing a protocol, the protocol choice is not yours. In this post, I will consider the pitfalls and gotcha’s of text-based protocols and how to design your way around them. I mostly consider protocols defined by ABNF rules (such as SIP). If the protocol uses an XML scheme, there are readily available documents on parsing XML into (read more...)

By Ran Arad  |  July 3rd, 2008  |  Filed under Development, SDKs
3 comments  |  Add your own 


Compiled Protocols vs. Script Protocols

There is a huge difference between compiled languages and scripting languages: the former are first entirely compiled and then executed, the latter are interpreted as they progress. I will use this terminology to discuss two types of protocols: the more common is made up of readymade messages or methods; each message type indicates a predetermined course of action. The less common type, and one I think deserves more attention, sends messages made up of many simple commands that do very (read more...)

By Ran Arad  |  May 27th, 2008  |  Filed under Standardization
Add a comment 


Empty Security & Vitamin Cookies

In my previous post, I mentioned the “wicked son,” the vendors who want to give their customers a sense of security, but do not actually want to implement any cumbersome security algorithms. I had a customer using H.323 who sent me specifications for a security implementation for H.323 where the password wasn’t known in advance, and asked us to support it. When I mentioned to them that they were showing the password in the open, where anyone who wants can (read more...)

By Ran Arad  |  April 30th, 2008  |  Filed under SDKs, Standardization
Add a comment 


Naughty protocols, need spanking

I have previously mentioned Joel Spolsky’s brilliant post about standards. If you’ve not read it yet, it is really worth your while. In that post he quotes Jon Postel‘s robustness principle and Marshall Rose’s critique: Counter-intuitively, Postel’s robustness principle (”be conservative in what you send, liberal in what you accept”) often leads to deployment problems. Why? When a new implementation is initially fielded, it is likely that it will encounter only a subset of existing implementations. If those implementations follow (read more...)

By Ran Arad  |  April 7th, 2008  |  Filed under Interoperability, Standardization
Add a comment 


Protocol war

There are two kinds of protocol wars: one is between competing protocols, and the other is between protocol implementations. I would like to offer a glimpse into the reasons and ways in which companies implementing the same protocol compete with each other. However, I will first need to make a small disclaimer: any example I give here is not meant to imply that any company involved has any intention of malice or foul play. In fact, I am sure that (read more...)

By Ran Arad  |  March 31st, 2008  |  Filed under Interoperability
Add a comment 


Follow Standards – Receive Coupon! (details inside)

Joel Spolsky wrote a brilliant post 3 days ago about Microsoft’s Internet Explorer 8 development team declaring that IE8 will enforce standard HTML, and sites that do not confirm to the standards will not be displayed properly. Joel did not wish to take sides in the war between idealists and pragmatists, but eventually concluded that since there are so many HTML pages already written in bad HTML, the pragmatists are likely to win. That means that any web site not (read more...)

By Ran Arad  |  March 20th, 2008  |  Filed under Interoperability, Standardization
1 comment  |  Add your own 


Why text-based protocols hurt your design

If there is one thing I learned, it’s that text based encodings are a menace. They have their use, have no doubt; I’m not throwing away all the XML flavors and HTTP-like protocols. I’m just saying that their use should be limited to cases where we already deal with text-based data, like HTML or information repositories, not for complex communication protocols. Binary Decoders Two things can be said about binary decoding: it’s rigid and it’s repetitive. That means that if (read more...)

By Ran Arad  |  February 11th, 2008  |  Filed under Standardization
4 comments  |  Add your own 


5 “don’ts” when building a protocol stack

Having recently had the privilege of writing a protocol stack from near-scratch, and having worked on a dozen more, I saw and did a few common mistakes: 1. Don’t assume it’s easy. It’s not easy. Even when you are writing a proprietary protocol to communicate between just two entities, don’t go “oh that will just write itself” - it will write itself, badly. Go to the design phase. Make sure that even if you’ll need to expand your protocol over (read more...)

By Ran Arad  |  January 21st, 2008  |  Filed under SDKs
Add a comment 


Memory efficiency, the Tertium Quid

Let’s put one thing out of the way: I hate the term memory consumption. I don’t think it’s relevant to anything. Likewise, I resent the terminology of processor time consumption vs. memory space consumption. Its all in the way you use that processor time or memory space: if use memory inefficiently, you’ll exhaust your cache, and your memory, and maybe start thrashing, and where is your performance now? Instead, I like the term memory efficiency. So now you clutch your (read more...)

By Ran Arad  |  January 8th, 2008  |  Filed under Development
Add a comment 



Subscribe

Subscribe via RSS
Subscribe via email:

Interactive Video Platform