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

2018-11-07 Thread John Ralls
> On Nov 8, 2018, at 9:57 AM, Craig Arno 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

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

2018-11-07 Thread Craig Arno
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

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

2018-11-07 Thread John Ralls
> On Nov 8, 2018, at 8:50 AM, Craig Arno wrote: > > On 11/7/2018 1:42 PM, Craig Arno wrote: >> Using a queue has other benefits if you find yourself in a situation... > > For the "offline" update usecase where the primary database is "server" > based, a local SQLite database could be used

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

2018-11-07 Thread John Ralls
> On Nov 8, 2018, at 9:00 AM, Craig Arno wrote: > > On 11/7/2018 3:43 PM, John Ralls wrote: >> Always keep GnuCash’s target audience (Personal/Small Business) in mind: >> We’re definitely not designing for “heavy database updates”. > > "heavy database updates" can be caused in a

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

2018-11-07 Thread Craig Arno
On 11/7/2018 3:43 PM, John Ralls wrote: > Always keep GnuCash’s target audience (Personal/Small Business) in > mind: We’re definitely not designing for “heavy database updates”. "heavy database updates" can be caused in a Personal/Small Business application when two asynchronous events arrive at

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

2018-11-07 Thread Craig Arno
On 11/7/2018 1:42 PM, Craig Arno wrote: > Using a queue has other benefits if you find yourself in a situation... For the "offline" update usecase where the primary database is "server" based, a local SQLite database could be used for local offline work (travel receipt entry), which the database

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

2018-11-07 Thread John Ralls
> On Nov 8, 2018, at 6:42 AM, Craig Arno wrote: > > On 11/6/2018 3:54 PM, John Ralls wrote: >> Read about SQLite3 locking: https://www.sqlite.org/lockingv3.html >> . They’re locking virtual memory >> pages, totally independent of table or record

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

2018-11-07 Thread Craig Arno
On 11/6/2018 3:54 PM, John Ralls wrote: > Read about SQLite3 locking: https://www.sqlite.org/lockingv3.html. > They’re locking virtual memory pages, totally independent of table or > record structure. In practice what that means is that at the > application level only using the SQL Transaction API

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

2018-11-06 Thread John Ralls
> On Nov 7, 2018, at 3:16 AM, Craig Arno wrote: > > On 11/6/2018 4:19 AM, John Ralls wrote: >> We intend to convert the XML backend to loading a SQLite3 in-memory database >> at session startup so that we can query against it instead of the current >> QOFQuery. I’m still working out how to

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

2018-11-06 Thread Craig Arno
On 11/6/2018 4:19 AM, John Ralls wrote: > We intend to convert the XML backend to loading a SQLite3 in-memory > database at session startup so that we can query against it instead of > the current QOFQuery. I’m still working out how to handle the > transition and how to prioritize it relative to

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

2018-11-06 Thread John Ralls
> On Nov 6, 2018, at 4:47 PM, Craig Arno wrote: > > Phil, > > I did more investigation of SQLite v3 today and found a few impressive > things to summarize and pass along, which you may already know, but if not: > > 1. SQLite is "/full featured/", providing almost all of the features of >

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

2018-11-05 Thread Craig Arno
Phil, I did more investigation of SQLite v3 today and found a few impressive things to summarize and pass along, which you may already know, but if not: 1. SQLite is "/full featured/", providing almost all of the features of a "Server" based database installation; *triggers* being the

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

2018-11-05 Thread Craig Arno
Got it, and noted.  "Won't support" isn't the same as "won't work" (user beware).  But I get not putting free effort into a product someone else profits from. On 11/5/2018 2:30 PM, John Ralls wrote: > SQL Server isn’t Free Software, so we won’t support using it. Same for > Oracle, DB2, and any

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

2018-11-05 Thread John Ralls
> On Nov 6, 2018, at 7:19 AM, Craig Arno wrote: > > I like John's idea, > > Here is potentially another big group of GnuCash customers/users, Microsoft > product users (also supported by ODB) > > Microsoft SQL Server (MSDN Trigger documentation) >

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

2018-11-05 Thread Craig Arno
I like John's idea, Here is potentially another big group of GnuCash customers/users, Microsoft product users (also supported by ODB) Microsoft SQL Server (MSDN Trigger documentation) https://msdn.microsoft.com/en-us/library/sdk3bcyw.aspx?f=255=-2147217396 Craig On 11/5/2018 2:08 PM, John

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

2018-11-05 Thread John Ralls
> On Nov 6, 2018, at 6:18 AM, craigarno wrote: > > Isn't SQLite for "single" application use? Or are you thinking GnuCash will > be operating "peer-to-peer" (even more interesting thought for tiny > organizations)? > > Maybe conditional code with SQLite being a third database type. To

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

2018-11-05 Thread craigarno
SQLite "trigger" example: http://www.sqlitetutorial.net/sqlite-trigger/ -- Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html ___ gnucash-devel mailing list gnucash-devel@gnucash.org

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

2018-11-05 Thread craigarno
Isn't SQLite for "single" application use? Or are you thinking GnuCash will be operating "peer-to-peer" (even more interesting thought for tiny organizations)? Maybe conditional code with SQLite being a third database type. -- Sent from:

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

2018-11-05 Thread Phil Longstaff
I would assume postgresql and mysql would be more likely to provide this kind of notification because they have a central server. sqlite does not. I'm not sure how it could have 2 instances notify each other if they are just accessing the same sqlite file. On Mon, Nov 5, 2018 at 3:47 PM craigarno

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

2018-11-05 Thread craigarno
Here is an outline for high performance record lock/update/release activity, "Consumer/Producer" model. https://www.xaprb.com/blog/2007/08/29/how-to-notify-event-listeners-in-mysql/ Good discussion of the problems surrounding multiple source remote data updates, which definitely will go along

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

2018-11-05 Thread craigarno
Here is an example for MySQL http://www.mysqltutorial.org/create-the-first-trigger-in-mysql.aspx -- Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html ___ gnucash-devel mailing list gnucash-devel@gnucash.org

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

2018-11-05 Thread craigarno
And here is an example for PostgreSQL https://www.postgresql.org/docs/9.6/trigger-example.html -- Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html ___ gnucash-devel mailing list gnucash-devel@gnucash.org

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

2018-11-05 Thread craigarno
Ok, think I see how GnuCash User/devel lists are organized, think I'm on dev right now??? Phil's point is a valid one, Observer pattern works fine in local code on the local machine, but how do you get SQL database notification of an update to "trigger" an update cycle in other remote machines so

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

2018-11-05 Thread Geert Janssens
Op maandag 5 november 2018 20:16:04 CET schreef Craig Arno: > Geert, > > I just subscribed to the gnucash-devel mailing list. Where do I find > the list so I can find and respond to your message? I also need to > respond to Phil's message, in gnucash-devel. > > Short answer, no we do not have

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

2018-11-05 Thread Craig Arno
Geert, I just subscribed to the gnucash-devel mailing list.  Where do I find the list so I can find and respond to your message?  I also need to respond to Phil's message, in gnucash-devel. Short answer, no we do not have different ideas.  I need to help you understand my answer.  Looks like

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

2018-11-05 Thread Geert Janssens
Op maandag 5 november 2018 08:36:25 CET schreef craigarno: > Geert Janssens-4 wrote > > > Op zondag 4 november 2018 14:49:22 CET schreef craigarno: > >> Geert Janssens-4 wrote > > > > Whether it can work depends on > > whether the db layer we rely on has a notification mechanism for db > >