views:

44

answers:

2

Hi,

I need to process the incoming predefined ASN format data(coming from verity of clients that uses BER library to build it) in my application server. This is typically an LDAP server where every request will be in a predefined ASN format. Can i use Google's protocol buffers to process the requests in the server side? Will it help any way to improve performance of my servers request handling? Is it anyway reduce the number of malloc() calls that happens while processing ASN messages?

Thanks, Naga

A: 

I don't see how it's likely to help, to be honest. Unless you can change both the server and the client, you'll have to handle the ASN format at some point anyway - where do you think you'd get benefit from converting from one format to another?

If you have a lot of internal processing between different servers after you've received the request, then in that case it may make sense to translate from ASN to a protocol buffer format - but it sounds like you're still going to need ASN handling at the boundary.

Jon Skeet
I thought of implementing the ASN.1 format using protocol buffer. I might not have understood the protocol buffer concept completely.
Naga
@Naga: I'm sure you could represent ASN.1 data *in* protocol buffers - but they wouldn't be binary-compatible with ASN.1.
Jon Skeet
A: 

The binary format of protobuf is not like BER encoding, you cannot use protobuf to decode those messages.

nos