gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Proposal for 3.5: Make adding custom translators eas


From: Joe Landman
Subject: Re: [Gluster-devel] Proposal for 3.5: Make adding custom translators easy
Date: Fri, 16 Aug 2013 15:23:32 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

On 08/12/2013 03:52 PM, Justin Clift wrote:
On 12/08/2013, at 8:50 PM, Jay Vyas wrote:
okay makes sense.  so .. um How about json ? :)


Yeah, might be a bunch more readable.  Also easier to
work with from things like Node.js.

Just personally not sure how to structure it well
with JSON.

Suggestions? :)

Its much easier in json, as documents are embeddable, without so much syntactic noise.

From our tiburon product, boot.json file:

{
   "servers" : {
      "default" : "192.168.108.250"
   },
   "boot" : {
      "default" : {
         "address" : "servers.default",
         "port"    : "3000"
      }
   },
   "nfs" : {
      "default" : {
         "address" : "servers.default",
         "mountpoint" : "/data/nfs"
      }
   },

   "targets" : {
     "nfs" : {
       "CentOS6.3_x64" : {

        //
        }
       }
      }
}

Very easy to parse with existing libraries, and mere mortals (and text editors) have a fighting chance at working with this.

As someone who worked with XML for more than a decade, and JSON for a few years, none of our projects are ever going to use XML again if we can avoid it. Since all of these json documents map nicely into various noSQL dbs (MongoDB, rethinkDB, etc.), its fairly trivial to go from config file to replicated data store. Which, I believe, solves another long standing problem.




--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics, Inc.
email: address@hidden
web  : http://scalableinformatics.com
       http://scalableinformatics.com/siflash
phone: +1 734 786 8423 x121
fax  : +1 866 888 3112
cell : +1 734 612 4615



reply via email to

[Prev in Thread] Current Thread [Next in Thread]