Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-07

Protocol Buffers

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, does anyone know if there's a FreePascal implementation of Protocol Buffers, it seems to fit perfectly in on use case I'm working on:

https://developers.google.com/protocol-buffers/

Regards,

Leonardo M. Ram? Medical IT - Griensu S.A. Av. Col?n 636 - Piso 8 Of. A X5000EPT -- C?rdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877

Reply by email

Michael Van Canneyt
to Aradeonas
Aradeonas wrote
Leonardo can you explain where you can use it?

Any service that needs to exchange data fast over the network with another service. if human-readability and general accesibility and so on is not important, then this will work a lot faster than e.g. XML or JSON.

Michael.

Reply by email

Leonardo M. Ramé
to Michael Van Canneyt: Yes, there are several. See e.g. fundamentals. http://fundementals.sourceforge.net/…
Michael Van Canneyt wrote 15 lines
On Fri, 24 Jul 2015, "Leonardo M. Ram?" wrote: > Hi, does anyone know if there's a FreePascal implementation of > Protocol Buffers, it seems to fit perfectly in on use case I'm working > on: > > https://developers.google.com/protocol-buffers/ Yes, there are several. See e.g. fundamentals. http://fundementals.sourceforge.net/ Michael.

Nice!, I didn't know about this library.

Reply by email

Leonardo M. Ramé
to Aradeonas: Leonardo can you explain where you can use it? Ara http://www.fastmail.com - Choose from…
Aradeonas wrote 6 lines
Leonardo can you explain where you can use it? Regards, Ara

Currently one of my apps is sending JSON files to a server, with a structure similar to this:

{
"document_name": "doc 1",
"document_type": "pdf",
"content": BASE64_ENCODED_PDF
}

Where BASE64_ENCODED_PDF is an binary file that must be converted to base64 to be included into a json field.

The base64 encoding/decoding carries both processor and transfer size overhead, compared to a binary protocol.

Of course I could have created my own proprietary protocol, but I have some constraints, for example, the sender is a Java application, and the receiver is a FreePascal one, so, using a "standard" protocol, like Google's Protocol Buffers seems to fit very well in this particular scenario.

Regards,

Reply by email