Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?


by sans2030 (Initiate)
on Dec 25, 2012 at 09:08 UTC ( #1010254=perlquestion: print w/replies, xml ) Need Help??
sans2030 has asked for the wisdom of the Perl Monks concerning the following question:

Hello All,
We are working on re-factoring of our engine and have decided to create a service out of the same.
Hence we will have different clients which will be accessing the same service.

Now we have two contenders to provide the output in.
1> GPB

Some points to be kept in mind.
1> The primary objective is the rendering of the data on the client
2> To keep the client as thin as possible
3> Also to have minimum maintainability

Hence looking into the above scenario, would like your views on which to choose and why.

Replies are listed 'Best First'.
by CountZero (Bishop) on Dec 25, 2012 at 20:54 UTC
    You probably mean "minimum effort in maintaining" the service-server.

    JSON is just a data-interchange format and there are several mature modules on CPAN that implement JSON. I doubt that is the case for GPB, at least a quick search on CPAN only found Google::ProtocolBuffers which dates back to 2008 and is at version 0.0.8. GPB is now at version 2.5 dated 4th of December 2012, so one really wonders how relevant a 2008 implementation still is.

    If you go the Perl JSON way, the maintenance effort becomes virtually nil as far as JSON is concerned since the active module authors will take care of that aspect.

    GPB looks more complicated (it is a binary format) than JSON (text format, so easier to debug and "read") and for JSON there are a lot of implementations in many languages (more than 50 languages at last count). GPB has only a few implementations and the Google site does not even list the Perl one. Sorry, Google does list more implementations, but they call it "third party add-ons". How strange!


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
by BrowserUk (Pope) on Dec 25, 2012 at 10:44 UTC

    Given your requirements for a thin client, GPB is a non-starter as it would require the client have and use a C++ compiler.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Would it? According to the GPB (assuming you both mean Google Protocol Buffers) homepage there are official mappings for C++, Java and Python and while the Google::ProtocolBuffers hadn't been updated in a while, it's quite possible it still works just fine.

      Here's a link to third party libraries.

      Enoch was right!
      Enjoy the last years of Rome.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010254]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2018-06-22 02:21 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (120 votes). Check out past polls.