[GNC-dev] [GNC] mysql backend, second user (lock, for example)

John Ralls jralls at ceridwen.fremont.ca.us
Wed Nov 7 21:56:47 EST 2018



> On Nov 8, 2018, at 9:57 AM, Craig Arno <craig at arno.com> wrote:
> 
> On 11/7/2018 4:14 PM, John Ralls wrote:
>> Not my understanding of “heavy database updates” (which would be something like > 100K TPS), but OK.
> Yeah, I may not be using the right terminology, but look at my suggestions as generally correct if not using the right glossary.  In the database arena I'm more of a semi-sophisticated user than a domain expert.  I assume you are a domain expert, at least relative to my database experience, an opportunity for me to learn.  What may be confusing is I do have a lot of engineering experience.

I’m nowhere near an expert on multiuser database work, but I have whacked at it a bit over the years.

> 
> In this case I considered processing two asynchronous events (second+ user) arriving at the same time, not raw processing throughput, a different kind of performance.  Even the "sync data" proposal in a SOHO environment shouldn't stress today's multi-core, gigabit memory commodity computers for throughput in a SOHO environment.  I'm thinking more race conditions caused by async (two+ user) events.  Still thinking SOHO.

That’s just simple concurrency. The part that may be outside of your experience is that it’s concurrency not just between different processes but between different computers and in your offline use-case it’s perhaps hard to recognize that “concurrent” doesn’t necessarily mean "at the same time”, it just means that there are potentially multiple updates of the same record on the two disconnected instances that need to be resolved somehow.

> 
> On 11/7/2018 4:16 PM, John Ralls wrote:
>> That’s a lot more complex than any backend I’d want to implement, but fortunately GnuCash’s backends are plugins so you’re welcome to write a separate one.
> Fair enough.  Hopefully architecture framework design decisions can support this sort of future "plugin" expansion.  Guess I'd better look for "plugin support documentation", see what I can figure out.

Unfortunately there isn’t any good documentation of how to write a plugin. There’s some API documentation at https://code.gnucash.org/docs/MAINT/group__Backend.html <https://code.gnucash.org/docs/MAINT/group__Backend.html> and https://code.gnucash.org/docs/MAINT/group__Object__Private.html, but there’s not much detail and there’s no tutorial. You’ll need to study the code in libgnucash/engine/qof-backend.cpp and libgnucash/backend/dbi to see how to register your new backend.

Regrds,
John Ralls



More information about the gnucash-devel mailing list