Git Product home page Git Product logo

claudb's Introduction

Hi there ๐Ÿ‘‹

tonivade's Github stats

tonivade's Top Languages

claudb's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar tonivade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

claudb's Issues

importRDB Error

 by: java.io.IOException: not supported: 172
	at com.github.tonivade.claudb.persistence.RDBInputStream.parse(RDBInputStream.java:116)
	at com.github.tonivade.claudb.DBServerState.importRDB(DBServerState.java:107)
	at com.github.tonivade.claudb.ClauDB.lambda$importRDB$2(ClauDB.java:136)
	at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
	at io.reactivex.Observable.subscribe(Observable.java:12284)
	at io.reactivex.internal.operators.observable.ObservableObserveOn.subscribeActual(ObservableObserveOn.java:45)
	at io.reactivex.Observable.subscribe(Observable.java:12284)
	at io.reactivex.internal.operators.observable.ObservableBlockingSubscribe.subscribe(ObservableBlockingSubscribe.java:81)
	... 20 common frames omitted

Deploy fatJar in maven

If you want to run quickly in console the server, you need to checkout the source code, generate the fat jar manually.

It would be nice to have this artifact deployed in maven

Scripting support

Add support to lua scripting, compatible with redis, or add new scripting capabilities like javascript, jruby and jithon.

Issues with events

keyspace events bad info

1) "psubscribe"
2) "__key*__:*"
3) (integer) 1
1) "pmessage"
2) "__key*__:*"
3) "__keyevent__@0__:a"
4) "set"
1) "pmessage"
2) "__key*__:*"
3) "__keyspace__@0__:set"
4) "set"

expected

1) "psubscribe"
2) "__key*__:*"
3) (integer) 1
1) "pmessage"
2) "__key*__:*"
3) "__keyspace@0__:a"
4) "set"
1) "pmessage"
2) "__key*__:*"
3) "__keyevent@0__:set"
4) "a"

Unexpected end of stream in rpop with jedis client

Jedis version: 2.9.0
Resp-server 0.10.0
Netty: 4.1.24
claudb: 1.2.0

Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)
	at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
	at redis.clients.jedis.Protocol.process(Protocol.java:151)
	at redis.clients.jedis.Protocol.read(Protocol.java:215)
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
	at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:259)
	at redis.clients.jedis.BinaryJedis.rpop(BinaryJedis.java:1260)
	at redis.clients.jedis.BinaryShardedJedis.rpop(BinaryShardedJedis.java:303)

Migration to vavr.io collections

Collection data types are saved inside TinyDB using this backends:

  • List: java.util.LinkedList
  • Set: java.util.LInkedHashSet
  • Zset: custom SortedSet implementation
  • Hash: java.util.LinkedHashMap

The objective is replace each collection with it's counterparts in vavr library

  • List: io.vavr.collection.LinkedList
  • Set: io.vavr.collection.LinkedHashSet
  • Map: io.vavr.collection.LinkedHashMap

The exception is SortedSet that is a custom implementation of java.util.NavigableSet

Support for HSCAN command

https://redis.io/commands/hscan/

When using Redisson with ClauDB:
org.redisson.client.RedisException: ERR unknown command 'HSCAN'. channel: [id: 0x1b56c5bb, L:/127.0.0.1:54510 - R:127.0.0.1/127.0.0.1:6379] command: (HSCAN), promise: java.util.concurrent.CompletableFuture@3a653de6[Not completed, 1 dependents], params: [JUnit_SESSION_MAP, 0, COUNT, 10]

Are you using claudb? Please tell me how!!

If you are using claudb, It would be awesome if you tell me how you are using it.

  • Environment: testing or production
  • Purpose: cache, redis integration tests, realtime analysis...
  • Which features are you using: lua scripting, persistence, off heap cache, keyspace events...
  • Which features do you miss: geospatial searches, some command or data type ...

If you want to help me, please write a comment to this issue with this information.

Thanks a lot!

SADD multiple members function missing

I am trying to add multiple members to a set but from your code, apparently, you do not handle it.

SADD mykey member1 member2 member3

or with Jedis:

jedis.sadd("mykey", "member1", "member2", "member3")

both return cardinality 1 (expected 3)

latest release 1.8.0 not working with java 8, only with java 11

It seems there are some incompatibilities in some java.nio.ByteBuffer methods in java 8 and java 11.

When you use cross compilation with java 11 to java 8, like in this project, the byte code generated is incorrect and not compatible with java 8.

See jetty/jetty.project#3244

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at com.github.tonivade.resp.protocol.SafeString.append(SafeString.java:106)
	at com.github.tonivade.claudb.command.string.AppendCommand.lambda$execute$0(AppendCommand.java:32)
	at com.github.tonivade.claudb.data.Database.merge(Database.java:78)
	at com.github.tonivade.claudb.command.string.AppendCommand.execute(AppendCommand.java:30)
	at com.github.tonivade.claudb.command.DBCommandWrapper.executeDBCommand(DBCommandWrapper.java:94)
	at com.github.tonivade.claudb.command.DBCommandWrapper.execute(DBCommandWrapper.java:82)
	at com.github.tonivade.claudb.command.CommandRule.execute(CommandRule.java:133)
	at com.github.tonivade.claudb.command.string.AppendCommandTest.testExecute(AppendCommandTest.java:24)

Bigset implementation

Implements the data structure bitset and it's related commands setbit, getbit, etc...

Remove logback, replace with slf4j-api

When using claudb for tests I get an SLF4J error complaining about multiple bindings on the classpath:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/me/.m2/repository/org/slf4j/slf4j-nop/1.7.30/slf4j-nop-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/me/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

mvn dependency:tree tells me that claudb depends on resp-server which depends on logback.

[INFO] \- com.github.tonivade:claudb:jar:1.7.1:compile
[INFO]    +- com.github.tonivade:resp-server:jar:0.16.0:compile
[INFO]    |  +- io.netty:netty-all:jar:4.1.47.Final:compile
[INFO]    |  +- io.reactivex.rxjava3:rxjava:jar:3.0.0:compile
[INFO]    |  +- com.github.tonivade:purefun-core:jar:1.8:compile
[INFO]    |  |  \- com.github.tonivade:purefun-annotation:jar:1.8:compile
[INFO]    |  \- ch.qos.logback:logback-classic:jar:1.2.3:runtime
[INFO]    |     \- ch.qos.logback:logback-core:jar:1.2.3:runtime

Can logback be replaced with slf4j-api?

Issue with list commands in 2.1

Hi

After attempting to bump our claudb dependency from 2.0.1 to 2.1 one of our unit test started failing on what looks like a bug somewhere in lpush/rpush/lpop/rpop commands.

Simple reproducer (can be copied directly into ClauDBServerTest):

@Test
public void testPushPull() {
  execute(jedis -> {
    long push = jedis.rpush("key", "val1", "val2");
    String pop1 = jedis.rpop("key");
    String pop2 = jedis.rpop("key");
    assertThat(push, is(2l));
    assertThat(pop1, equalTo("val2"));
    assertThat(pop2, equalTo("val1"));
  });
}

It fails on the last assert where pop2 is null instead of expected val1.

I checked the changes and the lpush and rpush commands were both changed, so I would expect a bug was introduced here.

Remove keys when expire

When a key has expired, it's still there

127.0.0.1:7081> keys *
1) "b"
2) "a"

But keys a and b has been expired

127.0.0.1:7081> get a
(nil)
127.0.0.1:7081> get b
(nil)
127.0.0.1:7081> keys *

TinyDB needs a process to remove expired keys before accessing keys

Support sentinel commands

Have the ability to support sentinel commands and implements (maybe partially) its functionality.

build error

  • I'm not familiar with gradle, and there is the build error message: image
  • I'm using ./gradlew buld in the project root path
  • using the Intellij IDEA gradle build tools also have the same error.

Implement set command options

Now, the implementation of set command is too simple and doesn't support additional options added in REDIS

    EX seconds -- Set the specified expire time, in seconds.
    PX milliseconds -- Set the specified expire time, in milliseconds.
    NX -- Only set the key if it does not already exist.
    XX -- Only set the key if it already exist.

see documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.