www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Redis client hunt-redis RC1 released

reply zoujiaqing <zoujiaqing gmail.com> writes:
A Powerfull Redis client library for D Programming Language.

Porting from java Jedis, support redis 3.x / 4.x all features and 
5.x
  some features.

So what can I do with Redis?

All of the following redis features are supported:

  * Sorting
  * Connection handling
  * Commands operating on any kind of values
  * Commands operating on string values
  * Commands operating on hashes
  * Commands operating on lists
  * Commands operating on sets
  * Commands operating on sorted sets
  * Transactions
  * Pipelining
  * Publish/Subscribe
  * Persistence control commands
  * Remote server control commands
  * Connection pooling
  * Sharding (MD5, MurmurHash)
  * Key-tags for sharding
  * Sharding with pipelining
  * Scripting with pipelining
  * Redis Cluster

To use it just:

```D
Redis redis = new Redis("localhost");
redis.set("foo", "bar");
string value = redis.get("foo");
```

Redis Cluster:

Redis cluster specification (still under development) is 
implemented

```D
Set!(HostAndPort) redisClusterNodes = new HashSet!(HostAndPort)();
//Redis Cluster will attempt to discover cluster nodes 
automatically
redisClusterNodes.add(new HostAndPort("127.0.0.1", 7379));
RedisCluster rc = new RedisCluster(redisClusterNodes);
rc.set("foo", "bar");
string value = rc.get("foo");
```

Welcome to use and test it :)

https://github.com/huntlabs/hunt-redis
https://code.dlang.org/packages/hunt-redis
Jul 23 2019
next sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Why? There is the excellent TinyRedis project. Does it not have some feature you need?
Jul 25 2019
next sibling parent zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 25 July 2019 at 16:23:58 UTC, Dejan Lekic wrote:
 On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Why? There is the excellent TinyRedis project. Does it not have some feature you need?
I want support 5.x streaming for it. And 6.x cache for clent.
Jul 26 2019
prev sibling next sibling parent Heromyth <bitworld qq.com> writes:
On Thursday, 25 July 2019 at 16:23:58 UTC, Dejan Lekic wrote:
 On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Why? There is the excellent TinyRedis project. Does it not have some feature you need?
The Tiny-Redis may be the fastest redis impelements in D. However we think the Jedis's APIs and document are better. So we ported it in D. It can make us writting code more quickly and correctly.
Jul 27 2019
prev sibling parent ikod <geller.garry gmail.com> writes:
On Thursday, 25 July 2019 at 16:23:58 UTC, Dejan Lekic wrote:
 On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Why? There is the excellent TinyRedis project. Does it not have some feature you need?
Correct me if I'm wrong, but TinyRedis supports only TcpSocket - so it can't be used with vibe (or another eventloop/async library) or unix socket. I'm seeing this just looking to https://github.com/adilbaig/Tiny-Redis/blob/master/source/ti yredis/connection.d so maybe I missed something. Also I don't see redis cluster support. Alas, hunt software is almost unusable because of lack of any documentation. So people forced reinvent redis client over and over again.
Jul 28 2019
prev sibling next sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Can it connect to AWS ElastiCache cluster endpoint?
Jul 25 2019
parent zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 25 July 2019 at 16:25:16 UTC, Dejan Lekic wrote:
 On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.
Can it connect to AWS ElastiCache cluster endpoint?
I don't know for ElastiCache, but hunt-redis support redis cluster.
Jul 26 2019
prev sibling next sibling parent aliak <something something.com> writes:
On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.

 [...]
Awesome! Huntlabs seem to really be putting in a lot of work on backend d-dev! Are there any websites/services you know of that are using the entire framework?
Jul 25 2019
prev sibling next sibling parent Greatsam4sure <greatsam4sure gmail.com> writes:
On Tuesday, 23 July 2019 at 07:57:06 UTC, zoujiaqing wrote:
 A Powerfull Redis client library for D Programming Language.

 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
  some features.

 So what can I do with Redis?

 All of the following redis features are supported:

  * Sorting
  * Connection handling
  * Commands operating on any kind of values
  * Commands operating on string values
  * Commands operating on hashes
  * Commands operating on lists
  * Commands operating on sets
  * Commands operating on sorted sets
  * Transactions
  * Pipelining
  * Publish/Subscribe
  * Persistence control commands
  * Remote server control commands
  * Connection pooling
  * Sharding (MD5, MurmurHash)
  * Key-tags for sharding
  * Sharding with pipelining
  * Scripting with pipelining
  * Redis Cluster

 To use it just:

 ```D
 Redis redis = new Redis("localhost");
 redis.set("foo", "bar");
 string value = redis.get("foo");
 ```

 Redis Cluster:

 Redis cluster specification (still under development) is 
 implemented

 ```D
 Set!(HostAndPort) redisClusterNodes = new 
 HashSet!(HostAndPort)();
 //Redis Cluster will attempt to discover cluster nodes 
 automatically
 redisClusterNodes.add(new HostAndPort("127.0.0.1", 7379));
 RedisCluster rc = new RedisCluster(redisClusterNodes);
 rc.set("foo", "bar");
 string value = rc.get("foo");
 ```

 Welcome to use and test it :)

 https://github.com/huntlabs/hunt-redis
 https://code.dlang.org/packages/hunt-redis
I really want to dry the hunt framework but cannot lay hand on any comprehensive tutorial. Please can you direct me on any on the web Keep on the good work
Jul 25 2019
prev sibling next sibling parent reply ag0aep6g <anonymous example.com> writes:
On 23.07.19 09:57, zoujiaqing wrote:
 Porting from java Jedis, support redis 3.x / 4.x all features and 5.x
   some features.
If your library is ported from another language, you're creating a derivative work. That means you need to respect the original license. A quick google search suggests that this is the original library: <https://github.com/xetorthio/jedis/tree/master/src/main/java/redis/clients/jedis>. Then the original license is the MIT license which says that you have to keep the original copyright notice and the original license intact. But you're not doing that. If I remember correctly, you Hunt guys have a history of treating copyright carelessly. When your work primarily consists of porting other people's code, you should pay more attention to that stuff, and give proper credit to the original authors.
Jul 25 2019
parent reply zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 On 23.07.19 09:57, zoujiaqing wrote:
 Porting from java Jedis, support redis 3.x / 4.x all features 
 and 5.x
   some features.
If your library is ported from another language, you're creating a derivative work. That means you need to respect the original license. A quick google search suggests that this is the original library: <https://github.com/xetorthio/jedis/tree/master/src/main/java/redis/clients/jedis>. Then the original license is the MIT license which says that you have to keep the original copyright notice and the original license intact. But you're not doing that. If I remember correctly, you Hunt guys have a history of treating copyright carelessly. When your work primarily consists of porting other people's code, you should pay more attention to that stuff, and give proper credit to the original authors.
Thanks. But we use other language to implementation.
Jul 26 2019
parent reply Eugene Wissner <belka caraus.de> writes:
On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
Jul 27 2019
next sibling parent reply Eugene Wissner <belka caraus.de> writes:
On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
If you translate "The Good Person of Szechwan" into English, you can't just claim to be the author.
Jul 27 2019
next sibling parent zoujiaqing <zoujiaqing gmail.com> writes:
On Saturday, 27 July 2019 at 09:10:23 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
If you translate "The Good Person of Szechwan" into English, you can't just claim to be the author.
也行,我是东北人,如果你们希望我不用英语,以后我可以用东北会和大家交流,不再用英语。
Jul 27 2019
prev sibling parent zoujiaqing <zoujiaqing gmail.com> writes:
On Saturday, 27 July 2019 at 09:10:23 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
If you translate "The Good Person of Szechwan" into English, you can't just claim to be the author.
兄弟,我不知道你想要什么,但是我可以明确的跟你说我想给社区什么。我会构建更多服务端架构所有必备的技术,让更多的人使用D语言去构建服务端应用。D语言之前没有自己的方向与定位,我知道D编译器技术很好,但是一个语言不是依赖编译器,而是依赖生态。我们huntlabs正在构建D语言服务端生态,我不知道你们的意思,难道我做错了什么?
Jul 27 2019
prev sibling parent reply zoujiaqing <zoujiaqing gmail.com> writes:
On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
这不是问题,问题是我们想保留他的版权,我愿意告诉大家我们是翻译的jedis,因为我想大家更了解一个项目。
Jul 27 2019
parent reply Johannes Loher <johannes.loher fg4f.de> writes:
Am 27.07.19 um 16:00 schrieb zoujiaqing:
 On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
这不是问题,问题是我们想保留他的版权,我愿意告诉大家我们是翻译的jedis, 因为我想大家更了解一个项目。
However, you do not seem to keep his copy right. In the whole project, there is not a single mention of Jedis or its author "Jonathan Leibiusky". The MIT license, under which Jedis is licensed, explicitly requires you to keep the original copyright notice: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." By not by not keeping the notice, you are actually performing copy right infringement. I think it is very honorable of you to contribute to the D community by porting a lot of stuff and thereby improving the ecosystem. I thank you for that. But you can only do this within the boundaries that the licenses of the software you port allows. I mean come on, it's not that difficult, right? Simply keep the original copy right notice, that is all that is reuired... For the sake of your own company, please take more care and properly address these licensing issues. Otherwise people might actually try to sue you for it... On a side note: I'm not sure if this has ever been made official, but it is common practice to write in English on this mailing list. Please stick to that. It is simply the best common ground that we have and it also makes a lot of sense: Would you want to have to put almost every message here into google translator because they are in German, Polish, Swedish, Spanish, etc.? Thanks :)
Jul 27 2019
next sibling parent reply zoujiaqing <zoujiaqing gmail.com> writes:
On Saturday, 27 July 2019 at 17:25:50 UTC, Johannes Loher wrote:
 Am 27.07.19 um 16:00 schrieb zoujiaqing:
 On Saturday, 27 July 2019 at 09:07:13 UTC, Eugene Wissner 
 wrote:
 On Saturday, 27 July 2019 at 06:08:34 UTC, zoujiaqing wrote:
 On Thursday, 25 July 2019 at 20:19:53 UTC, ag0aep6g wrote:
 [...]
Thanks. But we use other language to implementation.
It doesn't matter. It is all about intellectual property, algorithms and the structure. The language is the least important factor.
这不是问题,问题是我们想保留他的版权,我愿意告诉大家我们 翻译的jedis, 因为我想大家更了解一个项目。
However, you do not seem to keep his copy right. In the whole project, there is not a single mention of Jedis or its author "Jonathan Leibiusky". The MIT license, under which Jedis is licensed, explicitly requires you to keep the original copyright notice: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." By not by not keeping the notice, you are actually performing copy right infringement. I think it is very honorable of you to contribute to the D community by porting a lot of stuff and thereby improving the ecosystem. I thank you for that. But you can only do this within the boundaries that the licenses of the software you port allows. I mean come on, it's not that difficult, right? Simply keep the original copy right notice, that is all that is reuired... For the sake of your own company, please take more care and properly address these licensing issues. Otherwise people might actually try to sue you for it... On a side note: I'm not sure if this has ever been made official, but it is common practice to write in English on this mailing list. Please stick to that. It is simply the best common ground that we have and it also makes a lot of sense: Would you want to have to put almost every message here into google translator because they are in German, Polish, Swedish, Spanish, etc.? Thanks :)
非常抱歉,我的英文很差,不知道怎么去保留一个版权,我已经说明 我们是移植自 jedis。 另外来说,我们不是公司,我们是非盈利组织,我们只是希望弥补社区在服务端领域的短板。 你说怎么增加版权,我们很愿意添加,你要知道移植代码需要非常大的经历,但是添加版权没有任何难度。
Jul 27 2019
parent Domain <dont_email empty.com> writes:
;”On Saturday, 27 July 2019 at 21:05:26 UTC, zoujiaqing wrote:
On Saturday, 27 July 2019 at 21:05:26 UTC, zoujiaqing wrote:
 On Saturday, 27 July 2019 at 17:25:50 UTC, Johannes Loher wrote:
 [...]
非常抱歉,我的英文很差,不知道怎么去保留一个版权,我已经说明 我们是移植自 jedis。 另外来说,我们不是公司,我们是非盈利组织,我们只是希望弥补社区在服务端领域的短板。 你说怎么增加版权,我们很愿意添加,你要知道移植代码需要非常大的经历,但是添加版权没有任何难度。
应该在license文件里面保留移植之前的内容就行了吧。
Jul 27 2019
prev sibling parent Mengu <mengukagan gmail.com> writes:
On Saturday, 27 July 2019 at 17:25:50 UTC, Johannes Loher wrote:
 Am 27.07.19 um 16:00 schrieb zoujiaqing:
 [...]
However, you do not seem to keep his copy right. In the whole project, there is not a single mention of Jedis or its author "Jonathan Leibiusky". The MIT license, under which Jedis is licensed, explicitly requires you to keep the original copyright notice: [...]
OT: chinese -> english translation is really good on google translate.
Jul 31 2019
prev sibling parent reply zoujiaqing <zoujiaqing gmail.com> writes:
I'm  sorry.

I'm durking to litght, I want to respect all software authors and 
keep copyright, but we don't know how to express it.
Jul 27 2019
parent Sebastiaan Koppe <mail skoppe.eu> writes:
On Saturday, 27 July 2019 at 21:09:47 UTC, zoujiaqing wrote:
 I'm  sorry.

 I'm durking to litght, I want to respect all software authors 
 and keep copyright, but we don't know how to express it.
In every source file you simply paste the original copyright at the top. And then maybe add "ported to D by ..."
Jul 27 2019