Recent

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

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
[Solved] Database in The Cloud
« on: November 29, 2017, 10:39:22 am »
I have build a database and now i want to expand it to the cloud.
But i have no freaking way how to get this solved


Has anyone a good suggestion on how to get things started?
« Last Edit: November 30, 2017, 06:42:59 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

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: Database in The Cloud
« Reply #1 on: November 29, 2017, 12:53:28 pm »
did you consider Amazon Web Services (AWS)?
Lazarus 2.0.2 64b on Debian LXDE 10

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Database in The Cloud
« Reply #2 on: November 29, 2017, 01:19:16 pm »
The easiest but most unsafe way is just to expose the port worldwide, then your app just needs to change the host address. The better way would be to wrap db operations in a webservice so it's limited to only what endpoints you provide.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Database in The Cloud
« Reply #3 on: November 29, 2017, 01:50:50 pm »
Quote
did you consider Amazon Web Services (AWS)?
+10 !

My servers, based on the mORMot, run on AWS.
Very cheap, VERY reliable.

AWS is easy to try: you can get a server for free for one year.
Just get one, and install a Linux version.
Get yourself the mORMot. Run the http database server, open a port and you are ready to go !!

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Database in The Cloud
« Reply #4 on: November 29, 2017, 01:56:54 pm »
The easiest but most unsafe way is just to expose the port worldwide, then your app just needs to change the host address. The better way would be to wrap db operations in a webservice so it's limited to only what endpoints you provide.

If that means you must also maintain a webserver, there are a lot of things that can go wrong configuring and maintaining a webserver too. Specially if it doesn't just serve static content.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #5 on: November 29, 2017, 02:39:20 pm »
I have an own website (which i pay for) and it runs a cms.


Can i install something on that?

« Last Edit: November 29, 2017, 02:51:34 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

Almir.Bispo

  • Jr. Member
  • **
  • Posts: 91
  • CSV Comp DB is the Best NoSQL
    • CSV Comp DB (NoSQL)
Re: Database in The Cloud
« Reply #6 on: November 29, 2017, 07:00:38 pm »
CSV Comp DB Developer {Pascal Lover}

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #7 on: November 29, 2017, 09:47:47 pm »
Damn i don't speak that foreign language and i am using SQLite
And i am not working in windows but osx


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 #8 on: November 29, 2017, 09:54:31 pm »
Or can i just put the database (which is now 175 Kb) as a file (which it is now)
on a certain spot on my website and access it as a normal file and load it into memory and when i am done put it all back?
or does SQLite always has acces to that 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

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Database in The Cloud
« Reply #9 on: November 29, 2017, 10:31:29 pm »
I have build a database and now i want to expand it to the cloud.
But i have no freaking way how to get this solved


Has anyone a good suggestion on how to get things started?
well this is very generic specification.... actually there is nothing specific about it. What does it mean to expand it on the cloud? being able to edited from a web page? to be able to update its data from your client application through the internet? there are a number of ways to work with, for example, you can send an email to your address with the updated data and have an application download and import them automatically to a local database. You can upload them to a server (ftp, http, email doesn't make any difference) and do the same with a scheduled task on that machine. Settle down on what you want to do and your choices will present them self or we can suggest various routes, in any way expand in to the cloud is something that water vapour does well.
« Last Edit: November 29, 2017, 10:33:11 pm by taazz »
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

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Database in The Cloud
« Reply #10 on: November 29, 2017, 10:36:34 pm »
And i am not working in windows but osx

You probably need to familiarize yourself with Web technologies. A good way to start would be to investigate AWS, as suggested above. Here's some notes on getting started:

https://macpgmr.github.io/MacXPlatform/PascalDynLibs_4.html

Unlike a Web site, where typically you're restricted on what you can do, with an AWS server you can install and do just about anything you want. A common use for an AWS server is to run a Web server (eg, IIS with Windows or Apache with Linux).

Once you've spent some time with AWS, think about what kind of Web access you want to your database and then investigate what it will take to program that access - eg, as a SOAP or REST Web service, CGI app, etc. The notes above reference a CGI app that you can take a look at.

You can develop and test your server-side program on Mac and then recompile it on your Windows or Linux server.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #11 on: November 29, 2017, 10:41:24 pm »
This is the idea i have.My database is in the cloud on some server (preferably my own webspace).
My application accesses this database and inserts, edits or deletes data.
The same as a do now, but then just on my laptop locally.
I think that is the best course of action for now.So my initial question still stands...How do i do that?

P.S. The things i am thinking of using:
* Lazarus
* Database for now is in SQLite. Prefer to keep it that way.
* I have own webspace that runs a CMS
« Last Edit: November 29, 2017, 10:42:57 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

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Database in The Cloud
« Reply #12 on: November 29, 2017, 10:43:03 pm »
I have own webspace that runs a CMS[/font]

I don't know what a "webspace" is. Can you install and run binary executables on it? IIS or Apache?


madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Database in The Cloud
« Reply #13 on: November 29, 2017, 10:57:27 pm »
I really don't know.


Because it runs a CMS (WordPress) i have access to my website and i have access to the database behind it.
I can do that directly or through phpMyAdmin.
I can also make and delete databases from my webspace.


So to keep it simple for me i was thinking of recreating the same database i have local (on my laptop)
and then some kind of way of accessing that.



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

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Database in The Cloud
« Reply #14 on: November 29, 2017, 11:02:51 pm »
I really don't know.

Sometimes Web sites will provide PHP and allow you to run PHP software. They may also provide some database support. For example, WordPress needs PHP and MySQL (and HTTPS support) so your Web site probably has all of that. I would guess though that you would not be able to run just anything (eg, compiled Pascal executable, SQLite, etc.).

Again, I would suggest AWS at least for the learning opportunity it will provide. You could always move WordPress over to an AWS server too.

 

TinyPortal © 2005-2018