Thread: [GSoC] current working status

[GSoC] current working status

From
Charles Cui
Date:
Hi mentors and hackers,
  
   The first evaluation is coming. Here is my progress so far. During the first stage of work, I have implemented the thrift binary protocol as the format of postgresql plugin. Currently, the main interface is byte. Users who use this plugin need to provide thrift bytes to the plugin, and there are helpers for each data type to parse out the value contained in the bytes. This method has been verified by the use of several unit tests. However, the current interface needs users understand thrift format very well to use this plugin. After discussing with my mentors, it will be more useful to implement the concept of "thrift type", which is a custom type where user provides user understandable format(e.g., json), then the plugin converts into byte. I am currently busy with implementing this feature and still need sometime to complete it. If this part is done, I will go ahead to implement thrift compact protocol.  Let me know if you have comments. You can always track the progress from github (https://github.com/charles-cui/pg_thrift)

Thanks, Charles!

Re: [GSoC] current working status

From
Aleksander Alekseeev
Date:
Hello Charles,

>    The first evaluation is coming. Here is my progress so far. During
> the first stage of work, I have implemented the thrift binary
> protocol as the format of postgresql plugin. Currently, the main
> interface is byte. Users who use this plugin need to provide thrift
> bytes to the plugin, and there are helpers for each data type to
> parse out the value contained in the bytes. This method has been
> verified by the use of several unit tests. However, the current
> interface needs users understand thrift format very well to use this
> plugin. After discussing with my mentors, it will be more useful to
> implement the concept of "thrift type", which is a custom type where
> user provides user understandable format(e.g., json), then the plugin
> converts into byte. I am currently busy with implementing this
> feature and still need sometime to complete it. If this part is done,
> I will go ahead to implement thrift compact protocol.  Let me know if
> you have comments. You can always track the progress from github
> ( https://github.com/charles-cui/pg_thrift)

Thanks for keeping us informed!

Unfortunately I'm having difficulties compiling your code on Linux with
PostgreSQL 10.4 or 11 and GCC 8.1.1. Here is a full list of warnings
and errors: https://afiskon.ru/s/6e/edbefe818e_pg-thrift-errors.txt

I also tried a VM with Ubuntu 16.04, PostgreSQL 9.6 and GCC 5.4.0. No
luck either. Please make sure that your code compiles on Linux. Users
will most likely try to run it on this OS.

It might be also a good idea to add your repository to travic-ci.org
service.

-- 
Best regards,
Aleksander Alekseev


Re: [GSoC] current working status

From
Charles Cui
Date:
Hi Aleksander,

   I saw the list of errors you posted. That's because I have some new function implemented and pushed without testing(in order forget my change in local machine).
So you are saying it is best to keep each commit workable. Right?

Thanks Charles.

2018-06-14 1:41 GMT-07:00 Aleksander Alekseeev <a.alekseev@postgrespro.ru>:
Hello Charles,

>    The first evaluation is coming. Here is my progress so far. During
> the first stage of work, I have implemented the thrift binary
> protocol as the format of postgresql plugin. Currently, the main
> interface is byte. Users who use this plugin need to provide thrift
> bytes to the plugin, and there are helpers for each data type to
> parse out the value contained in the bytes. This method has been
> verified by the use of several unit tests. However, the current
> interface needs users understand thrift format very well to use this
> plugin. After discussing with my mentors, it will be more useful to
> implement the concept of "thrift type", which is a custom type where
> user provides user understandable format(e.g., json), then the plugin
> converts into byte. I am currently busy with implementing this
> feature and still need sometime to complete it. If this part is done,
> I will go ahead to implement thrift compact protocol.  Let me know if
> you have comments. You can always track the progress from github
> ( https://github.com/charles-cui/pg_thrift)

Thanks for keeping us informed!

Unfortunately I'm having difficulties compiling your code on Linux with
PostgreSQL 10.4 or 11 and GCC 8.1.1. Here is a full list of warnings
and errors: https://afiskon.ru/s/6e/edbefe818e_pg-thrift-errors.txt

I also tried a VM with Ubuntu 16.04, PostgreSQL 9.6 and GCC 5.4.0. No
luck either. Please make sure that your code compiles on Linux. Users
will most likely try to run it on this OS.

It might be also a good idea to add your repository to travic-ci.org
service.

--
Best regards,
Aleksander Alekseev

Re: [GSoC] current working status

From
Aleksander Alekseeev
Date:
Hello Charles,

>    I saw the list of errors you posted. That's because I have some new
> function implemented and pushed without testing(in order forget my
> change in local machine).
> So you are saying it is best to keep each commit workable. Right?

Ideally, yes. You can always create a separate branch to experiment with
new code and merge it to master branch when it becomes stable. This is
not a strict GSoC requirement or something like this, but a good
practice. If something goes wrong you can just delete an experimental
branch and go back to working master branch.


-- 
Best regards,
Aleksander Alekseev


Re: [GSoC] current working status

From
Charles Cui
Date:
good idea, will keep a feature branch, and set up ci.

On Thu, Jun 14, 2018, 8:03 AM Aleksander Alekseeev <a.alekseev@postgrespro.ru> wrote:
Hello Charles,

>    I saw the list of errors you posted. That's because I have some new
> function implemented and pushed without testing(in order forget my
> change in local machine).
> So you are saying it is best to keep each commit workable. Right?

Ideally, yes. You can always create a separate branch to experiment with
new code and merge it to master branch when it becomes stable. This is
not a strict GSoC requirement or something like this, but a good
practice. If something goes wrong you can just delete an experimental
branch and go back to working master branch.


--
Best regards,
Aleksander Alekseev

Re: [GSoC] current working status

From
Charles Cui
Date:
Hi mentors,

   The repo currently can be build on my mac. You can check it out. 
Also I am working on the CI config to monitor each commit. 


Thanks

2018-06-14 8:29 GMT-07:00 Charles Cui <charles.cui1984@gmail.com>:
good idea, will keep a feature branch, and set up ci.

On Thu, Jun 14, 2018, 8:03 AM Aleksander Alekseeev <a.alekseev@postgrespro.ru> wrote:
Hello Charles,

>    I saw the list of errors you posted. That's because I have some new
> function implemented and pushed without testing(in order forget my
> change in local machine).
> So you are saying it is best to keep each commit workable. Right?

Ideally, yes. You can always create a separate branch to experiment with
new code and merge it to master branch when it becomes stable. This is
not a strict GSoC requirement or something like this, but a good
practice. If something goes wrong you can just delete an experimental
branch and go back to working master branch.


--
Best regards,
Aleksander Alekseev

Re: [GSoC] current working status

From
Aleksander Alekseeev
Date:
Hello Charles,

> The repo currently can be build on my mac. You can check it out.
> Also I am working on the CI config to monitor each commit.

Tests pass on Arch Linux with PostgreSQL 11 and Ubuntu 16.04 with
PostgreSQL 9.6. However there is a name conflict in case of PostgreSQL
11: https://afiskon.ru/s/7a/fe681b17f0_paste.txt I suggest to rename
the procedure to `convert_int8_to_char`.

Also GCC still generates a lot of warnings (see my previous message).
I would advise to fix all these warnings, otherwise you can miss a
really important warning. Ideally, the code should be compiled with
-Wall flag.

-- 
Best regards,
Aleksander Alekseev


Re: [GSoC] current working status

From
Charles Cui
Date:
got it, i will resolve all these warnings. One wired thing when i set up CI is the docker image seems having a postgres version which conflicts with my test version. So, CI is broken now ,although tests pass at my local box. I will also figure this out.

On Fri, Jun 15, 2018, 1:34 AM Aleksander Alekseeev <a.alekseev@postgrespro.ru> wrote:
Hello Charles,

> The repo currently can be build on my mac. You can check it out.
> Also I am working on the CI config to monitor each commit.

Tests pass on Arch Linux with PostgreSQL 11 and Ubuntu 16.04 with
PostgreSQL 9.6. However there is a name conflict in case of PostgreSQL
11: https://afiskon.ru/s/7a/fe681b17f0_paste.txt I suggest to rename
the procedure to `convert_int8_to_char`.

Also GCC still generates a lot of warnings (see my previous message).
I would advise to fix all these warnings, otherwise you can miss a
really important warning. Ideally, the code should be compiled with
-Wall flag.

--
Best regards,
Aleksander Alekseev