Subject: Re: [boost] [AFIO] Review (or lack of it)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-08-30 10:55:02
On 29 Aug 2015 at 19:37, Roland Bock wrote:
> Huh? I thought the purpose of the example was to serve as an
> introduction to doing it better with AFIO?
I've posted a much better simple transactional key-value store API to
https://gist.github.com/ned14/163ac57c937bda61e5c9. It'll probably
become the standard API for all that tutorial's stages.
> But anyway, that complaint is unfounded. Citing from from that page of
> yours, one of the conditions of that "simplest blob store":
> "The size of the values being read and written is small."
> That's why I asked you to reread your own conditions before answering.
That's a condition caused by the quality of implementation, not
quality of interface design. I would have thought that very obvious
from the implementation.
> Of course, I could also do something super simple with streams, too, if
> you insist on them:
> #include <iostream>
> #include <fstream>
> #include <vector>
> #include <string>
> class data_store
> std::string _store_path;
> std::ifstream _ifs;
> std::ofstream _ofs;
> data_store(std::string store_path);
> data_store(const data_store&);
> auto getIstream(std::string name) const
> -> std::istream&;
> auto getOstream(std::string name)
> -> std::ostream&;
> (I would not call this the world's simplest named blob store anymore.
> You might feel tempted to call that bad design, too. But please remember
> that there is another of your conditions
> "Only one thread or process will ever interact with the key-value store
> at a time."
> But honestly, I would rather forget about the streams in the "simplest"
> blob store. I'd rather extend my original code with methods to append
> data or to read chunks.
My replacement API exclusively uses scatter gather buffers. I agree
the STL iostreams interop is probably unnecessary. I only added it
because I could see complaints here that AFIO isn't STL iostreams
friendly, as it happened nobody actually complained about that.
> > Anyway, it's been made very clear by many reviewers that nobody likes
> > the workshop tutorial, so I should imagine that the interface will be
> > completely refactored into something less controversial.
> But it will stay a named blob store? I am actually interested in that.
> >> Please remember to read your own conditions before making unfounded
> >> claims about how this is much, much worse in oh so many ways than the
> >> one you claim to be the simplest one.
> >> Still trying to help, although you might believe or see it that way.
> > You might find me far more receptive to your help if you had (a) not
> > publicly questioned my sanity (b) used my mention of the hours I have
> > invested into the development of AFIO as a basis for rejecting it in
> > your review (c) accused me of trying to "shape" the review or
> > whatever you called it, and then also used that as a basis for
> > rejecting my library.
> a) I did no such thing! If you read it that way, I am very sorry for the
I'll chalk that down to a misunderstanding. Thanks for the apology.
> b) It was a combination of things, and I stand by that
> c) I stand by that
> I offered to explain face to face at CppCon, because mail won't suffice
> to work this out.
I'm happy to talk with anyone anywhere about anything. I assume
you'll be at the Boost dinner?
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk