uohzoaix / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

direct stream support? #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
not sure how easy it would be, but would be neat if the interface could
support add/set/etc. via InputStream, and get/etc. via OutputStream.

rather than having a pool of byte[] data in CachedData - the data would
pass straight into the memcache output stream

those cases would mean no automatic compression, but having the data pulled
/ pushed directly could provide a nice speed boost.

Original issue reported on code.google.com by shalmaneser@gmail.com on 31 Jan 2009 at 3:19

GoogleCodeExporter commented 9 years ago
The underlying protocol implementation doesn't use output streams, it packs byte
buffers and passes them onto NIO for delivery when bandwidth is available.

I'd imagine adding a stream interface might make things less optimal since 
multiple
commands couldn't be transmitted in the same packet, but I don't imagine it'd be
worth the effort just based on how I'd imagine doing it.

If you'd like to give it a shot and see if you can make it measurably better, 
I'd
probably take it, but I can't think of a way I'd do it that would lead to 
improvement.

Original comment by dsalli...@gmail.com on 10 Feb 2009 at 7:58