Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
update README with info on why WriteStream was removed
Browse files Browse the repository at this point in the history
add links to issue page discussion the removal and also
link to the wiki where more information on alternative
userland write stream approaches can be found
  • Loading branch information
ralphtheninja committed Mar 12, 2015
1 parent ba51315 commit 3d26d39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,11 @@ db.createReadStream({ keys: false, values: true })
<a name="writeStreams"></a>
#### What happened to `db.createWriteStream`?

Yes we have removed `db.createWriteStream` but not to worry, there is good reason for this. *Disclaimper*: if you are not in a stage where you are worried about performance but want a streaming interface
into your database, please checkout [`level-ws`][level-ws].
`db.createWriteStream()` has been removed in order to provide a smaller and more maintainable core. It primarily existed to create symmetry with `db.createReadStream()` but through much [discussion](https://github.com/rvagg/node-levelup/issues/199), removing it was the best cause of action.

TODO: talk about performance and multiple writeStream implementations
The main driver for this was performance. While `db.createReadStream()` performs well under most use cases, `db.createWriteStream()` was highly dependent on the application keys and values. Thus we can't provide a standard implementation and encourage more `write-stream` implementations to be created to solve the broad spectrum of use cases.

Check out the implementations that the community has already produced [here](https://github.com/rvagg/node-levelup/wiki/Modules#write-streams).

--------------------------------------------------------
<a name='approximateSize'></a>
Expand Down

2 comments on commit 3d26d39

@juliangruber
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well written :)

@ralphtheninja
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @jcrugzz and @mcollina :)

Please sign in to comment.