Results 1 to 4 of 4

Thread: Integration web application with local database

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2020
    Posts
    5

    Integration web application with local database

    I made a web application and I want to integrate with a desktop app(which has its own local database), and what I did is i make api on my web application then i create cron job for the desktop to fetch data every 30sec (if there is any change either new record, update a record, delete), execute in a local database.

    my question is when I delete a record from a web app it successfully deletes it from the cloud server, but how can i delete from the desktop (b/c it already delete from the server)? and consider i have 1k client (desktop user with local database) and when i send cron job every 30 sec it will increase server load right? if so how should i manage it ?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Integration web application with local database

    You've still asked two unrelated questions in one thread. One thread per topic and one topic per thread.

    With regards to deleting, the answer is that you don't. Instead of physically deleting, you logically delete. That means having a column of Boolean values that you set to False by default and True to indicate that a record is deleted. It's more like deactivating or disabling than deleting. Many people do this as a matter of course, so no data is ever lost once added.

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Integration web application with local database

    Quote Originally Posted by aronaman View Post
    I made a web application and I want to integrate with a desktop app(which has its own local database), and what I did is i make api on my web application then i create cron job for the desktop to fetch data every 30sec (if there is any change either new record, update a record, delete), execute in a local database.

    my question is when I delete a record from a web app it successfully deletes it from the cloud server, but how can i delete from the desktop (b/c it already delete from the server)? and consider i have 1k client (desktop user with local database) and when i send cron job every 30 sec it will increase server load right? if so how should i manage it ?
    I think you've gone about it all wrong... there shouldn't be a cron job, there shouldn't be a local database... there should only be the remote database. You get your data from it, you manipulate it, and you send it back.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Integration web application with local database

    Quote Originally Posted by techgnome View Post
    there shouldn't be a local database
    Probably the only good reason to have a local database would be if you want to be able to work offline. As you suggest, if you're always working online then you should be working against the master database online. If you do want to be able to work offline then you need to decide what data is required to be synced from the master to the local database and how often it happens in preparation for those instances. It would probably be preferable to avoid editing existing data offline and stick to only adding new data if possible, in which case you would only need data for selection lists in the local database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width