Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Vivek built DewDB without TiKV because he wanted the database you deploy to be the same system that handles replication, failover, and sharding. There is no distributed storage layer underneath and no separate coordinator. The consequence is that DewDB itself must implement the hard distributed-systems mechanisms that a storage layer like TiKV would otherwise supply.

What the author built

According to the author’s write-up on DEV Community, DewDB’s nodes handle storage, replication, leader election, failover, sharding, and data movement. The architecture is described in three layers of grouping:

  • Replicated group. A group has a leader and replicas. If the leader dies, a replica can take over.
  • Shard groups. For scale-out, the design uses multiple shard groups. Each has its own leader and replicas, so different shards can accept writes independently.
  • Owned responsibilities. The author says DewDB is responsible for elections, quorum logic, WAL recovery, replica repair, shard ownership, and migration.

Why not just use TiKV?

The question the article asks directly is “Why not just use TiKV?” The author’s answer rests on a single premise about what the deployed system should be. In the article’s words:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Because then DewDB would become a document and query layer on top of another distributed database.”

#1 Best Overall

The author states the goal behind that reasoning as: “I wanted the thing you deploy to also be the thing doing the replication, failover, and sharding.” The rationale is deployment simplicity and an integrated system. It is the author’s design preference, not a demonstrated general advantage over layered designs.

The trade-off: who owns the hard parts

Building on TiKV would let a document and query layer delegate storage and replication to a separate distributed store. Building DewDB as its own system reverses that. The table below sets out the ownership question the author’s framing raises. It is a comparison of responsibilities, not of measured behaviour; the article does not report any benchmark or operational comparison.

Concern DewDB, as described by the author Document layer on a separate distributed store (general pattern)
Replication Handled by DewDB nodes within each replicated group Handled by the underlying distributed store
Failover and leader election Implemented by DewDB; a replica takes over if the leader dies Delegated to the underlying store; the article does not describe the other design’s failover behaviour
Sharding and data movement Implemented by DewDB across shard groups, including online shard migration Depends on the underlying store; not stated in the article
Separate coordinator or storage tier to deploy None, according to the article A separate distributed storage tier is required by this design
Who implements and maintains quorum logic, WAL recovery, and replica repair The DewDB project The underlying store’s project

The practical cost of the integrated approach is that the project carries code for consensus, recovery, and migration. A layered design shifts that code to another project, at the cost of an additional system to deploy and operate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the article’s feature list covers

The article’s feature snapshot lists documents, queries, secondary indexes, replication, failover, sharding, change streams, and online shard migration. This is the list as presented in the article at the time it was accessed. It is not an independently audited feature inventory, and it does not indicate which features are production-tested. Check the GitHub repository linked from the article for the current state of the code.

What the article does and does not establish

  • Performance: not established. The article does not give throughput, latency, or any other benchmark figure, so no number from it should be attached to DewDB.
  • Production readiness: not established. The article describes the design and intent; it does not claim production deployments.
  • Platform support: not established beyond the article’s Windows installation commands, which are presented in the article itself. Confirm the exact commands there rather than relying on a summary.
  • Comparative reliability: not established. The article does not compare DewDB’s failure behaviour with TiKV-based systems.
  • Publication date: the article excerpt shows “Posted on Sep 26” without a year, so no year should be assumed from it.

The article is the author’s own account. It is useful for understanding what the author intended and claimed, but it is not third-party validation of the implementation’s correctness.

Who this design fits, based on the author’s framing

The author’s reasoning points to a clear decision rule. Consider a design like DewDB if:

  • you want one deployable system rather than a database plus a separate storage cluster;
  • you are prepared to own, test, and maintain elections, quorum logic, WAL recovery, replica repair, and shard migration yourself;
  • you value being able to reason about the whole failure path inside one codebase.

If those conditions do not hold, a document or query layer over an established distributed store moves that ownership to a project that already carries it. Neither choice is shown by the article to be universally better.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Bottom line on the design

Vivek’s choice of DewDB over TiKV is a deliberate trade of operational simplicity for system ownership. The deployed database handles storage, replication, failover, sharding, and data movement, and the author accepts responsibility for the mechanisms that make those work. Whether that trade pays off depends on the implementation’s results, which the article does not report.

Source: Vivek, “Why I Built DewDB Without TiKV,” DEV Community: https://dev.to/viveke22/why-i-built-dewdb-without-tikv-16bc

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.