Re: [HTCondor-devel] idle thoughts: json as classads


Date: Tue, 25 Jun 2013 14:58:25 -0500
From: Erik Paulson <epaulson@xxxxxxxxxxxx>
Subject: Re: [HTCondor-devel] idle thoughts: json as classads
I'd like to be able to evaluate a ClassAd anywhere, so I think fixing on a strategy of trying to get evaluations back to the C++ library is a dead-end. Having a JSON object be a valid ClassAd is a win in the "evaluate everywhere" - though maybe all JSON objects are too simple to ever be useful as a ClassAd. 

Being able to evaluate a ClassAd everywhere is of course mostly orthogonal to the issue of how is the ClassAd represented, since I could write a ClassAd library in _javascript_ with the format as-is and make it work. However, I think having a serialization format that is valid JSON gives us the ability to transport and store ClassAds in a whole lot of new systems, and to be to do some rudimentary manipulation of the ClassAd in any language out of the box. Other libraries can look inside the JSON ClassAd and actually do some of the evaluation of the superset when needed. 

While ClassAds have been occasionally used outside of HTCondor, the uptake was never overwhelming and I think has fallen off (are there any external ClassAd users anymore?). We may have more luck if we started to look a little more like what the rest of the world expects. 

-Erik

On Tue, Jun 25, 2013 at 2:38 PM, Alain Roy <alain.roy@xxxxxxxxx> wrote:
On Jun 25, 2013, at 11:19 AM, Erik Paulson <epaulson@xxxxxxxxxxx> wrote:
> If we flipped the meaning of '[]' and '{}' in ClassAds, and allowed colons as an assignment operator*, and maybe checked the different string escapes, would every JSON object automatically be a ClassAd?

Maybe, but you couldn't easily express every ClassAd as a JSON object. Attribute references, expressions, and functions are all challenges.

On Jun 25, 2013, at 11:33 AM, Erik Paulson <epaulson@xxxxxxxxxxx> wrote:
> C++ is a pain in the ass to use in many environments (for example, the browser)

I think the point is that you can do the conversion in different places. If you want to give Condor a shiny new REST-ful interface and build a UI in _javascript_, you could have a frontend that converts a JSON-ClassAd to a classic ClassAd and vice-versa. It doesn't necessarily have to be in the core ClassAd library. (Though the idea is nifty.)

-alain

_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel

[← Prev in Thread] Current Thread [Next in Thread→]