Automatic price quotes & PostgreSQL backend

Derek Atkins warlord at MIT.EDU
Tue Oct 29 13:39:01 EDT 2013


Hi,

David <dgpickett at aol.com> writes:

> These daemon sort of functions have traditionally been implemented either 1)
> as a second app that runs as a daemon and has these limited functions, or 2)
> as an option telling it to be a daemon (like sendmail -bd) with a second copy
> running, or 3) as a thread or periodic task in the single application.  The
> latter options keeps all code in one app, but the first two need to tolerate
> multiple users on the files or data storage.
>
> Does the GNUCash xml storage have a RDBMS/SQL layer over it?  The xml storage

No, it does not.  And even if it did (there's been some discussion of
loading the XML into an in-memory SQL database) that wouldn't help the
case of multiple writers.  Right now GnuCash does not support multiple
writers, even when using the SQL backend.

> might not be as amenable to second users as the SQL versions, but regardless,
> you have to be doing things that do not open the possibility of either app.
> overlaying the other's changes.  Prices are probably easier to do than
> scheduled transactions, as price tables are not in continuous use, and that
> mostly read only, but account registers are.  Doing it all in one app left
> running solves some of the conflict and concurrency issues.
>
> Getting the daemon/startup launch varies by O/S.  It could be under cron or
> the Windows Task Scheduler, or could run continuously like so many pesky
> processes in windows, e.g., real_something.exe checking for updates to the
> realplayer.  In X, it could run windowless until a user logs on and runs a
> second copy, which tells the first what the DISPLAY is that it needs to add
> windows to.  It might even learn to close all windows when dismissed, but keep
> running.

Your better bet would be to have a background timer thread from within
GnuCash itself that would run these functions.  Note that the Scheduled
Transaction (Since Last Run) may require user input, so it cannot be run
as a batch job.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list