Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 160267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:00:16+00:00 2026-05-11T11:00:16+00:00

Let’s say I have two or more processes dealing with an SQLite database –

  • 0

Let’s say I have two or more processes dealing with an SQLite database – a ‘player’ process and many ‘editor’ processes.

The ‘player’ process reads the database and updates a view – in my case it would be a waveform being mixed to the soundcard depending on events stored in the database.

An ‘editor’ process is any editor for that database: it changes the database constantly.

Now I want the player to reflect the editing changes quickly.

I know that SQLite supplies hooks to trace database changes within the same process, but there seems to be little info on how to do this with multiple processes.

I could poll the database constantly, compare records and trigger events, but that seems to be quite inefficient, especially when the database grows to a large size.

I am thinking about using a log table and triggers, but I wonder if there is a simpler method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:00:17+00:00Added an answer on May 11, 2026 at 11:00 am

    A relational database is not your best first choice for this.

    Why?

    You want all of your editors to pass changes to your player.

    Your player is — effectively — a server for all those editors. Your player needs multiple open connections. It must listen to all those connections for changes. It must display those changes.

    If the changes are really large, you can move to a hybrid solution where the editors persist the changes and notify the player.

    Either way, the editors must notify they player that they have a change. It’s much, much simpler than the player trying to discover changes in a database.


    A better design is a server which accepts messages from the editors, persists them, and notifies the player. This server is neither editor nor player, but merely a broker that assures that all the messages are handled. It accepts connections from editors and players. It manages the database.

    There are two implementations. Server IS the player. Server is separate from the player. The design of server doesn’t change — only the protocol. When server is the player, then server calls the player objects directly. When server is separate from the player, then the server writes to the player’s socket.

    When the player is part of the server, player objects are invoked directly when a message is received from an editor. When the player is separate, a small reader collects the messages from a socket and calls the player objects.

    The player connects to the server and then waits for a stream of information. This can either be input from the editors or references to data that the server persisted in the database.

    If your message traffic is small enough so that network latency is not a problem, editor sends all the data to the server/player. If message traffic is too large, then the editor writes to a database and sends a message with just a database FK to the server/player.


    Please clarify ‘If the editor crashes while notifying, the player is permanently messed up’ in your question.

    This sounds like a poor design for the player service. It can’t be ‘permanently messed up’ unless it’s not getting state from the various editors. If it’s getting state from the editors (but attempting to mirror that state, for example) then you should consider a design where the player simply gets state from the editor and cannot get ‘permanently messed up’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 71k
  • Answers 71k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer A Control has all the plumbing required to act as… May 11, 2026 at 1:19 pm
  • added an answer Suppose: var a = false, b = '', c =… May 11, 2026 at 1:19 pm
  • added an answer A working solution is posted on my blog: http://borismod.blogspot.com/2009/04/wcf-collectiondatacontract-and.html UPD:… May 11, 2026 at 1:19 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.