[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Request for Feedback: new BIO API
From: |
Alessio Vanni |
Subject: |
Request for Feedback: new BIO API |
Date: |
Sat, 09 May 2020 14:38:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello everyone,
as discussed in a different mail exchange[1], the BIO API isn't
considered a great API and it was suggested to improve on it. The
attached patch is an attempt to both improve the API and add
memory-backed buffers as proposed in the above-mentioned discussion.
Please note: this patch is not complete; it doesn't have tests (though
they were made to check that the API works) and most importantly doesn't
have modifications to port the rest of the code to the new API. This is
because this patch is only for review, so I will take any feedback, make
changes if needed and when we agree on a certain version I will also
change all the callers to BIO and provide the final patch.
The patch adds I/O on already-allocated buffers and provides a new API
similar to the one used for databases, as suggested by Christian. It
doesn't add I/O for arrays as I wasn't sure how to implement it, though
I had made an attempt before yanking it out and some hints at it can be
seen here and there (though they don't affect the rest of the code.)
To clarify here one of the design choices, the "spec" API uses the
handle in the spec definition instead of in the "commit" function so as
to declare all the operations on multiple sources/destinations all
together and execute them all in one go. I think it's fairly convenient
to do it this way instead of creating multiple specs, but this is just
my opinion and is not backed by any objective evaluation :)
Thanks,
A.V.
---
[1] https://lists.gnu.org/archive/html/gnunet-developers/2020-04/msg00015.html
0001-New-BIO-API.patch
Description: API proposal
- Request for Feedback: new BIO API,
Alessio Vanni <=
- Re: Request for Feedback: new BIO API, Alessio Vanni, 2020/05/11
- Re: Request for Feedback: new BIO API, Christian Grothoff, 2020/05/11
- Re: Request for Feedback: new BIO API, Alessio Vanni, 2020/05/14
- Re: Request for Feedback: new BIO API, Christian Grothoff, 2020/05/15
- Re: Request for Feedback: new BIO API, Alessio Vanni, 2020/05/15
- Re: Request for Feedback: new BIO API, Christian Grothoff, 2020/05/17
- Re: Request for Feedback: new BIO API, Alessio Vanni, 2020/05/18
- Re: Request for Feedback: new BIO API, Christian Grothoff, 2020/05/18