[dev] Adding SQLite as a new optional dependency

Quentin Young qlyoung at cumulusnetworks.com
Tue Jun 19 14:41:44 EDT 2018


IMO sqlite is a good fit here.

- The codebase overhead is extremely low (sqlite amalgamation is 1 source file, so we don’t even need a new external dependency)
- As Renato mentioned, sqlite supports in-memory databases and I’ve had positive experiences using them myself
- sqlite is rock solid, well understood, easy to debug, and fast enough for our purposes

My thoughts on the other suggestions in this thread:

- libgit2 - agree with Renato, this library has a massive amount of complexity compared to the sliver of functionality we’d be using
- BerkelyDB - overkill for this task and a big (as in size) dependency
- unqlite - looks neat but I see no reason to use this over sqlite, which has much larger traction

My 2c.

> On Jun 19, 2018, at 4:17 AM, <olivier.dugeon at orange.com> <olivier.dugeon at orange.com> wrote:
> 
> Hello Renato, Donald,
> 
> As we need a Database which is suitable for the embedded constraints, why not also looking to Berkley DB or UnQlite.
> 
> Both of them are written in C, simple to link and store all the database in a single file and of course are design for the embedded devices.
> my 2 cts,
> 
> Olivier
> 
> Le 19/06/2018 à 03:27, Renato Westphal a écrit :
>> @Vincent Thanks for your suggestion. I think libgit2 could be a good
>> fit in the sense that we would store only the deltas instead of full
>> configurations. But other than that, I think libgit2 would introduce
>> more complexity and would bring other challenges to solve. I'll
>> analyze this more carefully tomorrow.
>> 
>> @Donald Yes, Martin raised the same concern last time I talked to him.
>> Using the SQLite solution this wouldn't be a problem since SQLite
>> supports in-memory databases. As a matter of fact, this shouldn't be a
>> problem for any solution we choose as long as we store the
>> transactions on a tmpfs directory.
>> 
>> On Mon, Jun 18, 2018 at 9:10 PM, Donald Sharp
>> <sharpd at cumulusnetworks.com> <mailto:sharpd at cumulusnetworks.com> wrote:
>>> Given the state of hard drives on whitebox switches, I think we need
>>> to carefully evaluate doing anything that might further involve a file
>>> system.
>>> 
>>> donald
>>> 
>>> On Mon, Jun 18, 2018 at 8:03 PM, Vincent Jardin
>>> <vincent.jardin at 6wind.com> <mailto:vincent.jardin at 6wind.com> wrote:
>>>> What's about using libgit2 ?
>>>>   https://libgit2.github.com/docs/guides/101-samples/ <https://libgit2.github.com/docs/guides/101-samples/>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> dev mailing list
>>>> dev at lists.frrouting.org <mailto:dev at lists.frrouting.org>
>>>> https://lists.frrouting.org/listinfo/dev <https://lists.frrouting.org/listinfo/dev>
>> 
>> 
> 
> _________________________________________________________________________________________________________________________
> 
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
> 
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
> _______________________________________________
> dev mailing list
> dev at lists.frrouting.org
> https://lists.frrouting.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20180619/167d90ed/attachment-0001.html>


More information about the dev mailing list