Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into go/command_response…
Browse files Browse the repository at this point in the history
…_struct
  • Loading branch information
janhavigupta007 committed Aug 19, 2024
2 parents 54c4b02 + 850a265 commit f740afb
Show file tree
Hide file tree
Showing 67 changed files with 9,974 additions and 1,963 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ runs:
shell: bash
if: "${{ inputs.os == 'amazon-linux' }}"
run: |
yum install -y gcc pkgconfig openssl openssl-devel which curl gettext --allowerasing
yum install -y gcc pkgconfig openssl openssl-devel which curl gettext tar --allowerasing
- name: Install Rust toolchain and protoc
if: "${{ !contains(inputs.target, 'musl') }}"
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#### Changes
* Node: Added XINFO GROUPS command ([#2122](https://github.com/valkey-io/valkey-glide/pull/2122))
* Java: Added PUBSUB CHANNELS, NUMPAT and NUMSUB commands ([#2105](https://github.com/valkey-io/valkey-glide/pull/2105))
* Java: Added binary support for custom command ([#2109](https://github.com/valkey-io/valkey-glide/pull/2109))
* Node: Added SSCAN command ([#2132](https://github.com/valkey-io/valkey-glide/pull/2132))
* Node: Added HKEYS command ([#2136](https://github.com/aws/glide-for-redis/pull/2136))
* Node: Added FUNCTION KILL command ([#2114](https://github.com/valkey-io/valkey-glide/pull/2114))
* Node: Update all commands to use `async` ([#2110](https://github.com/valkey-io/valkey-glide/pull/2110))
* Node: Added XAUTOCLAIM command ([#2108](https://github.com/valkey-io/valkey-glide/pull/2108))
* Node: Added XPENDING commands ([#2085](https://github.com/valkey-io/valkey-glide/pull/2085))
* Node: Added HSCAN command ([#2098](https://github.com/valkey-io/valkey-glide/pull/2098/))
* Node: Added XINFO CONSUMERS command ([#2093](https://github.com/valkey-io/valkey-glide/pull/2093))
* Node: Added HRANDFIELD command ([#2096](https://github.com/valkey-io/valkey-glide/pull/2096))
* Node: Added FUNCTION STATS commands ([#2082](https://github.com/valkey-io/valkey-glide/pull/2082))
* Node: Added XCLAIM command ([#2092](https://github.com/valkey-io/valkey-glide/pull/2092))
* Node: Added EXPIRETIME and PEXPIRETIME commands ([#2063](https://github.com/valkey-io/valkey-glide/pull/2063))
* Node: Added SORT commands ([#2028](https://github.com/valkey-io/valkey-glide/pull/2028))
* Node: Added LASTSAVE command ([#2059](https://github.com/valkey-io/valkey-glide/pull/2059))
* Node: Added GEOSEARCHSTORE command ([#2080](https://github.com/valkey-io/valkey-glide/pull/2080))
* Node: Added LCS command ([#2049](https://github.com/valkey-io/valkey-glide/pull/2049))
* Node: Added MSETNX command ([#2046](https://github.com/valkey-io/valkey-glide/pull/2046))
* Node: Added BLMOVE command ([#2027](https://github.com/valkey-io/valkey-glide/pull/2027))
Expand Down Expand Up @@ -41,21 +56,32 @@
* Node: Added FUNCTION FLUSH command ([#1984](https://github.com/valkey-io/valkey-glide/pull/1984))
* Node: Added FCALL and FCALL_RO commands ([#2011](https://github.com/valkey-io/valkey-glide/pull/2011))
* Node: Added COPY command ([#2024](https://github.com/valkey-io/valkey-glide/pull/2024))
* Node: Added MOVE command ([#2104](https://github.com/valkey-io/valkey-glide/pull/2104))
* Node: Added ZMPOP command ([#1994](https://github.com/valkey-io/valkey-glide/pull/1994))
* Node: Added ZINCRBY command ([#2009](https://github.com/valkey-io/valkey-glide/pull/2009))
* Node: Added BZMPOP command ([#2018](https://github.com/valkey-io/valkey-glide/pull/2018))
* Node: Added XRANGE command ([#2069](https://github.com/valkey-io/valkey-glide/pull/2069))
* Node: Added PFMERGE command ([#2053](https://github.com/valkey-io/valkey-glide/pull/2053))
* Node: Added WATCH and UNWATCH commands ([#2076](https://github.com/valkey-io/valkey-glide/pull/2076))
* Node: Added WAIT command ([#2113](https://github.com/valkey-io/valkey-glide/pull/2113))
* Node: Added DUMP and RESTORE commands ([#2126](https://github.com/valkey-io/valkey-glide/pull/2126))
* Node: Added ZLEXCOUNT command ([#2022](https://github.com/valkey-io/valkey-glide/pull/2022))
* Node: Added ZREMRANGEBYLEX command ([#2025](https://github.com/valkey-io/valkey-glide/pull/2025))
* Node: Added ZRANGESTORE command ([#2068](https://github.com/valkey-io/valkey-glide/pull/2068))
* Node: Added SRANDMEMBER command ([#2067](https://github.com/valkey-io/valkey-glide/pull/2067))
* Node: Added XINFO STREAM command ([#2083](https://github.com/valkey-io/valkey-glide/pull/2083))
* Node: Added ZSCAN command ([#2061](https://github.com/valkey-io/valkey-glide/pull/2061))
* Node: Added SETRANGE command ([#2066](https://github.com/valkey-io/valkey-glide/pull/2066))
* Node: Added APPEND command ([#2095](https://github.com/valkey-io/valkey-glide/pull/2095))
* Node: Added XDEL command ([#2064](https://github.com/valkey-io/valkey-glide/pull/2064))
* Node: Added LMPOP & BLMPOP command ([#2050](https://github.com/valkey-io/valkey-glide/pull/2050))
* Node: Added PUBSUB support ([#1964](https://github.com/valkey-io/valkey-glide/pull/1964))
* Node: Added PUBSUB * commands ([#2090](https://github.com/valkey-io/valkey-glide/pull/2090))
* Python: Added PUBSUB * commands ([#2043](https://github.com/valkey-io/valkey-glide/pull/2043))
* Node: Added XGROUP CREATE & XGROUP DESTROY commands ([#2084](https://github.com/valkey-io/valkey-glide/pull/2084))
* Node: Added BZPOPMAX & BZPOPMIN command ([#2077]((https://github.com/valkey-io/valkey-glide/pull/2077))
* Node: Added XGROUP CREATECONSUMER & XGROUP DELCONSUMER commands ([#2088](https://github.com/valkey-io/valkey-glide/pull/2088))
* Node: Added GETEX command ([#2107]((https://github.com/valkey-io/valkey-glide/pull/2107))

#### Breaking Changes
* Node: (Refactor) Convert classes to types ([#2005](https://github.com/valkey-io/valkey-glide/pull/2005))
Expand Down
11 changes: 8 additions & 3 deletions benchmarks/node/node_benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import { parse } from "path";
import percentile from "percentile";
import { RedisClientType, createClient, createCluster } from "redis";
import { stdev } from "stats-lite";
import { GlideClient, GlideClusterClient, Logger } from "valkey-glide";
import {
GlideClient,
GlideClusterClient,
GlideString,
Logger,
} from "valkey-glide";
import {
generateKeyGet,
generateKeySet,
Expand All @@ -34,8 +39,8 @@ const runningTasks: Promise<void>[] = [];
const benchJsonResults: object[] = [];

interface IAsyncClient {
set: (key: string, value: string) => Promise<string | "OK" | null>;
get: (key: string) => Promise<string | null>;
set: (key: string, value: string) => Promise<GlideString | "OK" | null>;
get: (key: string) => Promise<GlideString | null>;
}

function chooseAction(): ChosenAction {
Expand Down
51 changes: 51 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
### Kotlin ###
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### Scala ###
target
*.class

### Node ###
*.js

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
.bsp

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
11 changes: 9 additions & 2 deletions examples/java/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Run

Ensure that you have an instance of Valkey running on "localhost" on "6379". Otherwise, update glide.examples.StandaloneExample or glide.examples.ClusterExample with a configuration that matches your server settings.
Ensure that you have a server running on "localhost" on port "6379". To run the ClusterExample, make sure that the server has cluster mode enabled. If the server is running on a different host and/or port, update the StandaloneExample or ClusterExample with a configuration that matches your server settings.

To run the Standalone example:
```
Expand All @@ -12,3 +11,11 @@ To run the Cluster example:
cd valkey-glide/examples/java
./gradlew :runCluster
```

## Version
These examples are running `valkey-glide` version `1.+`. In order to change the version, update the following section in the `build.gradle` file:
```groovy
dependencies {
implementation "io.valkey:valkey-glide:1.+:${osdetector.classifier}"
}
```
22 changes: 22 additions & 0 deletions examples/kotlin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Run
Ensure that you have a server running on "localhost" on port "6379". To run the ClusterExample, make sure that the server has cluster mode enabled. If the server is running on a different host and/or port, update the StandaloneExample or ClusterExample with a configuration that matches your server settings.

To run the Standalone example:
```shell
cd valkey-glide/examples/kotlin
./gradlew runStandalone
```

To run the Cluster example:
```shell
cd valkey-glide/examples/kotlin
./gradlew runCluster
```

## Version
These examples are running `valkey-glide` version `1.+`. In order to change the version, update the following section in the `build.gradle.kts` file:
```kotlin
dependencies {
implementation("io.valkey:valkey-glide:1.+:$classifier")
}
```
51 changes: 51 additions & 0 deletions examples/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
kotlin("jvm") version "1.9.23"
application
id("com.google.osdetector") version "1.7.3"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

val os = osdetector.os
val classifier = osdetector.classifier
fun nettyTransport(): String {
if (os == "osx")
return "netty-transport-native-kqueue"
else if (os == "linux")
return "netty-transport-native-epoll"
else
throw Exception("Unsupported operating system $os")
}

dependencies {
testImplementation(kotlin("test"))
implementation("io.valkey:valkey-glide:1.+:$classifier")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
}

tasks.test {
useJUnitPlatform()
}

kotlin {
jvmToolchain(11)
}

tasks.register<JavaExec>("runStandalone") {
group = "application"
description = "Run the standalone example"
classpath = sourceSets.main.get().runtimeClasspath
mainClass = "glide.examples.StandaloneExample"
}

tasks.register<JavaExec>("runCluster") {
group = "application"
description = "Run the cluster example"
classpath = sourceSets.main.get().runtimeClasspath
mainClass = "glide.examples.ClusterExample"
}
1 change: 1 addition & 0 deletions examples/kotlin/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Binary file added examples/kotlin/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions examples/kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue Jul 09 17:54:28 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f740afb

Please sign in to comment.