Recent

Author Topic: [Solved] Database in The Cloud  (Read 12838 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Database in The Cloud
« Reply #30 on: November 30, 2017, 03:55:49 pm »
ok...
So i need to do the following steps:
1. Create the database (almost done)
2. Create a website.
3. Create the interface
4. Create the desktop version
5. Create the iPad version.


Or am i forgetting something?
almost here is the list proposed.

1. Create the database (almost done)
2. Create a website.
3. use a web browser to access the web site and edit/view your data.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #31 on: November 30, 2017, 04:09:08 pm »
No i don't want to use the website to access the data.
i want to use the apps
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #32 on: November 30, 2017, 04:13:27 pm »
And then i completed have to remake this little fellow.
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Database in The Cloud
« Reply #33 on: November 30, 2017, 04:14:15 pm »
No i don't want to use the website to access the data.
i want to use the apps
then use your existing website to upload the database file, download it from your application and reupload it, replacing the old one if its needed and forget all about the web in any other form. Too much work for no benefits.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #34 on: November 30, 2017, 04:21:07 pm »
So then the steps are:
1. Download the database as a temp-file
2. Rename database on the server-side to ensure no other app can use it.
3. Run app
4. On/before exit app upload new database-file.
5. on upload complete delete old database server-side
6. delete temp-file
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

rvk

  • Hero Member
  • *****
  • Posts: 6162
Re: Database in The Cloud
« Reply #35 on: November 30, 2017, 04:25:12 pm »
So then the steps are:
1. Download the database as a temp-file
2. Rename database on the server-side to ensure no other app can use it.
3. Run app
4. On/before exit app upload new database-file.
5. on upload complete delete old database server-side
6. delete temp-file
For the Lazarus side you could do it like that (and hope nothing goes wrong when your application crashes).
(step 1&2 and 4&5 could probably be done by one PHP-page for downloading/uploading)

And how are you going to create the iPad/iPhone app?

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #36 on: November 30, 2017, 04:26:41 pm »
(step 1&2 and 4&5 could probably be done by one PHP-page for downloading/uploading)
But you always build in failsafes. That is why i rename the database server-side so that you always have the old database when app crashes for instance



And how are you going to create the iPad/iPhone app?

Well that is an entire different discussion  ;)



« Last Edit: November 30, 2017, 04:30:42 pm by madref »
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Database in The Cloud
« Reply #37 on: November 30, 2017, 04:40:44 pm »
So then the steps are:
1. Download the database as a temp-file
2. Rename database on the server-side to ensure no other app can use it.
3. Run app
4. On/before exit app upload new database-file.
5. on upload complete delete old database server-side
6. delete temp-file
depends on the degree of freedom you need/want. My personal preference would be to go the other way around. eg

1. Download the database as a temp-file
2. Run app
3. On/before exit app upload new database-file.
4. upload the changed database
5. Rename the old database on the server-side to ensure no data loss.
6. make sure that only the new database file can be downloaded
7. keep the temp database file and only re download it if the data need updating.
when you are at home you download all the old files and merge them in one to make sure that no data is lost replacing or not the existing database file on the server if needed.
In any case since this is going to be a single user application ee no way to have two version of the file edited in parallel by multiple downloads I guess your version looks safer but it does not cover in between updates or long execution/crashes etc.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #38 on: November 30, 2017, 06:42:37 pm »
Well thank you all for your thoughts
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018