You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2023/02/20 16:25:41 UTC

[GitHub] [incubator-kvrocks] xiaobiaozhao created a discussion: Enable kvrocks-Json

GitHub user xiaobiaozhao created a discussion: Enable kvrocks-Json

As everyone knows, Json is more generic data. And it has richer expressions for data structures, I think we can support json data structures in kvrocks.

This is the official website of redisjson
https://redis.io/commands/json.arrappend/

I think kvrocks can use jsonjson's commands.

One way is to use cjson as the json library, since Cjson-Lua is already available in kvrocks.
Another approach is to introduce a new json library, such as [rapidjson](https://github.com/Tencent/rapidjson), [simdjson](https://github.com/simdjson/simdjson)

The [tair](https://help.aliyun.com/document_detail/145940.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#section-908-6al-m46)  DB supports two json formats, [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) and [JSONPointer](https://datatracker.ietf.org/doc/html/rfc6901?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) 

I think kvrocks  can also supports both formats. Jsonpointer is simple, jsonpath is complex.



GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

Totally agreed. We need to implement the entire JSON path features if use the cJSON.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5059592

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] xiaobiaozhao edited a discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user xiaobiaozhao edited a discussion: Add support of the JSON in Kvrocks

As everyone knows, Json is more generic data. And it has richer expressions for data structures, I think we can support json data structures in kvrocks.

This is the official website of redisjson
https://redis.io/commands/json.arrappend/

I think kvrocks can use jsonjson's commands.

One way is to use cjson as the json library, since Cjson-Lua is already available in kvrocks.
Another approach is to introduce a new json library, such as [rapidjson](https://github.com/Tencent/rapidjson), [simdjson](https://github.com/simdjson/simdjson)

The [tair](https://help.aliyun.com/document_detail/145940.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#section-908-6al-m46)  DB supports two json formats, [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) and [JSONPointer](https://datatracker.ietf.org/doc/html/rfc6901?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) 

I think kvrocks  can also supports both formats. Jsonpointer is simple, jsonpath is complex.



GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] mapleFU added a comment to the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user mapleFU added a comment to the discussion: Add support of the JSON in Kvrocks

The Json Part:

1. JSON is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159) 
2. SQL Standard 2016 support JSON. It support storing JSON as string, and parse and reading using JsonPath. PostgreSQL have 2 Json Types: `json` (storing as text) and `jsonb` (self-defined json format), there differences can be seen here: https://www.postgresql.org/docs/current/datatype-json.html . To be short, jsonb may occupy more or less space, and has faster field visit. The bson, msgpack or other are similiar.
3. ClickHouse can using Parsing whole JSON using itself's library and [SIMDJSON](https://github.com/simdjson/simdjson) to parse the record.

For our same kind productions:

* RedisJSON using rust to serde the JSON.
* For Alibaba Tail, it using doc to store it: https://help.aliyun.com/document_detail/145940.htm

Personally, we need to pick the library which are widely used, to prevent from library bugs.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5224158

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] mapleFU edited a comment on the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user mapleFU edited a comment on the discussion: Add support of the JSON in Kvrocks

The Json Part:

1. JSON is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159) 
2. SQL Standard 2016 support JSON. It support storing JSON as string, and parse and reading using JsonPath. PostgreSQL have 2 Json Types: `json` (storing as text) and `jsonb` (self-defined json format), there differences can be seen here: https://www.postgresql.org/docs/current/datatype-json.html . To be short, jsonb may occupy more or less space, and has faster field visit. The bson, msgpack or other are similiar.
3. ClickHouse can using Parsing whole JSON using itself's library and [SIMDJSON](https://github.com/simdjson/simdjson) to streaming parse the record.

For our same kind productions:

* RedisJSON using rust to serde the JSON.
* For Alibaba Tail, it using doc to store it: https://help.aliyun.com/document_detail/145940.htm

Personally, we need to pick the library which are widely used, to prevent from library bugs.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5224158

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] xiaobiaozhao edited a discussion: Add

Posted by GitBox <gi...@apache.org>.
GitHub user xiaobiaozhao edited a discussion: Add

As everyone knows, Json is more generic data. And it has richer expressions for data structures, I think we can support json data structures in kvrocks.

This is the official website of redisjson
https://redis.io/commands/json.arrappend/

I think kvrocks can use jsonjson's commands.

One way is to use cjson as the json library, since Cjson-Lua is already available in kvrocks.
Another approach is to introduce a new json library, such as [rapidjson](https://github.com/Tencent/rapidjson), [simdjson](https://github.com/simdjson/simdjson)

The [tair](https://help.aliyun.com/document_detail/145940.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#section-908-6al-m46)  DB supports two json formats, [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) and [JSONPointer](https://datatracker.ietf.org/doc/html/rfc6901?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) 

I think kvrocks  can also supports both formats. Jsonpointer is simple, jsonpath is complex.



GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] git-hulk edited a comment on the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user git-hulk edited a comment on the discussion: Add support of the JSON in Kvrocks

I think we can support the RedisJSON API first. And for the JSON library candidates, I think we should list the metrics which we care like supported JSON path or not, performance, maturity and license, and so on...

@PragmaTwice and @ShooterIT also have some experience with this, to see if they have some comments on this topic.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5058415

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

I think we can support the RedisJSON API first.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5058415

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice added a comment to the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user PragmaTwice added a comment to the discussion: Add support of the JSON in Kvrocks

I dislike the idea to use cjson, which is not a C++ json library and do not provide enough feature for implementing RedisJSON.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5059576

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user git-hulk added a comment to the discussion: Add support of the JSON in Kvrocks

@ShooterIT @PragmaTwice @mapleFU favor using the jsoncons, so maybe we can try if there is no further objection on this.

GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5224303

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] xiaobiaozhao edited a discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user xiaobiaozhao edited a discussion: Add support of the JSON in Kvrocks

As everyone knows, JSON is more generic data. And it has richer expressions for data structures, I think we can support the JSON data structures in kvrocks.

This is the official website of RedisJSON
https://redis.io/commands/json.arrappend/

I think kvrocks can use jsonjson's commands.

One way is to use cjson as our JSON library since cjson-lua is already available in kvrocks.
Another approach is to introduce a new JSON library, such as [rapidjson](https://github.com/Tencent/rapidjson), [simdjson](https://github.com/simdjson/simdjson)

The [tair](https://help.aliyun.com/document_detail/145940.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#section-908-6al-m46)  DB supports two json formats, [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) and [JSONPointer](https://datatracker.ietf.org/doc/html/rfc6901?spm=a2c4g.11186623.0.0.5f7b4603OHoLmF) 

I think Kvrocks can also support both formats. Jsonpointer is simple, JSON path is complex.



GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


[GitHub] [incubator-kvrocks] git-hulk edited a comment on the discussion: Add support of the JSON in Kvrocks

Posted by GitBox <gi...@apache.org>.
GitHub user git-hulk edited a comment on the discussion: Add support of the JSON in Kvrocks

I think we can support the RedisJSON API first. For choosing the JSON library candidates, I think we should list the metrics which we care like supported JSON path or not, performance, maturity and license, and so on...

@PragmaTwice and @ShooterIT also have some experience with this, to see if they have some comments on this topic.



GitHub link: https://github.com/apache/incubator-kvrocks/discussions/1270#discussioncomment-5058415

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org