[[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] Moving forward with the JSON gem


Chronological Thread 
  • From: Akzhan Abdulin < >
  • To: Seth Falcon < >
  • Cc: Chef Dev < >
  • Subject: [[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] Moving forward with the JSON gem
  • Date: Tue, 8 Mar 2011 10:24:33 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=owukHp2UH0xXGDFXhL/UQb27gJm3vJaTbvJwg1tTtcebwkilGWa0Il1kS/IPA1jcet SwesznQ2hrQaoxGXfbdB/kBnVdY/+PzotSGRHS/2I7GYpDovvnAPSjm5EB+PUimLOgEG gyT1GpLw2Z9PXsnt5x+lcSVlQ+2nOUGv/M6fo=

Looks correct, but:
1) Ohai currently depends on json gem because generates it.
2) Chef depends on Ohai.
3) Moving of JSONCompat layer to ohai will free both ohai and chef from json dependency.

ohai will never depend on chef, of course.

Your idea with full rewriting to Yajl::Parser and Yajl::Encoder like like more rosust.

By the way, after release of Rails 3 we can move away from Merb (and, of course, yajl-ruby is supported directly by Rails 3).

2011/3/7 Seth Falcon < "> >
Hi all,

On Sat, Mar 5, 2011 at 1:18 AM, Akzhan Abdulin < "> > wrote:
> I suppose that we need to
> 1) Move Chef::JSONCompat to ohai gem.
> 2) Use Ohai::JSONCompat everywhere we need to.
> 3) Switch to yajl-ruby as last step.

Ohai does not currently depend on Chef and I suspect there is a fair
bit of weight behind keeping it that way (I'm not even sure from
the above whether "move Chef::JSONCompat to ohai" means introducing
such a dependency or not).

I'd like to see both Ohai and Chef move to using yajl-ruby as a
wholesale replacement for the json gem (not using a compatability mode
and not offering to fall-back to json gem).  My impression is that
yajl-ruby is more stable in terms of API and I have observed
reasonable speed and memory-use improvements over json gem when
testing it.

The tricky part of such a move is the interaction with Merb in the
Chef server, where Merb currently uses the json gem and does JSON
serialization auto-magically.

I'd put the priority fairly high since we believe that switching to
yajl will remove compatibility/version issues that we've seen with the
json gem and will provide performance improvements.


+ seth

--
Seth Falcon | Senior Software Design Engineer | Opscode | @sfalcon




Archive powered by MHonArc 2.6.16.

§