did you consider Amazon Web Services (AWS)?+10 !
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.
I have build a database and now i want to expand it to the cloud.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.
But i have no freaking way how to get this solved
Has anyone a good suggestion on how to get things started?
And i am not working in windows but osx
I have own webspace that runs a CMS[/font]
I really don't know.
Database: cloud_referee
Host: localhost
username: cloud_referee
password: JustAWord001
Can't i access it directly from Lazarus?No, it is insecure to do so and all server installation have taken steps to ensure that mysql is only accessible from the LAN that the web server is part of. You need to write some sort of service (or a middle tire if you will) to give access to the database.
Can't i access it directly from Lazarus?
hmmm...complicatedIt allows the library used for the database to decide that. In general for every sql based database it only loads what ever the sql requests from the server/database (what ever a TSQlquery control has in memory) . The rest are simple locked on disk from access in case of sqlite.
...
Back to another thought:
Since my database is stored locally now.
How does lazarus access this database when i open it?
Does it load the complete database into memory?
Does it only load the part that is requested?
In short how does lazarus do it?
So it would be possible to download the entire database (<200Kb) into memory.
Or to keep the connection to that file open so that TSQLQuery can access it anytime.
Is that recommendable?
So it would be possible to download the entire database (<200Kb) into memory.yes you can download the complete database in memory or temp files and 200KB is smaller than most html pages out there.
Or to keep the connection to that file open so that TSQLQuery can access it anytime.No. SQLite is a local database the file opened must be on the same computer the library is running. Once a connection is made to the database, the database is locked for all other connections. You need a single service that can accept multiple connections. You need to write a middle tire no way around it. The real question is why not share the database with your application or include it in the installation? If needed some kind of update procedure can be coded that will download updates from a server and apply them to a local database.
Is that recommendable?
Or is there another way to achieve this?create a small web page to work with. You can use brook or any pascal framework for that if you want, I would go with a more web available software though (php, asp.net etc).
Or is there another way to achieve this?
ok...almost here is the list proposed.
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?
No i don't want to use the website to access the data.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.
i want to use the apps
So then the steps are:For the Lazarus side you could do it like that (and hope nothing goes wrong when your application crashes).
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
(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?
So then the steps are: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. 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