-
Sep 27th, 2020, 02:16 AM
#1
Thread Starter
New Member
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 ?
-
Sep 27th, 2020, 06:00 AM
#2
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.
-
Sep 28th, 2020, 03:10 PM
#3
Re: Integration web application with local database
Originally Posted by aronaman
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
-
Sep 28th, 2020, 08:26 PM
#4
Re: Integration web application with local database
Originally Posted by techgnome
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|