[Gluster-devel] Proposal for 3.5: Make adding custom translators easy
Joe Landman
landman at scalableinformatics.com
Fri Aug 16 19:23:32 UTC 2013
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: landman at scalableinformatics.com
web : http://scalableinformatics.com
http://scalableinformatics.com/siflash
phone: +1 734 786 8423 x121
fax : +1 866 888 3112
cell : +1 734 612 4615
More information about the Gluster-devel
mailing list