From f2ab39475551ec142df05627ea5b1976895e7df7 Mon Sep 17 00:00:00 2001 From: Arpit Bhayani Date: Fri, 13 Dec 2024 15:52:59 +0530 Subject: [PATCH] Community and Team (#1370) --- LICENSE.md => LICENSE | 0 docs/astro.config.mjs | 12 +- docs/public/funding.json | 198 +++++++--------- docs/src/components/Hero.astro | 4 +- docs/src/components/Nav.astro | 13 + docs/src/components/UserSocialHandles.astro | 63 +++++ docs/src/content/config.ts | 20 ++ docs/src/content/docs/commands/DECR.md | 2 +- docs/src/content/docs/commands/EXPIRE.md | 2 +- docs/src/content/docs/commands/EXPIREAT.md | 2 +- docs/src/content/docs/commands/EXPIRETIME.md | 2 +- docs/src/content/docs/commands/GEOPOS.md | 38 ++- docs/src/content/docs/commands/HINCRBY.md | 2 +- .../src/content/docs/commands/HINCRBYFLOAT.md | 2 +- docs/src/content/docs/commands/HRANDFIELD.md | 2 +- docs/src/content/docs/commands/INCR.md | 2 +- docs/src/content/docs/commands/JSON.OBJLEN.md | 18 +- docs/src/content/docs/commands/LINSERT.md | 2 +- docs/src/content/docs/commands/LLEN.md | 2 +- docs/src/content/docs/commands/LPOP.md | 2 +- docs/src/content/docs/commands/LPUSH.md | 2 +- docs/src/content/docs/commands/LRANGE.md | 2 +- docs/src/content/docs/commands/PTTL.md | 2 +- docs/src/content/docs/commands/RPOP.md | 2 +- docs/src/content/docs/commands/RPUSH.md | 2 +- docs/src/content/docs/commands/SETEX.md | 20 +- docs/src/content/docs/commands/SMEMBERS.md | 2 +- docs/src/content/docs/commands/TTL.md | 2 +- docs/src/content/docs/commands/ZRANK.md | 2 +- .../content/docs/get-started/hello-world.mdx | 2 +- .../docs/get-started/realtime-leaderboard.mdx | 2 +- .../content/docs/tutorials/url-shortener.md | 222 ++++++++++-------- docs/src/content/team/apoorv.json | 10 + docs/src/content/team/arpit.json | 10 + docs/src/content/team/ashwin.json | 10 + docs/src/content/team/jyotinder.json | 10 + docs/src/content/team/prashant.json | 10 + docs/src/content/team/prateek.json | 10 + docs/src/content/team/soumya.json | 10 + docs/src/content/updates/2024-07-18.md | 14 ++ docs/src/content/updates/2024-08-01.md | 25 ++ docs/src/content/updates/2024-08-08.md | 47 ++++ docs/src/content/updates/2024-08-15.md | 44 ++++ docs/src/content/updates/2024-08-19.md | 29 +++ docs/src/content/updates/2024-08-22.md | 54 +++++ docs/src/content/updates/2024-08-29.md | 40 ++++ docs/src/content/updates/2024-09-05.md | 43 ++++ docs/src/content/updates/2024-09-12.md | 52 ++++ docs/src/content/updates/2024-09-19.md | 64 +++++ docs/src/content/updates/2024-09-26.md | 54 +++++ docs/src/content/updates/2024-10-03.md | 84 +++++++ docs/src/content/updates/2024-10-10.md | 80 +++++++ docs/src/content/updates/2024-10-17.md | 65 +++++ docs/src/content/updates/2024-10-24.md | 59 +++++ docs/src/content/updates/2024-11-07.md | 35 +++ docs/src/content/updates/2024-11-14.md | 29 +++ docs/src/content/updates/2024-11-21.md | 44 ++++ docs/src/content/updates/2024-11-28.md | 48 ++++ docs/src/content/updates/2024-12-05.md | 21 ++ docs/src/layouts/BlogLayout.astro | 77 +++--- docs/src/layouts/Head.astro | 1 - docs/src/pages/community/index.astro | 69 ++++++ docs/src/pages/team.astro | 122 ++++++++++ docs/src/pages/updates/[slug].astro | 20 ++ 64 files changed, 1645 insertions(+), 295 deletions(-) rename LICENSE.md => LICENSE (100%) create mode 100644 docs/src/components/UserSocialHandles.astro create mode 100644 docs/src/content/team/apoorv.json create mode 100644 docs/src/content/team/arpit.json create mode 100644 docs/src/content/team/ashwin.json create mode 100644 docs/src/content/team/jyotinder.json create mode 100644 docs/src/content/team/prashant.json create mode 100644 docs/src/content/team/prateek.json create mode 100644 docs/src/content/team/soumya.json create mode 100644 docs/src/content/updates/2024-07-18.md create mode 100644 docs/src/content/updates/2024-08-01.md create mode 100644 docs/src/content/updates/2024-08-08.md create mode 100644 docs/src/content/updates/2024-08-15.md create mode 100644 docs/src/content/updates/2024-08-19.md create mode 100644 docs/src/content/updates/2024-08-22.md create mode 100644 docs/src/content/updates/2024-08-29.md create mode 100644 docs/src/content/updates/2024-09-05.md create mode 100644 docs/src/content/updates/2024-09-12.md create mode 100644 docs/src/content/updates/2024-09-19.md create mode 100644 docs/src/content/updates/2024-09-26.md create mode 100644 docs/src/content/updates/2024-10-03.md create mode 100644 docs/src/content/updates/2024-10-10.md create mode 100644 docs/src/content/updates/2024-10-17.md create mode 100644 docs/src/content/updates/2024-10-24.md create mode 100644 docs/src/content/updates/2024-11-07.md create mode 100644 docs/src/content/updates/2024-11-14.md create mode 100644 docs/src/content/updates/2024-11-21.md create mode 100644 docs/src/content/updates/2024-11-28.md create mode 100644 docs/src/content/updates/2024-12-05.md create mode 100644 docs/src/pages/community/index.astro create mode 100644 docs/src/pages/team.astro create mode 100644 docs/src/pages/updates/[slug].astro diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index d3b263be3..90c9a2338 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -15,17 +15,17 @@ export default defineConfig({ // useStarlightDarkModeSwitch: false, favicon: "/favicon.png", editLink: { - baseUrl: 'https://github.com/DiceDB/dice/edit/master/docs/', + baseUrl: "https://github.com/DiceDB/dice/edit/master/docs/", }, lastUpdated: true, expressiveCode: { textMarkers: true, - themes: ['ayu-dark','light-plus'], + themes: ["ayu-dark", "light-plus"], defaultProps: { wrap: true, }, - styleOverrides: { - borderRadius: '0.2rem' + styleOverrides: { + borderRadius: "0.2rem", }, }, sidebar: [ @@ -42,8 +42,8 @@ export default defineConfig({ autogenerate: { directory: "protocols" }, }, { - label: 'Tutorials', - autogenerate: { directory: 'tutorials' } + label: "Tutorials", + autogenerate: { directory: "tutorials" }, }, { label: "Commands", diff --git a/docs/public/funding.json b/docs/public/funding.json index e26b90e43..703ed0d2f 100644 --- a/docs/public/funding.json +++ b/docs/public/funding.json @@ -1,117 +1,101 @@ { "version": "v1.0.0", "entity": { - "type": "organisation", - "role": "owner", + "type": "organisation", + "role": "owner", + "name": "DiceDB", + "email": "arpit@dicedb.io", + "phone": "", + "description": "DiceDB is a redis-compliant, reactive, scalable, highly available, unified cache optimized for modern hardware.", + "webpageUrl": { + "url": "https://dicedb.io" + } + }, + "projects": [ + { + "guid": "dicedb", "name": "DiceDB", - "email": "arpit@dicedb.io", - "phone": "", "description": "DiceDB is a redis-compliant, reactive, scalable, highly available, unified cache optimized for modern hardware.", "webpageUrl": { - "url": "https://dicedb.io" + "url": "https://dicedb.io" + }, + "repositoryUrl": { + "url": "https://github.com/dicedb/dice" + }, + "licenses": ["BSL"], + "tags": ["database", "high-performance", "key-value-store"] + } + ], + "funding": { + "channels": [ + { + "guid": "other", + "type": "other", + "address": "", + "description": "Yet to setup" } - }, - "projects": [ + ], + "plans": [ + { + "guid": "perf-test", + "status": "active", + "name": "Load and performance testing", + "description": "This will cover the monthly server hosting costs to run load tests, performance tests, and CI for core database engine.", + "amount": 5000, + "currency": "USD", + "frequency": "monthly", + "channels": ["other"] + }, { - "guid": "dicedb", - "name": "DiceDB", - "description": "DiceDB is a redis-compliant, reactive, scalable, highly available, unified cache optimized for modern hardware.", - "webpageUrl": { - "url": "https://dicedb.io" - }, - "repositoryUrl": { - "url": "https://github.com/dicedb/dice" - }, - "licenses": [ - "BSL" - ], - "tags": [ - "database", - "high-performance", - "key-value-store" - ] + "guid": "developer-time", + "status": "active", + "name": "Developer compensation", + "description": "This will cover the cost of seven senior engineers working part-time on building DiceDB.", + "amount": 70000, + "currency": "USD", + "frequency": "monthly", + "channels": ["other"] + }, + { + "guid": "commuunity-contributors-and-events", + "status": "active", + "name": "Community swags, events and hackathons", + "description": "This will cover the cost of 160+ OSS contributors by giving them DiceDB swags and keeping their morale high. Some fraction of the funds will also be used to run hackathons and some community events like Database Paper Reading Sessions. We aim to build a thriving community around DiceDB and databases in India.", + "amount": 20000, + "currency": "USD", + "frequency": "monthly", + "channels": ["other"] + }, + { + "guid": "hosting-playground", + "status": "active", + "name": "Hosting Playground", + "description": "This will cover the monthly server hosting costs to run DiceDB and host Playground making it easier for people to try out DiceDB.", + "amount": 4000, + "currency": "USD", + "frequency": "monthly", + "channels": ["other"] + }, + { + "guid": "angel-plan", + "status": "active", + "name": "Goodwill plan", + "description": "Pay anything you wish to show your goodwill for the project.", + "amount": 1000, + "currency": "USD", + "frequency": "one-time", + "channels": ["other"] } - ], - "funding": { - "channels": [ - { - "guid": "other", - "type": "other", - "address": "", - "description": "Yet to setup" - } - ], - "plans": [ - { - "guid": "perf-test", - "status": "active", - "name": "Load and performance testing", - "description": "This will cover the monthly server hosting costs to run load tests, performance tests, and CI for core database engine.", - "amount": 5000, - "currency": "USD", - "frequency": "monthly", - "channels": [ - "other" - ] - }, - { - "guid": "developer-time", - "status": "active", - "name": "Developer compensation", - "description": "This will cover the cost of seven senior engineers working part-time on building DiceDB.", - "amount": 70000, - "currency": "USD", - "frequency": "monthly", - "channels": [ - "other" - ] - }, - { - "guid": "commuunity-contributors-and-events", - "status": "active", - "name": "Community swags, events and hackathons", - "description": "This will cover the cost of 160+ OSS contributors by giving them DiceDB swags and keeping their morale high. Some fraction of the funds will also be used to run hackathons and some community events like Database Paper Reading Sessions. We aim to build a thriving community around DiceDB and databases in India.", - "amount": 20000, - "currency": "USD", - "frequency": "monthly", - "channels": [ - "other" - ] - }, - { - "guid": "hosting-playground", - "status": "active", - "name": "Hosting Playground", - "description": "This will cover the monthly server hosting costs to run DiceDB and host Playground making it easier for people to try out DiceDB.", - "amount": 4000, - "currency": "USD", - "frequency": "monthly", - "channels": [ - "other" - ] - }, - { - "guid": "angel-plan", - "status": "active", - "name": "Goodwill plan", - "description": "Pay anything you wish to show your goodwill for the project.", - "amount": 1000, - "currency": "USD", - "frequency": "one-time", - "channels": [ - "other" - ] - } - ], - "history": [ - { - "year": 2024, - "income": 0, - "expenses": 100, - "taxes": 0, - "currency": "USD", - "description": "Infrastrucuture cost" - } - ] + ], + "history": [ + { + "year": 2024, + "income": 0, + "expenses": 100, + "taxes": 0, + "currency": "USD", + "description": "Infrastrucuture cost" + } + ] } -} \ No newline at end of file +} diff --git a/docs/src/components/Hero.astro b/docs/src/components/Hero.astro index dbe53d9b8..9dd3d46c8 100644 --- a/docs/src/components/Hero.astro +++ b/docs/src/components/Hero.astro @@ -1,7 +1,5 @@ --- -import { Github, MoveRight } from "lucide-astro"; -import Dice from "./Dice.astro"; -import site from "../data/site.json"; +import { Github } from "lucide-astro"; ---
diff --git a/docs/src/components/Nav.astro b/docs/src/components/Nav.astro index 38f5a671e..d153160f9 100644 --- a/docs/src/components/Nav.astro +++ b/docs/src/components/Nav.astro @@ -1,6 +1,7 @@ --- const pathname = new URL(Astro.request.url).pathname; const currentPage = pathname.split("/")[1]; +const currentSubPage = pathname.split("/")[2]; // To identify subpages under "community" import SocialHandlesIcons from "./SocialHandlesIcons.astro"; --- @@ -50,6 +51,18 @@ import SocialHandlesIcons from "./SocialHandlesIcons.astro"; > Blog + + Community + + + Team + diff --git a/docs/src/components/UserSocialHandles.astro b/docs/src/components/UserSocialHandles.astro new file mode 100644 index 000000000..ffc531408 --- /dev/null +++ b/docs/src/components/UserSocialHandles.astro @@ -0,0 +1,63 @@ +--- +import { Twitter, Github, Linkedin, Globe } from "lucide-astro"; +const { x, github, linkedin, website } = Astro.props; +--- + + diff --git a/docs/src/content/config.ts b/docs/src/content/config.ts index 28a0c6e25..7713bcd56 100644 --- a/docs/src/content/config.ts +++ b/docs/src/content/config.ts @@ -31,9 +31,29 @@ const releases = defineCollection({ }), }); +const updates = defineCollection({ + type: "content", + schema: z.object({}), +}); + +const team = defineCollection({ + type: "data", + schema: z.object({ + name: z.string(), + avatar_url: z.string(), + roles: z.array(z.string()), + x: z.string(), + linkedin: z.string(), + github: z.string(), + website: z.string(), + }), +}); + export const collections = { blog, authors, releases, + team, + updates, docs: defineCollection({ schema: docsSchema() }), }; diff --git a/docs/src/content/docs/commands/DECR.md b/docs/src/content/docs/commands/DECR.md index e63ce4549..d813bf206 100644 --- a/docs/src/content/docs/commands/DECR.md +++ b/docs/src/content/docs/commands/DECR.md @@ -100,4 +100,4 @@ OK ## Alternatives -You can also use the [`DECRBY`](/commands/decrby) command to decrement the value of a key by a specified amount. \ No newline at end of file +You can also use the [`DECRBY`](/commands/decrby) command to decrement the value of a key by a specified amount. diff --git a/docs/src/content/docs/commands/EXPIRE.md b/docs/src/content/docs/commands/EXPIRE.md index f31ce0d89..fe4954a5c 100644 --- a/docs/src/content/docs/commands/EXPIRE.md +++ b/docs/src/content/docs/commands/EXPIRE.md @@ -103,4 +103,4 @@ This example shows what happens when trying to set an expiration on a non-existe ## Alternatives -- Use [`EXPIREAT`](/commands/expireat) command for more precise expiration control based on Unix timestamps \ No newline at end of file +- Use [`EXPIREAT`](/commands/expireat) command for more precise expiration control based on Unix timestamps diff --git a/docs/src/content/docs/commands/EXPIREAT.md b/docs/src/content/docs/commands/EXPIREAT.md index 933050530..582d612a6 100644 --- a/docs/src/content/docs/commands/EXPIREAT.md +++ b/docs/src/content/docs/commands/EXPIREAT.md @@ -144,4 +144,4 @@ OK ## Alternatives -- Use [`EXPIRE`](/commands/expire) command for simpler expiration control based on relative time \ No newline at end of file +- Use [`EXPIRE`](/commands/expire) command for simpler expiration control based on relative time diff --git a/docs/src/content/docs/commands/EXPIRETIME.md b/docs/src/content/docs/commands/EXPIRETIME.md index ededacc4c..e235174d5 100644 --- a/docs/src/content/docs/commands/EXPIRETIME.md +++ b/docs/src/content/docs/commands/EXPIRETIME.md @@ -76,4 +76,4 @@ In this example, the key `nonExistentKey` does not exist in the database. The `E ## Alternatives - Use [`TTL`](/commands/ttl) to get relative expiration times -- Use [`PTTL`](/commands/pttl) to get relative expiration times in milliseconds \ No newline at end of file +- Use [`PTTL`](/commands/pttl) to get relative expiration times in milliseconds diff --git a/docs/src/content/docs/commands/GEOPOS.md b/docs/src/content/docs/commands/GEOPOS.md index 2d2d16ae7..049908eb9 100644 --- a/docs/src/content/docs/commands/GEOPOS.md +++ b/docs/src/content/docs/commands/GEOPOS.md @@ -1,6 +1,6 @@ --- title: GEOPOS -description: The `GEOPOS` command in DiceDB is used to return the longitude, latitude to a specified key, as stored in the sorted set. +description: The `GEOPOS` command in DiceDB is used to return the longitude, latitude to a specified key, as stored in the sorted set. --- The `GEOPOS` command in DiceDB is used to return the longitude, latitude to a specified key which is stored in a sorted set. When elements are added via `GEOADD` then they are stored in 52 bit geohash hence the values returned by `GEOPOS` might have small margins of error. @@ -10,29 +10,37 @@ The `GEOPOS` command in DiceDB is used to return the longitude, latitude to a sp ```bash GEOPOS key [member [member ...]] ``` + ## Parameters -| Parameter | Description | Type | Required | -| --------- | --------------------------------------------------------------------------------- | ------ | -------- | -| key | The name of the sorted set key whose member's coordinates are to be returned | string | Yes | -| member | A unique identifier for the location. | string | Yes | + +| Parameter | Description | Type | Required | +| --------- | ---------------------------------------------------------------------------- | ------ | -------- | +| key | The name of the sorted set key whose member's coordinates are to be returned | string | Yes | +| member | A unique identifier for the location. | string | Yes | + ## Return Values -| Condition | Return Value | -| ------------------------------------------------------------ | ----------------------------------------------------------- | -| Coordinates exist for the specified member(s) | Returns an ordered list of coordinates (longitude, latitude) for each specified member | -| Coordinates do not exist for the specified member(s) | Returns `(nil)` for each member without coordinates -| Incorrect Argument Count |`ERR wrong number of arguments for 'geopos' command` | -| Key does not exist in the sorted set |`Error: nil` | + +| Condition | Return Value | +| ---------------------------------------------------- | -------------------------------------------------------------------------------------- | +| Coordinates exist for the specified member(s) | Returns an ordered list of coordinates (longitude, latitude) for each specified member | +| Coordinates do not exist for the specified member(s) | Returns `(nil)` for each member without coordinates | +| Incorrect Argument Count | `ERR wrong number of arguments for 'geopos' command` | +| Key does not exist in the sorted set | `Error: nil` | + ## Behaviour + When the GEOPOS command is issued, DiceDB performs the following steps: + 1. It checks if argument count is valid or not. If not an error is thrown. 2. It checks the validity of the key. 3. If the key is invalid then an error is returned. 4. Else it checks the members provided after the key. 5. For each member it checks the coordinates of the member. 6. If the coordinates exist then it is returned in an ordered list of latitude, longitude for the particular member. -7. If the coordinates do not exist then a ``(nil)`` is returned for that member. +7. If the coordinates do not exist then a `(nil)` is returned for that member. ## Errors + 1. `Wrong number of arguments for 'GEOPOS' command` - Error Message: (error) ERR wrong number of arguments for 'geoadd' command. - Occurs when the command is executed with an incorrect number of arguments. @@ -43,7 +51,9 @@ When the GEOPOS command is issued, DiceDB performs the following steps: ## Example Usage Here are a few examples demonstrating the usage of the GEOPOS command: + ### Example: Fetching the latitude, longitude of an existing member of the set + ```bash 127.0.0.1:7379> GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" 2 @@ -51,8 +61,10 @@ Here are a few examples demonstrating the usage of the GEOPOS command: 1) 1) 13.361387 2) 38.115556 ``` + ### Example: Fetching the latitude, longitude of a member not in the set + ```bash 127.0.0.1:7379> GEOPOS Sicily "Agrigento" 1) (nil) -``` \ No newline at end of file +``` diff --git a/docs/src/content/docs/commands/HINCRBY.md b/docs/src/content/docs/commands/HINCRBY.md index 1261719da..a975b87d2 100644 --- a/docs/src/content/docs/commands/HINCRBY.md +++ b/docs/src/content/docs/commands/HINCRBY.md @@ -157,4 +157,4 @@ Incrementing the hash value with a very large integer results in an integer over ## Notes -- The `HINCRBY` command is a powerful tool for managing counters and numerical values stored in hash fields, making it essential for applications that rely on incremental updates. \ No newline at end of file +- The `HINCRBY` command is a powerful tool for managing counters and numerical values stored in hash fields, making it essential for applications that rely on incremental updates. diff --git a/docs/src/content/docs/commands/HINCRBYFLOAT.md b/docs/src/content/docs/commands/HINCRBYFLOAT.md index 3f12489f8..1d9d464a2 100644 --- a/docs/src/content/docs/commands/HINCRBYFLOAT.md +++ b/docs/src/content/docs/commands/HINCRBYFLOAT.md @@ -136,4 +136,4 @@ Executing `hincrbyfloat` with a string increment value - The `HINCRBYFLOAT` command is a powerful tool for managing floating-point counters and numerical values stored in hash fields, making it essential for applications that require precision in incremental updates. - The command operates atomically, meaning it will complete without interruption, making it safe to use in concurrent environments where multiple clients may modify the same hash fields. -- `HINCRBYFLOAT` can be beneficial in scenarios such as tracking scores in a game, maintaining balances in accounts, or managing quantities in inventory systems where floating-point values are common. \ No newline at end of file +- `HINCRBYFLOAT` can be beneficial in scenarios such as tracking scores in a game, maintaining balances in accounts, or managing quantities in inventory systems where floating-point values are common. diff --git a/docs/src/content/docs/commands/HRANDFIELD.md b/docs/src/content/docs/commands/HRANDFIELD.md index 4fe6811c6..173643e1b 100644 --- a/docs/src/content/docs/commands/HRANDFIELD.md +++ b/docs/src/content/docs/commands/HRANDFIELD.md @@ -128,4 +128,4 @@ Passing invalid number of arguments to the `hrandfield` command ## Notes - The `HRANDFIELD` command is useful for scenarios where random selection from hash fields is required, such as in games, lotteries, or randomized surveys. -- The command can return multiple fields at once, allowing for efficient random sampling without the need for multiple calls. This can be particularly advantageous when working with larger hashes. \ No newline at end of file +- The command can return multiple fields at once, allowing for efficient random sampling without the need for multiple calls. This can be particularly advantageous when working with larger hashes. diff --git a/docs/src/content/docs/commands/INCR.md b/docs/src/content/docs/commands/INCR.md index 208658e4d..15210f268 100644 --- a/docs/src/content/docs/commands/INCR.md +++ b/docs/src/content/docs/commands/INCR.md @@ -94,4 +94,4 @@ Incrementing a key `mykey` with a value that exceeds the maximum integer value: ## Alternatives - You can also use the [`INCRBY`](/commands/incrby) command to increment the value of a key by a specified amount. -- You can also use the [`INCRBYFLOAT`](/commands/incrbyfloat) command to increment the value of a key by a fractional amount. \ No newline at end of file +- You can also use the [`INCRBYFLOAT`](/commands/incrbyfloat) command to increment the value of a key by a fractional amount. diff --git a/docs/src/content/docs/commands/JSON.OBJLEN.md b/docs/src/content/docs/commands/JSON.OBJLEN.md index 5c756348c..a92289c06 100644 --- a/docs/src/content/docs/commands/JSON.OBJLEN.md +++ b/docs/src/content/docs/commands/JSON.OBJLEN.md @@ -22,13 +22,13 @@ JSON.OBJLEN key [path] ## Return values -| Condition | Return Value | -| ------------------------------- | ------------------------------------------------------------------------------------------- | -| Command is successful | `Integer` denoting the number of keys length of the list at the specified key. | -| Wrong number of arguments | Error: `(error) ERR wrong number of arguments for JSON.OBJLEN command` | -| Key does not exist | Error: `(error) ERR could not perform this operation on a key that doesn't exist` | -| Key is not for a JSON object | Error: `(error) ERR WRONGTYPE Operation against a key holding the wrong kind of value` | -| Path malformed or doesn't exist | Error: `(error) ERR Path 'foo' does not exist` | +| Condition | Return Value | +| ------------------------------- | -------------------------------------------------------------------------------------- | +| Command is successful | `Integer` denoting the number of keys length of the list at the specified key. | +| Wrong number of arguments | Error: `(error) ERR wrong number of arguments for JSON.OBJLEN command` | +| Key does not exist | Error: `(error) ERR could not perform this operation on a key that doesn't exist` | +| Key is not for a JSON object | Error: `(error) ERR WRONGTYPE Operation against a key holding the wrong kind of value` | +| Path malformed or doesn't exist | Error: `(error) ERR Path 'foo' does not exist` | ## Behaviour @@ -70,15 +70,16 @@ Get number of keys in the Root JSON Object. You can specify the JSON root using 127.0.0.1:7379> JSON.OBJLEN a $ 1) 3 ``` + It returns 3, because there are three root keys in the root JSON object: `name`, `age`, and `address`. Or, if you don't want to specify a JSON path, it may be omitted. The path defaults to the root, and the result is given as a scalar: + ```bash 127.0.0.1:7379> JSON.OBJLEN a 3 ``` - ### Keys inside nested object To count the number of keys inside a nested object, specify a JSON Path. The root of the JSON object is referred to by the `$` symbol. @@ -89,6 +90,7 @@ To count the number of keys inside a nested object, specify a JSON Path. The roo 127.0.0.1:7379> JSON.OBJLEN b $.address 1) 3 ``` + Here, it returns 3 because it's counting the three keys inside the `$.address` JSON object: `city`, `state`, and `zipcode`. ### When path is not a JSON object diff --git a/docs/src/content/docs/commands/LINSERT.md b/docs/src/content/docs/commands/LINSERT.md index c00f4858d..7be8ba0a7 100644 --- a/docs/src/content/docs/commands/LINSERT.md +++ b/docs/src/content/docs/commands/LINSERT.md @@ -98,4 +98,4 @@ OK - Check Key Type: Before using `LINSERT`, ensure that the key is associated with a list to avoid errors. - Handle Non-Existent Keys: Be prepared to handle the case where the key does not exist, as `LINSERT` will return `0` in such scenarios. -- Use in Conjunction with Other List Commands: The `LINSERT` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. \ No newline at end of file +- Use in Conjunction with Other List Commands: The `LINSERT` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. diff --git a/docs/src/content/docs/commands/LLEN.md b/docs/src/content/docs/commands/LLEN.md index 2c70581f1..a0b501419 100644 --- a/docs/src/content/docs/commands/LLEN.md +++ b/docs/src/content/docs/commands/LLEN.md @@ -84,4 +84,4 @@ OK - Check Key Type: Before using `LLEN`, ensure that the key is associated with a list to avoid errors. - Handle Non-Existent Keys: Be prepared to handle the case where the key does not exist, as `LLEN` will return `0` in such scenarios. -- Use in Conjunction with Other List Commands: The `LLEN` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. \ No newline at end of file +- Use in Conjunction with Other List Commands: The `LLEN` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. diff --git a/docs/src/content/docs/commands/LPOP.md b/docs/src/content/docs/commands/LPOP.md index fcf6e9249..54918e521 100644 --- a/docs/src/content/docs/commands/LPOP.md +++ b/docs/src/content/docs/commands/LPOP.md @@ -113,4 +113,4 @@ LPOP mylist secondlist - `Handle Non-Existent Keys`: Be prepared to handle the case where the key does not exist, as `LPOP` will return `nil` in such scenarios. - `Use in Conjunction with Other List Commands`: The `LPOP` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LLEN`](/commands/llen), and [`RPOP`](/commands/rpop) to manage and process lists effectively. -By understanding and using the `LPOP` command effectively, you can manage list data structures in DiceDB efficiently, implementing queue-like behaviors and more. \ No newline at end of file +By understanding and using the `LPOP` command effectively, you can manage list data structures in DiceDB efficiently, implementing queue-like behaviors and more. diff --git a/docs/src/content/docs/commands/LPUSH.md b/docs/src/content/docs/commands/LPUSH.md index f5829e860..f882c774f 100644 --- a/docs/src/content/docs/commands/LPUSH.md +++ b/docs/src/content/docs/commands/LPUSH.md @@ -101,4 +101,4 @@ LPUSH mylist - `Use in Conjunction with Other List Commands`: The `LPUSH` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LLEN`](/commands/llen), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. - The `LPUSH` command can be used to implement a stack (LIFO) by always pushing new elements to the head of the list. -By understanding the `LPUSH` command, you can efficiently manage lists in DiceDB, ensuring that elements are added to the head of the list as needed. \ No newline at end of file +By understanding the `LPUSH` command, you can efficiently manage lists in DiceDB, ensuring that elements are added to the head of the list as needed. diff --git a/docs/src/content/docs/commands/LRANGE.md b/docs/src/content/docs/commands/LRANGE.md index 4e4d62381..76023960d 100644 --- a/docs/src/content/docs/commands/LRANGE.md +++ b/docs/src/content/docs/commands/LRANGE.md @@ -111,4 +111,4 @@ OK - Check Key Type: Before using `LRANGE`, ensure that the key is associated with a list to avoid errors. - Handle Non-Existent Keys: Be prepared to handle the case where the key does not exist, as `LRANGE` will return an empty array in such scenarios. -- Use in Conjunction with Other List Commands: The `LRANGE` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. \ No newline at end of file +- Use in Conjunction with Other List Commands: The `LRANGE` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. diff --git a/docs/src/content/docs/commands/PTTL.md b/docs/src/content/docs/commands/PTTL.md index 933466427..43d998eb4 100644 --- a/docs/src/content/docs/commands/PTTL.md +++ b/docs/src/content/docs/commands/PTTL.md @@ -85,4 +85,4 @@ In this example, the `PTTL` command is used with an extra argument. This results ## Alternatives -- [`TTL`](/commands/ttl): Similar to `PTTL` but returns the time-to-live in seconds instead of milliseconds \ No newline at end of file +- [`TTL`](/commands/ttl): Similar to `PTTL` but returns the time-to-live in seconds instead of milliseconds diff --git a/docs/src/content/docs/commands/RPOP.md b/docs/src/content/docs/commands/RPOP.md index 0fb5407cf..941e43165 100644 --- a/docs/src/content/docs/commands/RPOP.md +++ b/docs/src/content/docs/commands/RPOP.md @@ -91,4 +91,4 @@ RPOP mylist secondlist - `Handle Non-Existent Keys`: Be prepared to handle the case where the key does not exist, as `RPOP` will return `nil` in such scenarios. - `Use in Conjunction with Other List Commands`: The `RPOP` command is often used alongside other list commands like [`RPUSH`](/commands/rpush), [`LPUSH`](/commands/lpush), [`LLEN`](/commands/llen), and [`LPOP`](/commands/lpop) to manage and process lists effectively. -By understanding the `RPOP` command, you can effectively manage lists in DiceDB, ensuring that you can retrieve and process elements in a LIFO order. \ No newline at end of file +By understanding the `RPOP` command, you can effectively manage lists in DiceDB, ensuring that you can retrieve and process elements in a LIFO order. diff --git a/docs/src/content/docs/commands/RPUSH.md b/docs/src/content/docs/commands/RPUSH.md index b8163e382..f6fce3d65 100644 --- a/docs/src/content/docs/commands/RPUSH.md +++ b/docs/src/content/docs/commands/RPUSH.md @@ -87,4 +87,4 @@ RPUSH mylist ## Best Practices - `Check Key Type`: Before using `RPUSH`, ensure that the key is associated with a list to avoid errors. -- `Use in Conjunction with Other List Commands`: The `RPUSH` command is often used alongside other list commands like [`LLEN`](/commands/llen), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. \ No newline at end of file +- `Use in Conjunction with Other List Commands`: The `RPUSH` command is often used alongside other list commands like [`LLEN`](/commands/llen), [`LPUSH`](/commands/lpush), [`LPOP`](/commands/lpop), and [`RPOP`](/commands/rpop) to manage and process lists effectively. diff --git a/docs/src/content/docs/commands/SETEX.md b/docs/src/content/docs/commands/SETEX.md index 7415a2173..4567d66e5 100644 --- a/docs/src/content/docs/commands/SETEX.md +++ b/docs/src/content/docs/commands/SETEX.md @@ -17,18 +17,18 @@ SETEX key seconds value ## Parameters -| Parameter | Description | Type | Required | -| --------- | ------------------------------------------------------------------------- | ------- | -------- | -| `key` | The name of the key to be set. | String | Yes | -| `seconds` | Expiration time for the key in seconds. | Integer | Yes | -| `value` | The value to be set for the key. | Integer | No | +| Parameter | Description | Type | Required | +| --------- | --------------------------------------- | ------- | -------- | +| `key` | The name of the key to be set. | String | Yes | +| `seconds` | Expiration time for the key in seconds. | Integer | Yes | +| `value` | The value to be set for the key. | Integer | No | ## Return values -| Condition | Return Value | -| ------------------------------------------- | ----------------------------------------------- | -| Command is successful | `OK` | -| Syntax or specified constraints are invalid | error | +| Condition | Return Value | +| ------------------------------------------- | ------------ | +| Command is successful | `OK` | +| Syntax or specified constraints are invalid | error | ## Behaviour @@ -78,10 +78,12 @@ Setting a key with an invalid expiration time will result in an error: ``` Attempting to use the command with missing arguments will result in an error: + ```bash 127.0.0.1:7379> SETEX foo 10 (error) ERROR wrong number of arguments for 'setex' command ``` ### Notes: + `SETEX` can be replaced via [`SET`](/commands/set) with `EX` option. diff --git a/docs/src/content/docs/commands/SMEMBERS.md b/docs/src/content/docs/commands/SMEMBERS.md index 1d7c23157..0207ba100 100644 --- a/docs/src/content/docs/commands/SMEMBERS.md +++ b/docs/src/content/docs/commands/SMEMBERS.md @@ -89,4 +89,4 @@ OK 1. The command returns all members at once, which may impact performance for very large sets 2. The order of returned elements is not guaranteed and may vary between calls 3. Memory usage scales linearly with the size of the set -4. This command has O(N) time complexity where N is the set size \ No newline at end of file +4. This command has O(N) time complexity where N is the set size diff --git a/docs/src/content/docs/commands/TTL.md b/docs/src/content/docs/commands/TTL.md index aef736326..8d6779091 100644 --- a/docs/src/content/docs/commands/TTL.md +++ b/docs/src/content/docs/commands/TTL.md @@ -85,4 +85,4 @@ In this example, the `TTL` command is used with an extra argument. This results ## Alternatives -- [`PTTL`](/commands/pttl): Similar to `TTL` but returns the time-to-live in milliseconds instead of seconds \ No newline at end of file +- [`PTTL`](/commands/pttl): Similar to `TTL` but returns the time-to-live in milliseconds instead of seconds diff --git a/docs/src/content/docs/commands/ZRANK.md b/docs/src/content/docs/commands/ZRANK.md index 777dc027f..1ff619d05 100644 --- a/docs/src/content/docs/commands/ZRANK.md +++ b/docs/src/content/docs/commands/ZRANK.md @@ -80,4 +80,4 @@ Retrieve both the rank and the score of `member2` in the sorted set `myzset`: ## Notes -- This command is particularly useful for implementing leaderboards, pagination in ranked lists, and analytics on data distribution. \ No newline at end of file +- This command is particularly useful for implementing leaderboards, pagination in ranked lists, and analytics on data distribution. diff --git a/docs/src/content/docs/get-started/hello-world.mdx b/docs/src/content/docs/get-started/hello-world.mdx index 5cd0621a4..692dc26a3 100644 --- a/docs/src/content/docs/get-started/hello-world.mdx +++ b/docs/src/content/docs/get-started/hello-world.mdx @@ -17,7 +17,7 @@ You can follow the steps mentioned in the [installation](/get-started/installati Once the DiceDB server starts, you will see output similar to this ``` - ██████╗ ██╗ ██████╗███████╗██████╗ ██████╗ + ██████╗ ██╗ ██████╗███████╗██████╗ ██████╗ ██╔══██╗██║██╔════╝██╔════╝██╔══██╗██╔══██╗ ██║ ██║██║██║ █████╗ ██║ ██║██████╔╝ ██║ ██║██║██║ ██╔══╝ ██║ ██║██╔══██╗ diff --git a/docs/src/content/docs/get-started/realtime-leaderboard.mdx b/docs/src/content/docs/get-started/realtime-leaderboard.mdx index b47d0e38b..b59ee1ad9 100644 --- a/docs/src/content/docs/get-started/realtime-leaderboard.mdx +++ b/docs/src/content/docs/get-started/realtime-leaderboard.mdx @@ -32,7 +32,7 @@ docker run -p 7379:7379 dicedb/dicedb --enable-watch Once the DiceDB server starts, you will see output similar to this ``` - ██████╗ ██╗ ██████╗███████╗██████╗ ██████╗ + ██████╗ ██╗ ██████╗███████╗██████╗ ██████╗ ██╔══██╗██║██╔════╝██╔════╝██╔══██╗██╔══██╗ ██║ ██║██║██║ █████╗ ██║ ██║██████╔╝ ██║ ██║██║██║ ██╔══╝ ██║ ██║██╔══██╗ diff --git a/docs/src/content/docs/tutorials/url-shortener.md b/docs/src/content/docs/tutorials/url-shortener.md index fb47fd2d6..40d790e9c 100644 --- a/docs/src/content/docs/tutorials/url-shortener.md +++ b/docs/src/content/docs/tutorials/url-shortener.md @@ -13,15 +13,19 @@ This tutorial guides you through creating a URL shortener using DiceDB, a key-va ## Setup ### 1. Install and Run DiceDB + Start a DiceDB server using Docker: -```bash + +```bash docker run -d -p 7379:7379 dicedb/dicedb ``` - + This command pulls the DiceDB Docker image and runs it, exposing it on port `7379`. ### 2. Initialize a New Go Project + Create a new directory for your project and initialize a Go module: + ```bash mkdir url-shortener cd url-shortener @@ -29,7 +33,9 @@ go mod init url-shortener ``` ### 3. Install Required Packages + Install the DiceDB Go SDK and other dependencies: + ```bash go get github.com/dicedb/dicedb-go go get github.com/gin-gonic/gin @@ -37,119 +43,130 @@ go get github.com/google/uuid ``` ## Understanding DiceDB Commands + We'll use the following DiceDB commands: + ### `SET` Command + Stores a key-value pair in DiceDB. + - **Syntax**: `SET key value [expiration]` - `key`: Unique identifier (e.g., short URL code) - `value`: Data to store (e.g., serialized JSON) - `expiration`: Optional; time-to-live in seconds (use `0` for no expiration) + ### `GET` Command + Retrieves the value associated with a key. + - **Syntax**: `GET key` - `key`: Identifier for the data to retrieve ## Writing the Code + Create a file named `main.go` and add the following code: - `main.go`: - ```go - package main - - import ( - "context" - "encoding/json" - "log" - "net/http" - - "github.com/gin-gonic/gin" - "github.com/google/uuid" - "github.com/dicedb/dicedb-go" // DiceDB Go SDK - ) - - type URL struct { - ID string `json:"id"` - LongURL string `json:"long_url"` - ShortURL string `json:"short_url"` - } - - var db *dicedb.Client - - // Initialize DiceDB connection - func init() { - db = dicedb.NewClient(&dicedb.Options{ - Addr: "localhost:7379", - }) - } - - // Creates a short URL from a given long URL - func CreateShortURL(c *gin.Context) { - var requestBody URL - if err := c.ShouldBindJSON(&requestBody); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"}) - return - } - - // Generate unique short ID and construct the short URL - shortID := uuid.New().String()[:8] - requestBody.ID = shortID - requestBody.ShortURL = "http://localhost:8080/" + shortID - - // Serialize URL struct to JSON and store it in DiceDB - urlData, err := json.Marshal(requestBody) - if err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to save URL"}) - return - } - - if err := db.Set(context.Background(), shortID, urlData, 0).Err(); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to save URL"}) - return - } - - c.JSON(http.StatusCreated, gin.H{"short_url": requestBody.ShortURL}) - } - - // Redirects to the original URL based on the short URL ID - func RedirectURL(c *gin.Context) { - id := c.Param("id") - - // Retrieve stored URL data from DiceDB - urlData, err := db.Get(context.Background(), id).Result() - if err != nil { - c.JSON(http.StatusNotFound, gin.H{"error": "URL not found"}) - return - } - - // Deserialize JSON data back into URL struct - var url URL - if err := json.Unmarshal([]byte(urlData), &url); err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to decode URL data"}) - return - } - - // Redirect user to the original long URL - c.Redirect(http.StatusFound, url.LongURL) - } - - func main() { - router := gin.Default() - - // Define endpoints for creating short URLs and redirecting - router.POST("/shorten", CreateShortURL) - router.GET("/:id", RedirectURL) - - // Start the server on port 8080 - if err := router.Run(":8080"); err != nil { - log.Fatal("Failed to start server:", err) - } - } - ``` + + ```go + package main + + import ( + "context" + "encoding/json" + "log" + "net/http" + + "github.com/gin-gonic/gin" + "github.com/google/uuid" + "github.com/dicedb/dicedb-go" // DiceDB Go SDK + ) + + type URL struct { + ID string `json:"id"` + LongURL string `json:"long_url"` + ShortURL string `json:"short_url"` + } + + var db *dicedb.Client + + // Initialize DiceDB connection + func init() { + db = dicedb.NewClient(&dicedb.Options{ + Addr: "localhost:7379", + }) + } + + // Creates a short URL from a given long URL + func CreateShortURL(c *gin.Context) { + var requestBody URL + if err := c.ShouldBindJSON(&requestBody); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"}) + return + } + + // Generate unique short ID and construct the short URL + shortID := uuid.New().String()[:8] + requestBody.ID = shortID + requestBody.ShortURL = "http://localhost:8080/" + shortID + + // Serialize URL struct to JSON and store it in DiceDB + urlData, err := json.Marshal(requestBody) + if err != nil { + c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to save URL"}) + return + } + + if err := db.Set(context.Background(), shortID, urlData, 0).Err(); err != nil { + c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to save URL"}) + return + } + + c.JSON(http.StatusCreated, gin.H{"short_url": requestBody.ShortURL}) + } + + // Redirects to the original URL based on the short URL ID + func RedirectURL(c *gin.Context) { + id := c.Param("id") + + // Retrieve stored URL data from DiceDB + urlData, err := db.Get(context.Background(), id).Result() + if err != nil { + c.JSON(http.StatusNotFound, gin.H{"error": "URL not found"}) + return + } + + // Deserialize JSON data back into URL struct + var url URL + if err := json.Unmarshal([]byte(urlData), &url); err != nil { + c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to decode URL data"}) + return + } + + // Redirect user to the original long URL + c.Redirect(http.StatusFound, url.LongURL) + } + + func main() { + router := gin.Default() + + // Define endpoints for creating short URLs and redirecting + router.POST("/shorten", CreateShortURL) + router.GET("/:id", RedirectURL) + + // Start the server on port 8080 + if err := router.Run(":8080"); err != nil { + log.Fatal("Failed to start server:", err) + } + } + ``` ## Explanation ### 1. Initialize the DiceDB Client + We set up the DiceDB client in the `init` function: + ```go db = dicedb.NewClient(&dicedb.Options{ Addr: "localhost:7379", @@ -157,6 +174,7 @@ db = dicedb.NewClient(&dicedb.Options{ ``` ### 2. Create Short URL Endpoint + - **Input Validation**: Ensures the `long_url` field is present. - **Short ID Generation**: Uses `uuid` to create a unique 8-character ID. - **Data Serialization**: Converts the `URL` struct to JSON. @@ -164,50 +182,62 @@ db = dicedb.NewClient(&dicedb.Options{ - **Response**: Returns the generated short URL. ### 3. Redirect to Original URL Endpoint + - **Data Retrieval**: Fetches the URL data from DiceDB using the `Get` command. - **Data Deserialization**: Converts JSON back to the `URL` struct. - **Redirection**: Redirects the user to the `LongURL`. ### 4. Start the Server + The `main` function sets up the routes and starts the server on port `8080`. ## Running the Application ### 1. Start the Go Application + ```bash go run main.go ``` + This will start the application server on port 8080 by default, you should see output similar to + ```bash [GIN-debug] Listening and serving HTTP on :8080 ``` ### 2. Ensure DiceDB is Running + Ensure your DiceDB server is up and running on port `7379`. ## Testing the application ### 1. Shorten URL: + **Using `curl`:** + ```bash curl -X POST -H "Content-Type: application/json" -d '{"long_url": "https://example.com"}' http://localhost:8080/shorten ``` **Response:** + ```json { -"short_url": "http://localhost:8080/" + "short_url": "http://localhost:8080/" } ``` ### 2. Redirect to Original URL: + **Using `curl`:** + ```bash curl -L http://localhost:8080/abcd1234 ``` - + **Using a Browser:** Navigate to: + ``` http://localhost:8080/abcd1234 ``` diff --git a/docs/src/content/team/apoorv.json b/docs/src/content/team/apoorv.json new file mode 100644 index 000000000..737063252 --- /dev/null +++ b/docs/src/content/team/apoorv.json @@ -0,0 +1,10 @@ +{ + "name": "Apoorv Yadav", + "avatar_url": "https://avatars.githubusercontent.com/u/32174554?v=4", + "url": "", + "x": "", + "linkedin": "https://www.linkedin.com/in/yadavapoorv/", + "github": "https://github.com/apoorvyadav1111", + "website": "", + "roles": ["committer"] +} diff --git a/docs/src/content/team/arpit.json b/docs/src/content/team/arpit.json new file mode 100644 index 000000000..cc1a4c814 --- /dev/null +++ b/docs/src/content/team/arpit.json @@ -0,0 +1,10 @@ +{ + "name": "Arpit Bhayani", + "avatar_url": "https://edge.arpitbhayani.me/img/arpit-2.png", + "url": "https://arpitbhayani.me/", + "x": "https://x.com/arpit_bhayani", + "linkedin": "https://linkedin.com/in/arpitbhayani", + "github": "https://github.com/arpitbbhayani", + "website": "https://arpitbhayani.me/", + "roles": ["pmc"] +} diff --git a/docs/src/content/team/ashwin.json b/docs/src/content/team/ashwin.json new file mode 100644 index 000000000..bfc98426b --- /dev/null +++ b/docs/src/content/team/ashwin.json @@ -0,0 +1,10 @@ +{ + "name": "Ashwin Kulkarni", + "avatar_url": "https://avatars.githubusercontent.com/u/19169648?v=4", + "url": "", + "x": "https://x.com/ashwinkulkarni4", + "linkedin": "https://www.linkedin.com/in/iashwin28/", + "github": "https://github.com/AshwinKul28", + "website": "", + "roles": ["pmc"] +} diff --git a/docs/src/content/team/jyotinder.json b/docs/src/content/team/jyotinder.json new file mode 100644 index 000000000..b6ad4984b --- /dev/null +++ b/docs/src/content/team/jyotinder.json @@ -0,0 +1,10 @@ +{ + "name": "Jyotinder Singh", + "avatar_url": "https://avatars.githubusercontent.com/u/33001894?v=4", + "url": "https://jyotindersingh.com/", + "x": "https://x.com/Jyotinder_Singh", + "linkedin": "https://linkedin.com/in/jyotinder-singh", + "github": "https://github.com/JyotinderSingh", + "website": "https://jyotindersingh.com/", + "roles": ["pmc"] +} diff --git a/docs/src/content/team/prashant.json b/docs/src/content/team/prashant.json new file mode 100644 index 000000000..561ce56ec --- /dev/null +++ b/docs/src/content/team/prashant.json @@ -0,0 +1,10 @@ +{ + "name": "Prashant Shubham", + "avatar_url": "https://avatars.githubusercontent.com/u/13472823?v=4", + "url": "https://prasha.me", + "x": "https://x.com/prashacr7", + "linkedin": "https://www.linkedin.com/in/prashant-shubham07", + "github": "https://github.com/lucifercr07", + "website": "https://prasha.me", + "roles": ["pmc"] +} diff --git a/docs/src/content/team/prateek.json b/docs/src/content/team/prateek.json new file mode 100644 index 000000000..c62fc8bf0 --- /dev/null +++ b/docs/src/content/team/prateek.json @@ -0,0 +1,10 @@ +{ + "name": "Prateek Rathore", + "avatar_url": "https://avatars.githubusercontent.com/u/25244718?v=4", + "url": "", + "x": "https://twitter.com/psrvere", + "linkedin": "https://www.linkedin.com/in/prateek-singh-rathore/", + "github": "https://github.com/psrvere", + "website": "", + "roles": ["committer"] +} diff --git a/docs/src/content/team/soumya.json b/docs/src/content/team/soumya.json new file mode 100644 index 000000000..584d42e0a --- /dev/null +++ b/docs/src/content/team/soumya.json @@ -0,0 +1,10 @@ +{ + "name": "Soumya Panigrahi", + "avatar_url": "https://avatars.githubusercontent.com/u/151079203?v=4", + "url": "", + "x": "https://x.com/soumyapanigrahi", + "linkedin": "https://www.linkedin.com/in/soumya-panigrahi-8038118/", + "github": "https://github.com/soumya-codes", + "website": "", + "roles": ["pmc"] +} diff --git a/docs/src/content/updates/2024-07-18.md b/docs/src/content/updates/2024-07-18.md new file mode 100644 index 000000000..db0b615c6 --- /dev/null +++ b/docs/src/content/updates/2024-07-18.md @@ -0,0 +1,14 @@ +--- +--- + +Agenda: + +- First community call 🎉 +- The documentation website is up: [https://dicedb-docs.netlify.app/](https://dicedb-docs.netlify.app/) +- Plan to keep DiceDB a drop-in replacement of Redis, however, redis feature-set completion won’t be a blocker for launch. +- Aim to support a basic, foundational feature set +- Plans for real-time reactivity: +- Support for JSON +- Filtering on JSON fields +- Optimizations for DSQL query executor: +- Instead of re.match use a specific regex matcher for better performance. diff --git a/docs/src/content/updates/2024-08-01.md b/docs/src/content/updates/2024-08-01.md new file mode 100644 index 000000000..5c5b8a28a --- /dev/null +++ b/docs/src/content/updates/2024-08-01.md @@ -0,0 +1,25 @@ +--- +--- + +Agenda: + +- Updates from Arpit +- Design discussion around multi-threaded architecture for Dice being implemented by Yash +- JSON integration with QWATCH +- Add JSON support to the executor to filter on JSON fields using JSONPath syntax. +- JSON-to-JSON comparisons in WHERE clause? +- Research from Cockroach labs on Json libs \- [https://www.cockroachlabs.com/blog/high-performance-json-parsing/](https://www.cockroachlabs.com/blog/high-performance-json-parsing/) + +## Jul 25, 2024 | [DiceDB Weekly Community Call](https://www.google.com/calendar/event?eid=M2Judmhnb2E0YnFsY2d0NWUwMDBhdnZjbmUgYXJwaXQubWFzdGVyY2xhc3NAbQ) + +Agenda: + +- Commands for supporting JSON as native Data Type \- do we agree on [this](https://redis.io/docs/latest/develop/data-types/json/). I see the issue has already been created, we just need an alignment. +- Jyotinder to check for absolute essentials for Realtime Reactivity +- Crips documentation around the DSQL capabilities as of today +- JSON support for JSONPath and partial updates +- Yash to discuss multi-threaded implementation +- ByteArray divergence \- BITX commands for ByteArray type +- String and ByteArray implementation will have different performance +- Make sure this is documented +- Arpit to write documentation around \`SET\` and \`GET\` command in docs repository. diff --git a/docs/src/content/updates/2024-08-08.md b/docs/src/content/updates/2024-08-08.md new file mode 100644 index 000000000..1ea195eb6 --- /dev/null +++ b/docs/src/content/updates/2024-08-08.md @@ -0,0 +1,47 @@ +--- +--- + +Shipped 🚀 + +- Command Enhancements: +- KEYS command implementation +- SET command enhancements +- COMMAND GETKEYS command added +- MSET command implementation +- JSON Support: +- JSON.SET and JSON.GET commands +- JSONPath support for querying JSON data +- AUTH command +- BIT commands +- Performance and Stability: +- Fixed server reconnection issues +- Key Expiry fixes +- Executor Benchmarks added +- Thread safety improvements for dencoding +- Data Handling: +- RESP parsing fix for handling RESP_NIL in BulkString +- Signed integer dencoding support +- Development and Testing: +- Test improvements +- Live Reloading on dev server + +Agenda: + +- soumya: Do we need to support range queries? +- gaurav897: _Do we have a good monitoring/metrics/logging story around DiceDB? Given that we are early in the project, should we start proactively on this?_ +- Prometheus +- opentelemetry +- Executor performance +- [https://discord.com/channels/1034342738960855120/1264145943884992595/1269314643298488370](https://discord.com/channels/1034342738960855120/1264145943884992595/1269314643298488370) +- Integration test setup? + +Action Items + +- Memtier +- SQL equivalence +- JSON where clause support +- dice-cli stability with QWATCH +- Python-sdk +- Java-sdk +- Js-sdk +- Stripped locking diff --git a/docs/src/content/updates/2024-08-15.md b/docs/src/content/updates/2024-08-15.md new file mode 100644 index 000000000..c56fce2c0 --- /dev/null +++ b/docs/src/content/updates/2024-08-15.md @@ -0,0 +1,44 @@ +--- +--- + +Shipped + +- Commands: +- TOUCH and OBJECT IDLETIME +- KEEPTTL option for SET command +- COPY command +- PTTL command +- GETEX command +- GETDEL command +- RENAME command +- MGET command +- DECRBY command +- EXISTS command +- DECR command +- Fixes +- Fixed atomicity issue in GetAll() function +- Improved atomicity of Get() function +- Simplified AUTH flow +- Fixed failing TestJSONSetWithInvalidJSON +- Fixed issue with emitting watchEvent from DelByPointer +- Testing and code quality: +- Added script to plot executor benchmark results +- Added various new test cases: +- For DEL command +- For DISCARD command +- For expired keys in StackRef.Pop() method +- Additional unit tests for eval.go file +- Introduced golangci linter to improve code quality +- Improved queueref benchmark + +## Discussion + +- Consensus on consistency - Do we need locks, readers-writers block, etc. +- Blocking operations +- Gaurav and Soumya to explain their reasoning + +## Action Items + +- New In memory shard for serving watch queries. +- Make target for linting +- Sleep Timer stub diff --git a/docs/src/content/updates/2024-08-19.md b/docs/src/content/updates/2024-08-19.md new file mode 100644 index 000000000..a74b13181 --- /dev/null +++ b/docs/src/content/updates/2024-08-19.md @@ -0,0 +1,29 @@ +--- +--- + +Discussed: + +Separation of Concerns: + +- Commands like MGET/MSET - Key used across shards, +- Similar for Qwatch - when we are watching a pattern, the pattern can exist across multiple shards. +- Transactional commands like MGET/MSET - We need an abstraction layer outside shards that can manage the transaction across teh shards. + +IOLayer - Should it wait for all shards to complete the tasks, proceed only after all shards have responded. + +Keep store dumb. All ops on store as atomic as possible. +. Add complexity to IOLayer / Coordinator in future if optimisation are needed in future. + +Next step task + +- Remove locks and provide atomic operations. +- Address review comments and merge Store abstraction refactor Yash +- Watch to move out of store / Or implement a scan operator in store Jyotinder +- Limit Store operations to Put / Get / Delete & Scan Pratik +- We are using unsafe pointer, should we move to empty struct ot interface. Move to generics. Ashwin Kulkarni +- Removing all Mutex from Store after the shards and channels are created for multi threads. soumya +- Skeleton for multithreaded mode Yash +- Extract Coordinator from IO Tasks. Gaurav +- Qwatch: each io thread launches a qwatch command, this fans out to every shard. Each shard now maintains records for which io threads are listening to which queries . Jyotinder +- moar thoughts - the watchlist can be maintained at the said coordinator level +- Fanout commands that require consistency soumya diff --git a/docs/src/content/updates/2024-08-22.md b/docs/src/content/updates/2024-08-22.md new file mode 100644 index 000000000..0c2ea6cdb --- /dev/null +++ b/docs/src/content/updates/2024-08-22.md @@ -0,0 +1,54 @@ +--- +--- + +## Changelog + +### New Commands + +- Support for JSON.TYPE command +- Support for EXPIREAT command +- Support for DBSIZE command +- Support for EXPIRETIME command +- Deque implementation for LPUSH, RPUSH, LPOP, and RPOP commands +- JSON support in WHERE clause for queries + +### Performance + +- Improved performance of JSON WHERE clause evaluation +- Refactored store abstraction as a prerequisite for multi-threading + +### Bug Fixes + +- Type deduction logic for integers and related fixes +- RENAME command now fetches the key before renaming +- Fixed QWATCH response format and executor type inference logic +- Fixed type casting logic for SET and GET commands +- Corrected INCR/DECR logic and added tests +- Fixed incorrect benchmark iterations for QueueRef +- Corrected the JSON.SET command Arity +- Standardized error messages across codebase +- Updated AUTH error message to be consistent with Redis +- Keep JSON.TYPE consistent with Redis +- Fixed flaky tests due to JSON ordering + +### Testing + +- Added unit and integration tests for EXPIRE and EXPIRETIME commands +- Added stubbed time for tests +- Run complete test suite on PRs + +### Docs + +- Created document on inconsistencies between DiceDB and Redis + +### Developer Workflow + +- Added make target for linter +- Updated linter.yml + +## Discussions + +- Compare and contrast the list of Object Types and Encoding types supported by REDIS and DiceDB. Attempt to arrive at the next set of action items. +- [https://github.com/DiceDB/dice/issues/386\#issuecomment-2303968575](https://github.com/DiceDB/dice/issues/386#issuecomment-2303968575) +- Discuss on the current implementation of Keypool and its necessity. +- [https://github.com/DiceDB/dice/issues/386](https://github.com/DiceDB/dice/issues/386) diff --git a/docs/src/content/updates/2024-08-29.md b/docs/src/content/updates/2024-08-29.md new file mode 100644 index 000000000..37c0d6f15 --- /dev/null +++ b/docs/src/content/updates/2024-08-29.md @@ -0,0 +1,40 @@ +--- +--- + +## Changelog + +### New Commands + +- Implement \`HSET\` command +- Add support for options for EXPIRE and EXPIREAT +- Add support for command \`JSON.CLEAR\` +- Added \`SADD\`, \`SREM\`, \`MEMBERS\`, \`SCARD\`, \`SINTER\`, \`SDIFF\` commands +- Implement \`GETSET\` command +- Added support for \`FLUSHDB\` command +- Add support for \`BITPOS\` command +- Added support for \`QUNWATCH\` command + +### Bug Fixes + +- Fix: \`STACKREFLEN\` and \`QUEUEREFLEN\` are not aware of the deletion of key + +### Testing + +- Add asserts checking non-set commands: addresses \#411 +- Adds memtier benchmark and load tests preset + +### General Improvements + +- Move QWATCH logic to QueryWatcher +- Reorganize async server code +- Moved from unsafe pointer to string type for the store + +## Action Items + +- Hacktoberfest focus +- Docs: Inaccuracies, fixes. +- Testing +- Dice-cli +- Language-specific SDKs +- Windows Support +- Report command inconsistencies diff --git a/docs/src/content/updates/2024-09-05.md b/docs/src/content/updates/2024-09-05.md new file mode 100644 index 000000000..0a36df74f --- /dev/null +++ b/docs/src/content/updates/2024-09-05.md @@ -0,0 +1,43 @@ +--- +--- + +## Changelog + +### New Commands + +1. Added support for JSON.DEL command +2. Implemented PFADD/PFCOUNT commands +3. Added COMMAND LIST command +4. Added support for HGETALL command + +### Features + +1. Implemented caching for QWATCH queries to improve performance +2. Added JSON support to ORDER BY clause for DSQL queries +3. Added ShardThread and ShardManager for improved concurrency +4. Switched the store to use SwissTable instead of HashTable for better performance +5. Migrated set data structure from built-in go map to swissTable + +### Bug Fixes + +1. Fixed integer type handling inconsistencies in SQL executor +2. Fixed SETBIT command for encoding +3. Fixed benchmark issue in BenchmarkEvalMSET by resetting store for each iteration + +### Testing + +1. Added integration tests for JSON.CLEAR and JSON.DEL commands +2. Temporarily reverted TCL tests integration in Dice + +### Other + +1. Removed query-watcher dependency from store +2. Updated tests to use new Map implementation +3. Fixed linting errors in SwissTable implementation + +## Action Items + +- Allow people to run queries without using cache +- Move set back to hashmap +- Set up a temporary issue for the qwatch leaderboard impl. +- Improve qwatch testing, chaos testing, try to break it. diff --git a/docs/src/content/updates/2024-09-12.md b/docs/src/content/updates/2024-09-12.md new file mode 100644 index 000000000..098de5a64 --- /dev/null +++ b/docs/src/content/updates/2024-09-12.md @@ -0,0 +1,52 @@ +--- +--- + +## Changelog + +### New Commands + +1. Added support for `JSON.ARRLEN` command +2. Implemented `HGET` command +3. Added support for `COMMAND` command + +### Features + +1. Improved `ORDER BY` clause handling in SQL parser +2. Added support for `LIKE` and `NOT LIKE` to the SQL Executor +3. Added retry with exponential backoff for QWATCH writes +4. Added support for common cache per fingerprint in QWATCH +5. Deprecated `FROM` clause in DSQL and moved key filtering to `WHERE` +6. Added realtime leaderboard demo using QWATCH + +### Bug Fixes + +1. Fixed hyperloglog type assertion check +2. Fixed inconsistent `EXPIRE` with conflicting options: `LT` `GT` +3. Fixed data race occurring when emitting a WatchEvent +4. Fixed inconsistent `EXPIRE` when ran with flags `XX`, `LT`\-`XX` and `GT` on a key without ttl +5. Fixed bitmap commands deviation from Redis implementation +6. Optimized type error return + +### Testing + +1. Added TestEnvEnabled config and avoiding AOF dump for test env +2. Added unit and integration tests for `HGET` command + +### Other + +1. Version bump +2. Notifies Query Manager of key changes asynchronously +3. Removed locking structures for store +4. Refactored constants from constants package +5. Refactored the codebase and moved packages to internal +6. Removed keypool and related structures from the store +7. Reverted set data structure to map +8. Updated README with Leaderboard example + +## Discussion + +- Stability \+ latencies +- Redis exporter, node exporter, prometheus +- TCL test documentation +- Multi-threading progress +- New query fingerprinting logic diff --git a/docs/src/content/updates/2024-09-19.md b/docs/src/content/updates/2024-09-19.md new file mode 100644 index 000000000..aa1d3db44 --- /dev/null +++ b/docs/src/content/updates/2024-09-19.md @@ -0,0 +1,64 @@ +--- +--- + +## Changelog + +### New Commands + +1. Added `JSON.INGEST` support for HTTP +2. Added `COMMAND HELP` +3. Added `JSON.ARRPOP` command +4. Implemented `JSON.NUMINCRBY` command +5. Added support for `JSON.MGET` +6. Added support for `JSON.TOGGLE` +7. Implemented `JSON.ARRAPPEND` command +8. Added support for `JSON.DEBUG` +9. Added support for `LLEN` command +10. Added support for `SELECT` command +11. Added `HLEN` support +12. Added support for `JSON.OBJLEN` +13. Added support for `JSON.STRLEN` +14. Implemented `PFMERGE` command +15. Implemented `JSON.FORGET` command + +### Features + +1. Added support for arm64 architecture +2. Implemented LFU cache with approximate counting +3. Added config file support +4. Added HTTP support +5. SQL Executor Performance Improvements +6. Added Darwin arm64 compatibility +7. Bumped Go SDK to 1.23 +8. Added minimum and maximum Expiry time + +### Bug Fixes + +1. Fixed auth command line flags to be respected during server startup +2. Fixed `MSET` command consistency issue with Redis +3. Fixed flaky unit test for `JSON` comparisons +4. Fixed flaky `JSON` tests +5. Fixed `GETEX` with `EX` for big integers +6. Fixed TestParseHTTPRequest +7. Fixed `GETKEYS` commands failure for wrong number of arguments + +### Testing + +1. Enhanced `INCR` command test suite with comprehensive edge cases +2. Improved `QWATCH` tests post fingerprinting +3. Enhanced `GETDEL` to handle Set, JSON, ByteArray, String, Integer and expanded test coverage +4. Improved test folder structure +5. Added test for abort command + +### Other + +1. `PFCOUNT` benchmark and caching implementation analysis +2. Updated CONTRIBUTING.md +3. ted report_command_bug.md +4. Reverted change to launch new goroutine for each mutate notification + +# Action Items + +1. Return query fingerprint to users subscribing to QWATCH. +2. Allow unsubscriptions using QWATCH by passing the query fingerprint. +3. Add documentation for QUNWATCH diff --git a/docs/src/content/updates/2024-09-26.md b/docs/src/content/updates/2024-09-26.md new file mode 100644 index 000000000..201a51cdc --- /dev/null +++ b/docs/src/content/updates/2024-09-26.md @@ -0,0 +1,54 @@ +--- +--- + +## Changelog + +New Commands: + +1. Added support for `QWATCH` Command with HTTP (Prashant Shubham) +2. Implemented `HSETNX` command (shreyas23sk) +3. Added support for `INCRBY` command (Saubhik Kumar) +4. Added support for `JSON.OBJKEYS` (Saubhik Kumar) +5. Added support for `JSON.ARRINSERT` (jujiale) +6. Implemented `HDEL` command (manishrw) +7. Added support for `COMMAND INFO` command (meetghodasara) +8. Added support for `HSTRLEN` command (c-harish) +9. Added support for `INCRBYFLOAT` command (hash-f) +10. Added support for `SETEX` command (AshikBN) +11. Added support for `GETRANGE` command (KaviiSuri) +12. Added support for `JSON.NUMMULTBY` (c-harish) +13. Added `ECHO` command (hgupta12) + +Features: + +1. Added multi-threading capability to DiceDB (soumya-codes) +2. Enhanced support for commands over HTTP (Pratik Pandey) +3. Added flag to enable/disable multi-threading on server (Prashant Shubham) +4. Setup slog with zerolog (KaviiSuri) + +Bug Fixes: + +1. Fixed `EXPIRE` with empty string as `TTL` (Abh-ay) +2. Fixed `BITCOUNT` when no key provided (Shardul Silswal) +3. Fixed startup statement (Ashwin Kulkarni) +4. Fixed inconsistent `BITOP` with non-string source key (Karan Dixit) +5. Fixed bitcount operations (Ved Chitnis) +6. Fixed handling of multiple failure/error scenarios during socket reads (ayushsatyam146) +7. Fixed inconsistency in the `INCR` command (Maveric-k07) +8. Fixed keyspacestats and `FLUSHDB` (apoorvyadav1111) +9. Fixed `GETEX` command returning value for JSON-based object (Kapish Malik) +10. Fixed incorrect logging when default port is already in use (Shardul Silswal) + +Testing and Documentation: + +1. Updated README for Multithreading (Prashant Shubham) +2. Added more tests for HTTP support (Pratik Pandey) +3. Added integration tests to validate args for `BITCOUNT` (Shardul Silswal) +4. Added integration tests for HTTP, `ABORT` support for HTTP (Pratik Pandey) + +Other: + +1. Reverted dice binary checked in and added it to .gitignore (Prashant Shubham) +2. Updated README.md (Arpit Bhayani) +3. Eval refactoring for multithreading (Ashwin Kulkarni) +4. Version patch and bump to 0.0.4 (Arpit Bhayani, Jyotinder Singh) diff --git a/docs/src/content/updates/2024-10-03.md b/docs/src/content/updates/2024-10-03.md new file mode 100644 index 000000000..f51b92498 --- /dev/null +++ b/docs/src/content/updates/2024-10-03.md @@ -0,0 +1,84 @@ +--- +--- + +## Changelog + +### New Commands and Features + +1. Added support for `DUMP` command (TheRanomial) +2. Added support for `HKEYS` command (swarajrb7) +3. Added support for `HEXISTS` command (c-harish) +4. Added `JSON.RESP` Command (prateek.singh.rathore) +5. Added support for `JSON.ARRTRIM` (jujiale) +6. Added `HINCRBYFLOAT` command (ayushsatyam146) +7. Added `ZADD` and `ZRANGE` commands (Jyotinder Singh) +8. Added `HINCRBY` Command (ankkyprasad) +9. Added `HVALS` command (bijuli74) +10. Added `HRANDFIELD` command (Indranil0603) +11. Added `APPEND` Command (Aditya-Bhalerao) + +### Improvements and Refactoring + +1. Abstracted out Table implementation and supporting Swiss and Go maps (Arpit Bhayani) +2. Eval Refactor for better compatibility with all protocols and multithreading (Ashwin Kulkarni) +3. Made DiceDB build work on different architectures (swaingotnochill) +4. Added Websocket support (prateek.singh.rathore) +5. Improved code structure for evalHVALS (Jyotinder Singh) + +### Bug Fixes + +1. Fixed `BITPOS` command (Bhavya Jain) +2. Fixed `TYPE` command return encoding (apoorvyadav1111) +3. Fixed Child Process not working for `BGREWRITEAOF` on MacOS (KaviiSuri) + +### Testing and Documentation + +1. Added integration tests for `KEYS`, `MGET` , `MSET`, `JSON` commands using HTTP (Shubh1815) +2. Added HTTP Integration Tests for various commands (Karan Dixit, HARSH VARDHAN SINGH, apoorvyadav1111) +3. Added Websocket integration tests for `SET` and `GET` (prateek.singh.rathore) +4. Updated documentation for various commands (multiple contributors) +5. Improved consistency in documentation for multiple commands (multiple contributors) + +### Other + +1. Made keystat localized to store instance (soumya-codes) +2. Added check for controlling the max TCP connections (Ayush Saluja) +3. Updated README with various improvements (Arpit Bhayani, Dhroov Gupta) +4. Version patch and updates (Arpit Bhayani) + +## Discussion + +Points to discuss \[from Arpit\] + +- Playground mono +- Let’s use the word DiceDB and not Dice, every where, there are variable and config places where the word Dice is used +- The config “REQUEST_LIMIT” should be “REQUEST_LIMIT_PER_MIN” +- The config “REQUEST_WINDOW” should be “REQUEST_WINDOW_SEC” +- What is the purpose of the package internals/cmds? +- Why is there a package called db that just is a wrapper over DiceDB commands? Supporting a new command in Playground now means making a change in both backend and frontend. Also, these functions are essentially useless now. +- Also, A better way would be for SDK to expose a generic command that takes command and argos and executes the. What do you think? +- With this, the need for diced.go vanishes +- Instead of exposing the endpoint as \`/cli\`, let’s call it \`/shell/exec\` +- We need all errors to be standardized w.r.t casing. I propose everything to be lowercase. +- server/httpServer.go \-\> server/http.go, why again the word “server” +- “errorResponse” function should do JSON marshal and not string format +- I see places where log and slog both being used, let’s just use slog everywhere +- Need to understand pkg/util/helpers.go, neither the name not the function made much sense. +- Playground Web +- Have a .env file that can take playground mono URL which points to API URL +- Do not call it \`CLI_COMMAND_URL\`, a bad name. Call it \`PLAYGROUND_MONO_URL\` +- Should we not check in package-lock.json? When I installed the file, it got modified +- README lacks node version requirement +- Does this output static site or does it require a server to run? I see the command \`npm run start\` to start the server in production. Ideally, we want a static website for the playground web. No servers. +- Why is Dockerfile_Backend file even present in web? Also, very bad name. We are calling it Playground Mono. Also, the name is neither snake nor camel case. +- “CLI” is a bad name, let’s call it Shell. +- “ // comment this to hide footer” is such a useless comment. +- Comments are supposed to be \`// comment\` and not \`//comment\` +- “DiceDB PlayGround” as name should be “DiceDB Logo” “Playground” +- “Cleanup in :” and “Command left:” have inconsistent styling. Also, it should be \`Commands left\`. Add a tool tip (i) button, next to both that tells what these limits are all about. +- Move commands from command.ts file to using DiceDB commands command +- Delete mock data file +- In api.ts, propagate the error to the use instead of just logging it to console. Show user the error that was emitted from the backend/mono. +- Constants file may not be required rightnow, given we should use Playground Mono URL from .env +- Instead of calling “blacklist” let’s use the word “blocklist” +- Why cliUtils has get and set and delete, do we not support any other command? Also, given this file is present in utils folder it should be called \`utils/cli.ts\` and not \`utils/cliUtils.ts\` diff --git a/docs/src/content/updates/2024-10-10.md b/docs/src/content/updates/2024-10-10.md new file mode 100644 index 000000000..ab1e8d80c --- /dev/null +++ b/docs/src/content/updates/2024-10-10.md @@ -0,0 +1,80 @@ +--- +--- + +### DB + +New Commands and Features: + +1. Added support for ZRANGE.WATCH (Jyotinder Singh) +2. Implemented GET.WATCH command support (Jyotinder Singh) +3. Added support for HMSET (Raghav Babbar) +4. Implemented GEOADD and GEODIST commands (KaviiSuri) +5. Added support for BITFIELD command with all subcommands (apoorvyadav1111) +6. Implemented HMGET command (vishnuchandrashekar) +7. Added HSCAN command (manish wadhwani) + +Improvements and Refactoring: + +1. Improved Watch Manager and Store API compatibility (Jyotinder Singh) +2. Refactored to handle Watch command type in the generic flow of command handlers (Ashwin Kulkarni) +3. Added query fingerprinting feature (kakdeykaushik) +4. Allowed users to customize the KeysLimit value at server start (vpsinghg) +5. Renamed all appropriate variables from Redis to DiceDB (Ashwin Kulkarni) + +Bug Fixes: + +1. Fixed return value in evalPersist function (shashi-sah2003) +2. Fixed Deque-push-output issue (bhima2001) +3. Fixed DELETE command with 0 arguments (Vansh Chopra) +4. Added Hashmap incrementFloatValue overflow check (dograprabhav) +5. Fixed SINTER to support single key parameter (arushi-08) + +Testing and Documentation: + +1. Added GET.WATCH integration test using SDK (Jyotinder Singh) +2. Added Integration Tests for QWATCH Where Clause (prateek.singh.rathore) +3. Added HTTP integration tests for various commands (Harshit Gupta) +4. Updated documentation for multiple commands (various contributors) +5. Added default config file to be used when dice server starts (Prashant Shubham) + +Performance and Optimization: + +1. Updated JSON.ARRLEN to match RedisCLI outputs (Surya Teja) +2. Marshalling the value in SET command for HTTP (lovish2525) + +Other: + +1. Updated benchmark numbers as of 10th Oct 2024 (Arpit Bhayani) +2. Upgraded vulnerable packages (Progyan) +3. Added support for getting adhocReqChan buffer from config (Rohan Chavan) +4. Changed Github workflow to not run actions for docs related PRs (suryavirkapur) + +### Playground + +#### Playground-web contributions + +1. Render commands with newline char (Tarun) +2. Add tooltip component (Rishabh Gupta) +3. Refactor: monorepo alloy (KaviiSuri) +4. fix: code organisation and rendering (KaviiSuri) +5. Update env vars for Playground Mono and add webservice (Tarun Kantiwal) +6. Cleanup & Adjustment to support static site generation (N3XT) +7. \[Dx\] added pre-commit hooks (Shubham raj) +8. Adding support for generic command execution (Prashant Shubham) +9. Refactor repo for consistency (RishabhC-137) +10. UX Refactor \- 2 (Sarthak Kimtani) +11. Search box scroll added (Aryan Nagbanshi)Updated the Playground mono url endpoint (rishav vajpayee) +12. Enhance command history in CLI (Prathamesh Koshti) +13. Jest testing setup (Prathamesh Koshti) +14. Add prettier for lint and Github workflow (samanyu) + +#### Playground mono contributions + +1. Integration Test for Hash commands (Anish Koulgi) +2. Adding rate limiting headers to responses (ayushsatyam146) +3. Disable list of commands from playground repositories \#897 \- Commands Blacklisted (Yash Budhia) +4. Adding support for generic command execution (Prashant Shubham) +5. Refactored repo for consistency (rishav vajpayee) +6. Add trailing slash middleware to prevent unexpected API crash (Tarun Kantiwal) +7. Integration and stress tests for ratelimiter +8. Added CORS support to server (rishav vajpayee) diff --git a/docs/src/content/updates/2024-10-17.md b/docs/src/content/updates/2024-10-17.md new file mode 100644 index 000000000..240469454 --- /dev/null +++ b/docs/src/content/updates/2024-10-17.md @@ -0,0 +1,65 @@ +--- +--- + +## DB + +### New Features and Commands + +1. Renamed `QWATCH` to `Q.WATCH` for consistency (Jyotinder Singh) +2. Added `BITFIELD_RO` command (Saubhik Kumar) +3. Added support for `OBJECT ENCODING` (Saish Pawar) +4. Added support for command `JSON.STRAPPEND` (Karan Dixit) +5. Migrated `PFADD`, `PFCOUNT`, `PFMERGE` to Multi-threaded architecture (Surya Teja) +6. Migrated `ZADD` and `ZRANGE` commands to multi-threaded architecture (Benjamin Mishra) + +### Improvements and Refactoring + +1. Added profiling for DiceDB (Soumya Panigrahi) +2. Improved config with HTTP and websocket properties (Vinit Parekh) +3. Fixed `.WATCH` fingerprinting to generate consistent fingerprints (Jyotinder Singh) +4. Updated SDK and added tests for `.WATCH` command using new APIs (Jyotinder Singh) +5. Migrated `JSON.CLEAR`, `JSON.STRLRN`, `JSON.OBJLEN` commands (jujiale) + +### Bug Fixes + +1. Fixed `JSON.STRLEN` for no path and type error cases (bhima2001) +2. Fixed handling of multiple failure/error scenarios during socket writes (ayushsatyam146) +3. Fixed HTTP JSON response to use JSON null (Vinit Parekh) +4. Fixed null value in removing array element (Dhroov Gupta) +5. Fixed `JSON.GET` to return error when JSON path does not exist (Samarpan Harit) +6. Refactored evalAPPEND to handle leading zeros in value (Shashi sah) + +### Testing and Documentation + +1. Added more tests for SET command (prateek.singh.rathore) +2. Added HTTP Integration tests for `COMMAND` and `COMMAND/COUNT` (svkaizoku) +3. ted documentation for multiple commands (various contributors) +4. Added common spelling fixes (Abhijeet Kasurde) +5. Optimized README for clipboard copy action (Aditya Poddar) + +### Other + +1. Added Ping telemetry and streamlined Version (Arpit Bhayani) +2. Made error statements similar to Redis in migrated errors (Ashwin Kulkarni) +3. Updated stars on docs (Apoorv Yadav) +4. Switched logging mode to dev by default (KaviiSuri) + +## playground-mono + +1. Add integration tests for SET commands (Dhroov Gupta) +2. Expose ratelimit headers (aasifkhan7) +3. Add Dice command integration tests (EXISTS, EXPIRE, EXPIREAT, EXPIRETIME) and package for validation (Rishabh Gupta) +4. Adding support for pretty response (pshubham) +5. Integration Test for Hash commands (anishkoulgi) +6. Adding support for rendering list based responses (tarun-kavipurapu) + +## playground-web + +1. Adding support for JSON.SET command (pshubham) +2. Unit tests for playground-web repository (ViragJain) +3. fix: docker compose contexts to ensure docker compose runs (Kavii) +4. fix: docker compose contexts to ensure docker compose runs (Kavii) +5. \[DiceDB Console\] Setup NextJS with Electron (Ajay Poshak) +6. Setup NextJS with Electron (Ajay Poshak) +7. Add external links to footer items (pshubham) +8. Fixed the styling of get started button (Aryan Nagbanshi) diff --git a/docs/src/content/updates/2024-10-24.md b/docs/src/content/updates/2024-10-24.md new file mode 100644 index 000000000..917eeae43 --- /dev/null +++ b/docs/src/content/updates/2024-10-24.md @@ -0,0 +1,59 @@ +--- +--- + +## DB + +### New Features + +1. Migrated commands `HLEN`, `HSTRLEN`, and `HSCAN` with integration tests for HTTP, WebSocket, and RESP. (@c-harish, @ashwin-kulkarni128) (\#1024) +2. Added support for `ZPOPMIN` command. (@teja8551) (\#1128) +3. Implemented multi-shard commands: `RENAME`, `COPY` , `MSET`, and `MGET`. (@ashwin-kulkarni128) (\#1059) +4. Bloom Filter Commands: Migrated commands such as `bf.add`, `bf.reserve`, `bf.exists`, and `bf.info` to store_eval. (@apoorvyadav1111) (\#1031) +5. Added support for command `ZRANK`. (@SyedMa3) (\#1126) + +### Enhancements + +1. Migrated INCR commands and added integration tests for WebSocket. (@pg30) (\#1016) +2. Migrated commands `HINCRBY`, `HINCRBYFLOAT`, and `HRANDFIELD` with refactored cmdmeta and eval logic. (@saisaipawar, @ashwin-kulkarni128) (\#1081) +3. Moved supported protocols under Protocols. (@arpitbhayani) +4. Added CLI example to WebSocket documentation. (@JP-sDEV) (\#1113) + +### Bug Fixes + +1. Fixed issues in specific use cases of `ZPOPMIN` command. (@teja8551) (\#1164) +2. Handled root path '.' correctly in `JSON.OBJLEN` command. (@saubhikpandey) (\#603) +3. Fixed `ZRANK` command to return score as string with `WITHSCORE`. (@shashi-sah2003) (\#1165) +4. Fixed bugs in WebSocket integration tests. (@psr) (\#1142) + +### Documentation Updates + +1. Audited and enhanced documentation for the `COPY` command. (@onlybond) (\#816) +2. Added Hello, World examples for Simple and Reactive protocols. (@arpitbhayani) +3. Added documentation for Reactive Hello, World\! (@arpitbhayani) +4. Enhanced documentation for the sleep command. (@kdivyansh268, @pshubham) (\#832) +5. Audited `Q.WATCH` documentation for consistency. (@shashank-priyadarshi) (\#781) +6. Updated `INCR` command documentation for consistency with Redis. (@pg30) +7. Audited documentation for the `JSON.TYPE` command. (@onlybond) (\#827) +8. Added cURL examples to HTTP documentation. (@vanshavenger) (\#1113) + +### Refactoring + +1. Refactored HyperLogLog command responses and removed logger references. (@prashant1996cr07) (\#1183) +2. Refactored HTTP response structure. (@prashant1996cr07) (\#1150) + +### Logging and Configuration + +1. Made logging consistent across start and shutdown sequences. (@arpitbhayani) (\#1172) +2. Added an option to set default log level to info. (@arpitbhayani) (\#1172) +3. Configured the number of shards as a configuration, defaulting to the number of cores. (@arpitbhayani) (\#1172) +4. Set connection close log level to debug. (@soumya-codes) (\#1139) + +### Miscellaneous + +1. Updated README.md with new CLI instructions. (@arpitbhayani) +2. Linked and documented best practices for contributions and logging. (@arpitbhayani) +3. Added DiceDB ASCII art for CLI. (@arpitbhayani) +4. Added a template for command documentation. (@apoorvyadav1111) (\#1147) +5. Removed unnecessary log references. (@prashant1996cr07) +6. Removed multi-threading experimental mode from the README. (@arpitbhayani) +7. Version bump to 0.0.5. (@arpitbhayani) diff --git a/docs/src/content/updates/2024-11-07.md b/docs/src/content/updates/2024-11-07.md new file mode 100644 index 000000000..a921f7c6a --- /dev/null +++ b/docs/src/content/updates/2024-11-07.md @@ -0,0 +1,35 @@ +--- +--- + +## DB + +### New Features + +- Migrate commands `SADD`, `SREM`, `SCARD`, `SMEMBERS` to store_eval. (@sahoss) (\#1020) +- Add support for commands `LINSERT` and `LRANGE`. (@ParvBudh28) (\#659) +- Add integration tests for commands `HSET`, `HGET`, `HDEL`. (@c-harish) (\#1021) +- Migrate `GETEX` and `GETDEL` commands. (@Ehijoe) (\#1061) +- Migrated commands `EXPIRE`, `EXPIREAT`, `EXPIRETIME`, `TTL`, `PTTL`. (@SyedMa3) (\#1149) +- Added `GET.UNWATCH` command support and fixed related issues. (@psr) (\#998) + +### Enhancements + +- ZPOPMIN command tests enhanced to check outputs with ZCOUNT command. (@teja8551) (\#1225) +- Moved HExists, HKeys, HVals commands in commands folder. (@apoorvyadav1111) (\#1229) + +### Fixes + +- Fix typo in documentation. (@vinitparekh1742) (\#1240) +- Fix `validateCmdMeta` to handle Unwatch commands. (@jyotindrsingh) + +### Documentation Updates + +- Revamped documentation with separate sections for Blog, Benchmarks, and Roadmap. (@arpitbhayani) (\#1236) +- Add support for command SELECT documentation. (@vanshavenger) (\#820) +- Add documentation for `LINSERT` and `LRANGE` commands. (@ParvBudh28) (\#1040) +- Release page added with blogs and release notes on the homepage. (@arpitbhayani) +- Lint across docs codebase. (@arpitbhayani) +- Removed memtier benchmark from Docs. (@arpitbhayani) +- Updated benchmark numbers and Redis compatibility page. (@arpitbhayani) +- Made landing page simpler and denser. (@arpitbhayani) +- Code documentation fixes. (@aadi-1024) (\#1232) diff --git a/docs/src/content/updates/2024-11-14.md b/docs/src/content/updates/2024-11-14.md new file mode 100644 index 000000000..ec3c925e2 --- /dev/null +++ b/docs/src/content/updates/2024-11-14.md @@ -0,0 +1,29 @@ +--- +--- + +## DB + +### New Features + +- Migrated JSON.RESP & JSON.DEBUG commands. (@c-harish) (\#1030) +- Migrated LPUSH, RPUSH, LPOP, RPOP, LLEN commands. (@Aditya-Chowdhary) (\#1019) +- Implemented ZADD options: XX, NX, CH, INCR, LT, GT according to Redis source. (@rushabhk04) (\#761) +- Migrate commands SETBIT, GETBIT, BITCOUNT, BITPOS, BITFIELD, BITFIELD_RO. (@vishnuchandrashekar) (\#1017) +- Added support for PFCOUNT.WATCH command. (@saubhikpandey) (\#1133) +- Command migration for single shard, multi-shard, and custom commands. (@ashwin-kulkarni128, @apoorvyadav1111) (\#1276) +- Refactored eviction framework with Basic LRU-based batch eviction. (@soumya-codes) (\#1268) +- Default WAL set to Null with WAL implementation added. (@arpitbhayani) + +### Bug Fixes + +- Fixed RESP parser to parse strings with multiple `\r`. (@c-harish) (\#1245) +- Fix LPOP to support multiple arguments. (@tren03) (\#1100) +- Added command metadata for LRANGE. (@shashi-sah2003) (\#1272) +- Enhanced GETRANGE to support byte array. (@c-harish) (\#1194) +- Added type check for string compatibility in evalAPPEND function. (@shashi-sah2003) (\#1193) + +### Documentation Updates + +- Reactive value proposition added to documentation. (@arpitbhayani) (\#1256) +- Releases page with blogs and release notes on the homepage. (@arpitbhayani) +- Roadmap and Redis compatibility page updated. (@arpitbhayani) diff --git a/docs/src/content/updates/2024-11-21.md b/docs/src/content/updates/2024-11-21.md new file mode 100644 index 000000000..9ab560688 --- /dev/null +++ b/docs/src/content/updates/2024-11-21.md @@ -0,0 +1,44 @@ +--- +--- + +## DB + +### New Features + +- Add support for `PFCOUNT.UNWATCH` command and cleanup reactivity tests. (@jyotindrsingh) (\#1030) +- Preserve `TTL` after `APPEND` command. (@dhanrajkotian3) (\#1036) +- Command migration for multishard commands: `TOUCH`, `DBSIZE`, `KEYS`. (@ashwin-kulkarni128, @jyotindrsingh) (\#1301) +- Migrated `GEOADD` and `GEODIST` commands. (@ygosain44) (\#1033) +- Add support for byte array/bitmap to APPEND command. (@c-harish) (\#1286) + +### Enhancements + +- Fix enable-multithreading flag and `PING` support. (@jyotindrsingh) +- Added labels for `WATCH` commands. (@psr) (\#1267) +- Refactored configuration management to use a `.conf` file. (@vinitparekh1742) (\#1292) +- Refactored `IOHandler` code. (@soumya-codes) (\#1306) +- Added `ZADD` documentation and improved error messages. (@vanshavenger) (\#1283) + +### Bug Fixes + +- Fixed goroutine leaks and deadlocks in worker and RESP integration tests. (@psr) (\#1298) +- Fix typo in `benchmarks.md`. (@vinitparekh1742) +- Ensure CI runs only when source code has changes. (@bhima2001) (\#1260) + +### Documentation Updates + +- Updated package-lock. (@apoorvyadav1111) (\#1311) +- Added documentation for new watch/unwatch commands. (@apoorvyadav1111) (\#1295) +- Changes in README for new configuration. (@vinitparekh1742) (\#1309) +- Added type documentation. (@vanshavenger) (\#1280) +- Reactivity page and quick write-up added. (@arpitbhayani) (\#1308) + +### Refactoring + +- Refactored Makefile. (@vinitparekh1742) (\#1288) +- Fixed CI and linting issues across codebase. (@arpitbhayani, @jyotindrsingh) + +### Miscellaneous + +- Consistent blog card styling on the website. (@realChakrawarti) (\#1300) +- Set up a `/docs` redirect. (@arpitbhayani) diff --git a/docs/src/content/updates/2024-11-28.md b/docs/src/content/updates/2024-11-28.md new file mode 100644 index 000000000..920c8e64c --- /dev/null +++ b/docs/src/content/updates/2024-11-28.md @@ -0,0 +1,48 @@ +--- +--- + +## DB + +### New Features + +- Command Migration: Migrated `DEL`, `EXISTS`, `PERSIST`, and `TYPE` commands.\*\* (@mohitnagaraj20, @jyotindrsingh, @apoorvyadav1111) (\#1015) +- Added support for PFCOUNT.UNWATCH command. (@jyotindrsingh) (\#1335) +- Integration tests added for COMMAND DOCS command. (@sa-k-shore) (\#1323) + +### Enhancements + +- Preserve TTL after APPEND command. (@dhanrajkotian3) (\#1036) +- Refactored configuration management to improve flag handling and introduce early returns for errors. (@jyotindrsingh) +- Rounded borders, word wrap, and badges added for improved UI. (@apoorvyadav1111) (\#1327) +- Reorganized IOThread code and added IOThread interface to BaseIOThread. (@jyotindrsingh) (\#1331) +- Cleaned up startup logs. (@jyotindrsingh) (\#1316) +- Removed async server. (@ashwin-kulkarni128, @jyotindrsingh, @apoorvyadav1111) (\#1318) +- Fixed Redis CLI connection error. (@prashant1996cr07) (\#1207) + +### Bug Fixes + +- Fixed configuration flags for better compatibility. (@jyotindrsingh) (\#1331) +- Fix Redis CLI connect error. (@prashant1996cr07) (\#1207) +- Fix to ensure fingerprints are retained until all clients unsubscribe. (@prashant1996cr07) (\#1335) +- Fixed linter issues across multiple files. (@jyotindrsingh, @apoorvyadav1111) (\#1314, \#1333) +- Removed unused utilities and dead code. (@jyotindrsingh) (\#1331) +- Fix for `GETRANGE` markdown file extension detection. (@Arijit6258) (\#1329) + +### Documentation Updates + +- Added links to examples in documentation. (@apoorvyadav1111) (\#1333) +- Temporarily removed `Q.WATCH` documentation from the website. (@jyotindrsingh) (\#1334) +- Updated documentation with improved clarity and layout. (@vinitparekh1742, @jyotindrsingh) (\#1332) +- Added hyperlinks for commands. (@pankajshadev) (\#1325) + +### Refactoring + +- Makefile updates for consistency. (@vinitparekh1742) (\#1310) +- Removed cache from linter for better performance. (@apoorvyadav1111) (\#1319) +- Reorganized and renamed Worker to IOThread. (@jyotindrsingh) (\#1330) + +### Miscellaneous + +- Version bump. (@jyotindrsingh) (\#1316) +- Dependency upgrade: Bumped `golang.org/x/net` from `0.21.0` to `0.23.0`.\*\* (@dependabot\[bot\]) (\#1316) +- Deleted outdated `GETRANGE` documentation. (@c-harish) (\#1338) diff --git a/docs/src/content/updates/2024-12-05.md b/docs/src/content/updates/2024-12-05.md new file mode 100644 index 000000000..68f23b897 --- /dev/null +++ b/docs/src/content/updates/2024-12-05.md @@ -0,0 +1,21 @@ +--- +--- + +### New Features + +- Bloom Filter and Type Standardization: This PR introduces bloom filter and type standardization to improve performance (@arpitbbhayani) (\#1357) +- Add documentation for SETEX command: Added documentation for the SETEX command, making it easier for users to understand its usage (@tarun-29) (\#1350) + +### Bug Fixes + +- Fixed build error in bytearray.go: This PR fixes a build error that occurred when building the bytearray package (@piyushhhxyz) (\#1351) +- fix: modify the config default value keep consistency: This PR standardizes the default values of configuration options across the codebase, ensuring consistency and preventing potential issues (@jujiale) (\#1352) + +### Documentation + +- Add documentation for JSON.OBJLEN command: Created a new page in the documentation for the JSON.OBJLEN command, while also fixing typos on the JSON.OBJKEYS page (@paulwalrath) (\#1345) +- Remove \--enable-multithreading flag usage in README: Removed the reference to the deprecated \`--enable-multithreading\` flag from the README, as it is no longer supported (@rahul-mallick-15) (\#1349) + +### General Enhancements + +- Remove encoding and supporting only Type: This PR removes unused encoding code and supports only type (@arpitbbhayani) (\#1341) diff --git a/docs/src/layouts/BlogLayout.astro b/docs/src/layouts/BlogLayout.astro index f2222fb0c..5644e69aa 100644 --- a/docs/src/layouts/BlogLayout.astro +++ b/docs/src/layouts/BlogLayout.astro @@ -4,7 +4,11 @@ import Layout from "./Layout.astro"; import AboutMeVertical from "../components/AboutMeVertical.astro"; const { blog, type } = Astro.props; -const author = await getEntry("authors", blog.data.author.id); +let author = null; + +if (blog?.data?.author?.id) { + author = await getEntry("authors", blog.data.author.id); +} const JSONLD = { "@context": "https://schema.org/", @@ -18,8 +22,8 @@ const JSONLD = { dateModified: blog.data.published_at, author: { "@type": "Person", - name: author.data.name, - image: author.data.avatar_url, + name: author?.data?.name, + image: author?.data?.avatar_url, }, url: Astro.url, isPartOf: { @@ -28,8 +32,8 @@ const JSONLD = { name: "DiceDB Blog", publisher: { "@type": "Person", - name: author.data.name, - image: author.data.avatar_url, + name: author?.data?.name, + image: author?.data?.avatar_url, }, }, }; @@ -51,6 +55,13 @@ const JSONLD = {
  • Releases
  • + ) : type === "update" ? ( +
  • + Weekly Updates +
  • +
  • + {blog.slug} +
  • ) : (
  • Blog @@ -68,35 +79,39 @@ const JSONLD = { > {blog.data.title} -
    -
    -
    - -
    -
    -
    -

    - {author.data.name} -

    -

    - {author.data.bio} -

    -
    -
    + { + author && ( +
    +
    +
    + +
    +
    +
    +

    + + {author.data.name} + +

    +

    {author.data.bio}

    +
    +
    + ) + }

  • -

    - { - blog.data.published_at.toLocaleString("en-us", { - day: "2-digit", - month: "short", - year: "numeric", - }) - } -

    + { + type !== "update" && ( +

    + {blog.data.published_at.toLocaleString("en-us", { + day: "2-digit", + month: "short", + year: "numeric", + })} +

    + ) + }
    diff --git a/docs/src/layouts/Head.astro b/docs/src/layouts/Head.astro index 0c4c7263f..c379a8c71 100644 --- a/docs/src/layouts/Head.astro +++ b/docs/src/layouts/Head.astro @@ -14,6 +14,5 @@ const { title, description, img, blog, video, session, JSONLD } = Astro.props; {title} - diff --git a/docs/src/pages/community/index.astro b/docs/src/pages/community/index.astro new file mode 100644 index 000000000..588b386c5 --- /dev/null +++ b/docs/src/pages/community/index.astro @@ -0,0 +1,69 @@ +--- +import Layout from "../../layouts/Layout.astro"; +import { getCollection } from "astro:content"; +import { Video } from "lucide-astro"; + +const updates = await getCollection("updates"); +updates.reverse(); + +const title = "Community"; +const description = ""; +const callLink = "https://meet.google.com/qdf-pfkb-ckm"; +--- + + +
    +
    +

    Community

    +

    + DiceDB is a community-driven project, and every individual who has + contributed their time, expertise, and patches has played a crucial role + in shaping its success. If you're interested in contributing to DiceDB, + you can always +

    + The community is always open to new ideas and contributions, so feel free + to drop a note on our Discord server. +

    +
    +

    Weekly calls

    +

    + We need every Thursday at 19:00 IST to discuss what we did and what we + plan to do. The meeting is open to everyone, and you can join the call + by clicking the button below. +

    + +
    +

    Here are the notes from our past weekly calls

    +
    + +
    +
    +
    +
    diff --git a/docs/src/pages/team.astro b/docs/src/pages/team.astro new file mode 100644 index 000000000..a2df83d4e --- /dev/null +++ b/docs/src/pages/team.astro @@ -0,0 +1,122 @@ +--- +import Layout from "../layouts/Layout.astro"; +import { getCollection } from "astro:content"; +import UserSocialHandles from "../components/UserSocialHandles.astro"; +const team = await getCollection("team"); + +const pmc = team.filter((member) => member.data.roles.includes("pmc")); +const committers = team.filter((member) => + member.data.roles.includes("committer"), +); + +const title = "Team"; +const description = + "DiceDB is a community-driven project, and every individual who has contributed their time, expertise, and patches has played a crucial role in shaping its success."; +--- + + +
    +
    +

    Team

    +

    + DiceDB is a community-driven project, and every individual who has + contributed their time, expertise, and patches has played a crucial role + in shaping its success. Our team is organized into three key groups: +

      +
    • Project Management Committee (PMC)
    • +
    • Committers
    • +
    • Contributors
    • +
    +

    +
    +

    Project Management Committee

    +

    + Our Project Management Committee (PMC) steers the vision, ensuring + DiceDB stays aligned with its mission of building a reactive, scalable, + highly available, unified cache optimized for modern hardware. +

    +
    +
    + { + pmc.map((member) => ( +
    + {member.data.name} +

    + {member.data.name.split(" ").map((char) => ( +
    {char}
    + ))} +

    + +
    + )) + } +
    +
    +

    Committers

    +

    + The committers, with their deep expertise, safeguard the stability and + quality of the codebase along with working on critical features and + improvements. +

    +
    + { + committers.map((member) => ( +
    + {member.data.name} +

    {member.data.name}

    + +
    + )) + } +
    +
    +

    Contributors

    +

    + The contributors, with their fresh ideas and energy, push the boundaries + of what's possible. Each project has its own contributors, and you can + find them below. We regularly evaluate the contributions and promote + contributors to committers. +

    +

    +
    +
    +
    + + diff --git a/docs/src/pages/updates/[slug].astro b/docs/src/pages/updates/[slug].astro new file mode 100644 index 000000000..7fb5498b4 --- /dev/null +++ b/docs/src/pages/updates/[slug].astro @@ -0,0 +1,20 @@ +--- +import { getCollection } from "astro:content"; +import BlogLayout from "../../layouts/BlogLayout.astro"; +export async function getStaticPaths() { + const updates = (await getCollection("updates")).sort( + (a, b) => new Date(b.slug).getTime() - new Date(a.slug).getTime(), + ); + return updates.map((update) => ({ + params: { slug: update.slug }, + props: { update }, + })); +} + +const { update } = Astro.props; +const { Content } = await update.render(); +--- + + + +