octave-maintainers
[Top][All Lists]
Advanced

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

Re: Help in JSON encode/decode project


From: Kai Torben Ohlhus
Subject: Re: Help in JSON encode/decode project
Date: Mon, 9 Mar 2020 12:38:06 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/9/20 5:04 AM, Andrew Janke wrote:
> On 3/8/20 3:53 PM, Abdallah Elshamy wrote:
>>
>>     > If you want to make a project out of it, spend some time with it
>>     and see
>>     > where you think you can help improve it.
>>
>> Thanks for your reply.
>>
>>
>> I followed your advice and started spending some time with it. Also the
>> issues list [1] of the package provided some useful info. What I think I
>> can help in improving are:
>>
>>   * Using RapidJson instead of jsoncpp to enhance performance.
>>
>>   * modifying jsondecode to be compatible with RapidJson.
>>
>>   * Writing jsonencode in c++ to improve performance.
>>
>>   * Verifying the “condensation” algorithm by writing more tests then
>>     moving it to c++.
>>
>>   * Some modifications is needed in the documentation (for example the
>>     documentation of jsondecode function is just a repetition of the
>>     documentation of jsonencode.)
>>
>>   * preparing the two functions to be integrated to the core of octave
>>     rather than a package.
>>
>>
>> I was thinking that writing tests [2] will help me more in understanding
>> the project and the package. Do you think it’s a good idea to do so (in
>> parallel with my preparation of the proposal with you and the
>> maintainers of octave)?
>>
>>
>> Thanks for your time.
>>
>> Abdallah
>>
>>
>> [1] https://github.com/apjanke/octave-jsonstuff/issues
>>
>> [2] https://github.com/apjanke/octave-jsonstuff/issues/13
> 
> 
> For what it's worth, I think writing more unit tests so we can get to a
> comprehensive test suite is the top priority for jsondecode. That will
> make everything else listed here easier and safer.
> 
> This list sounds right to me, except I'm not sure about switching to
> RapidJson. Do you know of any benchmarks comparing the performance of
> jsondecode and RapidJson? Or would we need to do that testing ourselves?
> 
> Oops. Sorry about the bad doco on jsondecode. That definitely needs
> fixed. https://github.com/apjanke/octave-jsonstuff/issues/17
> 
> Cheers,
> Andrew
> 


Dear Abdallah,

Thank you for you interest in this project.  To answer you first email

> Does this mean that he is about to finish the project so I should
> consider another one or the project will use some of his work ?

The great work of Andrew and the other three projects mentioned in the
wiki project description [1] should not scare you away.  Proper
Matlab-compatible JSON integration into Octave core is a pending issue
for at least two years.  As far as I overview the situation, there is no
approach that can make it into Octave core before GSoC is over.  They
all require some sort of adaption and nobody could spend the necessary
time to really care about this project yet.

At the moment you are focused on "octave-jsonstuff".  Please keep in
mind, that there are two (three) other libraries as well.
"octave-rapidjson" worked for me out-of-the-box too, contains test, but
lacks of a Matlab-compatible interface.  JSONio has a very lightweight
dependency, contains tests, but is based on the MEX-C-interface, which
may not be a good choice for Octave core (mostly C++).  This is what I
mean by cherry picking.

The schedule I roughly have in mind is similar to what Mike suggests:
test and familiarize yourself with all four approaches.  Focus on
getting them to run, get an idea how they work, what features are
available, what is missing.

Based on you impressions, you can then prepare your proposal.  Of course
you don't need to complete anything when applying for the project.  A
rough schedule I have in mind is:

1. Extract available tests from all four approaches into your own
test-suite for the whole project.  If possible asses the tests for
Matlab-compatibility (I can help out with this task).  Create larger
scale test cases that run in Matlab too for benchmarking.

2. Asses comprehensively all four libraries with your tests and
benchmarks.  Create reliable figures, graphics.

3. Decide for a back-end (jsmn, rapidjson, jsoncpp).  This will then
become an (optional) Octave dependency.

4. Convert your test-suite into Octave BIST (builtin self-tests) and
implement jsonencode/jsondecode with nice documentation.

This is of course all my happy fantasy and there is lots of space for
discussing the exact outline.

Best,
Kai


[1]
https://wiki.octave.org/Summer_of_Code_-_Getting_Started#JSON_encoding.2Fdecoding



reply via email to

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