[LU-6246] Add a JSON decoder Created: 13/Feb/15 Updated: 02/Nov/18 Resolved: 02/Nov/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Frank Zago (Inactive) | Assignee: | WC Triage |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Rank (Obsolete): | 17495 | ||||||||||||||||
| Description |
|
For the HSM migration enhancement (LU-6081), it would be nice to be able to transfer data (stripe informaton and mdt_index) between lfs and the copytool in an exchange format, namely JSON. The current liblustreapi_json.c can only encode JSON. Use the CCAN (Comprehensive C Archive Network) JSON which it relatively small, can encode/decode, and has a decent testsuite. Replace liblustreapi_json.c with the new implementation. |
| Comments |
| Comment by Gerrit Updater [ 13/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13770 |
| Comment by Gerrit Updater [ 13/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13771 |
| Comment by Gerrit Updater [ 13/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13772 |
| Comment by Gerrit Updater [ 13/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13773 |
| Comment by Gerrit Updater [ 13/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13774 |
| Comment by Frank Zago (Inactive) [ 14/Feb/15 ] |
|
The licenses used by CCAN JSON are:
All 3 licenses are GPLv2 and v3 compatible. |
| Comment by James A Simmons [ 15/Mar/16 ] |
|
Hi Frank. With LUG coming up I like to discuss on developer's day about using JSON in replacement of YAML. Especially since json-c seems to be the standard now. |
| Comment by Frank Zago (Inactive) [ 16/Mar/16 ] |
|
That one: https://github.com/json-c/json-c ? |
| Comment by James A Simmons [ 16/Mar/16 ] |
|
Yes. |
| Comment by Frank Zago (Inactive) [ 31/Mar/16 ] |
|
I did a quick test to compare the CCAN JSON and the JSON-C (0.11-3 as provided by Ubuntu 12.04). The test decodes a 1290 bytes strings 1000000 times in a loop. CCAN JSON does it in 8.58s and JSON-C does it in 20.70s, so it's about 2.4 times slower. On the other hand, that's still fast enough for the usage being done here, and JSON-C is present in CentOS 6 & 7 and Debian/Ubuntu. The API looks also similar. So I wouldn't mind dropping these patches if JSON-C has better chance of being used. If JSON-C turns out to be a bottleneck, we can replace it. |
| Comment by Frank Zago (Inactive) [ 20/Jun/16 ] |
|
Hi James, |
| Comment by James A Simmons [ 02/Feb/18 ] |
|
Once |
| Comment by James A Simmons [ 31/Oct/18 ] |
|
I see the latest LU-6081 work has moved from using JSON to YAML. Since this is the case should we close this ticket and abandon the patches related to this work? |
| Comment by Nikitas Angelinas [ 31/Oct/18 ] |
|
Hi James. Yes, I think so as well, unfortunately. This would probably have been useful to land, but as you had suggested, since libyaml is now a dependency of Lustre it makes sense to use that instead. |
| Comment by James A Simmons [ 02/Nov/18 ] |
|
Will use YAML instead. |