TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

DiceDB

235 点作者 rainhacker2 个月前

28 条评论

kiitos2 个月前
There are _so many_ bugs in this code.<p>One example among many:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;DiceDB&#x2F;dice&#x2F;blob&#x2F;0e241a9ca253f17b4d364cdf0640a4453400f35e&#x2F;internal&#x2F;id&#x2F;id.go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;DiceDB&#x2F;dice&#x2F;blob&#x2F;0e241a9ca253f17b4d364cdf...</a> defines func ExpandID, which reads from cycleMap without locking the package-global mutex; and func NextID, which writes to cycleMap under a lock of the package-global mutex. So writes are synchronized, but only between each other, and not with reads, so concurrent calls to ExpandID and NextID would race.<p>This is all fine as a hobby project or whatever, but very far from any kind of production-capable system.
评论 #43511059 未加载
评论 #43385151 未加载
deazy2 个月前
Looking at the diceDB code base, I have few questions regarding its design, I&#x27;m asking this to understand the project&#x27;s goals and design rationale. Anyone feel free to help me understand this.<p>I could be wrong but the primary in-memory storage appears to be a standard Go map with locking. Is this a temporary choice for iterative development, and is there a longer-term plan to adopt a more optimized or custom data structure ?<p>I find the DiceDB&#x27;s reactivity mechanism very intriguing, particularly the &quot;re-execution&quot; of the entire watch command (i.e re-running GET.WATCH mykey on key modification), it&#x27;s an intriguing design choice.<p>From what I understand is the Eval func executes client side commands this seem to be laying foundation for more complex watch command that can be evaluated before sending notifications to clients.<p>But I have the following question.<p>What is the primary motivation behind re-executing the entire command, as opposed to simply notifying clients of a key change (as in Redis Pub&#x2F;Sub or streams)? Is the intent to simplify client-side logic by handling complex key dependencies on the server?<p>Given that re-execution seems computationally expensive, especially with multiple watchers or more complex (hypothetical) watch commands, how are potential performance bottlenecks addressed?<p>How does this &quot;re-execution&quot; approach compare in terms of scalability and consistency to more established methods like server-side logic (e.g., Lua scripts in Redis) or change data capture (CDC) ?<p>Are there plans to support more complex watch commands beyond GET.WATCH (e.g. JSON.GET.WATCH), and how would re-execution scale in those cases?<p>I&#x27;m curious about the trade-offs considered in choosing this design and how it aligns with the project&#x27;s overall goals. Any insights into these design decisions would help me understand its use-cases.<p>Thanks
评论 #43434161 未加载
bdcravens2 个月前
Is there a single sentence anywhere that describes what it actually is?
评论 #43379526 未加载
评论 #43379567 未加载
评论 #43379729 未加载
评论 #43379551 未加载
评论 #43379498 未加载
评论 #43379504 未加载
评论 #43379737 未加载
评论 #43379529 未加载
评论 #43379503 未加载
评论 #43379519 未加载
schmookeeg2 个月前
Using an instrument of chance to name a data store technology is pretty amusing to me.
评论 #43380301 未加载
评论 #43385415 未加载
cozzyd2 个月前
DiceDB sounds like the name of a joke database that returns random results.
评论 #43385445 未加载
weekendcode2 个月前
From the benchmarks on 4vCPU and num_clients=4, the numbers doesn&#x27;t look much different.<p>Reactive looks promising, doesn&#x27;t look much useful in realworld for a cache. For example, a client subscribes for something and the machines goes down, what happens to reactivity?
alexey-salmin2 个月前
<p><pre><code> | Metric | DiceDB | Redis | | -------------------- | -------- | -------- | | Throughput (ops&#x2F;sec) | 15655 | 12267 | | GET p50 (ms) | 0.227327 | 0.270335 | | GET p90 (ms) | 0.337919 | 0.329727 | | SET p50 (ms) | 0.230399 | 0.272383 | | SET p90 (ms) | 0.339967 | 0.331775 | </code></pre> <i>UPD Nevermind, I didn&#x27;t have my eyes open. Sorry for the confusion.</i><p>Something I still fail to understand is where you can actually spend 20ms while answering a GET request in a RAM keyvalue storage (unless you implement it in Java).<p>I never gained much experience with existing opensource implementations, but when I was building proprietary solutions at my previous workplace, the in-memory response time was measured in tens-hundreds of microseconds. The lower bound of latency is mostly defined by syscalls so using io_uring should in theory result in even better timings, even though I never got to try it in production.<p>If you read from nvme AND also do the erasure-recovery across 6 nodes (lrc-12-2-2) then yes, you got into tens of milliseconds. But seeing these numbers for a single node RAM DB just doesn&#x27;t make sense and I&#x27;m surprised everyone treats them as normal.<p>Does anyone has experience with low-latency high-throughput opensource keyvalue storages? Any specific implementation to recommend?
评论 #43379956 未加载
评论 #43386602 未加载
评论 #43379996 未加载
评论 #43379957 未加载
评论 #43379976 未加载
评论 #43379986 未加载
OutOfHere2 个月前
In-memory caches (lacking persistence) shouldn&#x27;t be called a database. It&#x27;s not totally incorrect, but it&#x27;s an abuse of terminology. Why is a Python dictionary not an in-memory key-value database?
ac130kz2 个月前
Any reason to use this over Valkey, which is now faster than Redis and community driven? Genuinely interested.
评论 #43380014 未加载
losvedir2 个月前
I didn&#x27;t see it in the docs, but I&#x27;d want to know the delivery semantics of the pubsub before using this in production. I assume best effort &#x2F; at most once? Any retries? In what scenarios will the messages be delivered or fail to be delivered?
remram2 个月前
This seems orders of magnitude slower than Nubmq which was posted yesterday: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43371097">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43371097</a>
评论 #43380340 未加载
huntaub2 个月前
What are some example use cases where having the ability for the database to push updates to an application would be helpful (vs. the traditional polling approach)?
评论 #43380840 未加载
alexpadula2 个月前
15655 ops a second with a Hetzner CCX23 machine with 4 vCPU and 16GB RAM is rather slow for an in-memory database I hate to say it. You can&#x27;t blame that on network latency as for example supermassivedb.com is written in go and achieves magnitudes more, actually x20 and it&#x27;s persisted.. I must investigate the bottlenecks with Dice.
rebolek2 个月前
- proudly open source. cool! - join discord. YAY :(
throwaway20372 个月前
FYI: Here is the creator and maintainer&#x27;s profile: <a href="https:&#x2F;&#x2F;github.com&#x2F;arpitbbhayani" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;arpitbbhayani</a><p>Is there a plan to commercialise this product? (Offer commercial support, features, etc.) I could not find anything obvious from the home page.
sidcool2 个月前
Is Arpit is the system design course guy?
评论 #43380304 未加载
Aeolun2 个月前
I feel like this needs a ‘Why DiceDB instead of Redis or Valtio’ section prominently on the homepage.
评论 #43385457 未加载
DrammBA2 个月前
I love the &quot;Follow on twitter&quot; link with the old logo and everything, they probably used a template that hasn&#x27;t been updated recently but I&#x27;m choosing to believe it&#x27;s actually a subtle sign of protest or resistance.
评论 #43379774 未加载
评论 #43379745 未加载
datadeft2 个月前
Is this suffering from the same problems like Redis when trying to horizontally scale?
评论 #43382999 未加载
re-lre-l2 个月前
&gt; For Modern Hardware fully utilizes underlying core to get higgher throughput and better hardware utilization.<p>Would be great to disclose details of this one. I&#x27;m interested in using what DiceDB achieves higher throughput.
robertlagrant2 个月前
&gt; fully utilizes underlying core to get higgher throughput and better hardware utilization<p>FYI this is a misspelling of &quot;higher&quot;
nylonstrung2 个月前
Who is this for? Can you help me explain why and when I&#x27;d want to use this in place of redis&#x2F;dragonfly
deadbabe2 个月前
I think Postgres can do everything this does and better if you use LISTEN&#x2F;NOTIFY.
9999000009992 个月前
I like it!<p>Anyway to persist data in case of reboots?<p>That&#x27;s the only thing missing here.<p>Is Go the only SDK ?
评论 #43385432 未加载
retropragma2 个月前
Why would I use this over keyspace notifications in redis?
评论 #43385403 未加载
rednafi2 个月前
Database as a transport?
spiderfarmer2 个月前
DiceDB is an in-memory, multi-threaded key-value DBMS that supports the Redis protocol.<p>It’s written in Go.
评论 #43379741 未加载
bitlad2 个月前
I think performance benchmark you have done for DiceDB is fake.<p>These are the real numbers - <a href="https:&#x2F;&#x2F;dzone.com&#x2F;articles&#x2F;performance-and-scalability-analysis-of-redis-memcached" rel="nofollow">https:&#x2F;&#x2F;dzone.com&#x2F;articles&#x2F;performance-and-scalability-analy...</a><p>Does not match with your benchmarks.
评论 #43380314 未加载