Backend cloud services

Hello everybody

What solution do you use for backend cloud services : Authentification, Database and file storage?

Is it easy to use AWS or Firebase in Xojo Apps (Desktop, Mobile, Web)?

This is a very wide open question, do you have specific concerns?

As far as a Web App running in the cloud, I recommend either AWS Lightsail or DigitalOcean. It’s very easy to get a Xojo Web app up and running on those services. I wrote an app called Lifeboat which makes deployment to a remote Linux VPS very easy. I even created some video tutorials to show how to deploy to those providers in under five minutes. Lifeboat can also set up your regular website right next to your web apps on the same server.

When writing a Web App to act as a backend service in the cloud, authentication is kind of up to you. If you have specific questions about best practices, I’m sure a security expert could make some recommendations. I usually pass authentication through headers, which is extremely easy to do with URLConnection. Headers are encrypted when you communicate over SSL / HTTPS.

Databases are another subject you might want to be more specific about your questions with. Lifeboat can install PostgreSQL right into the same VPS instance as your web apps, or you can use SQLite. MySQL is a bit more challenging, and currently you’d either have to install it yourself or use something like RDS (which would add to your costs).

Is there a challenge your facing that you need help with? Do you have specific questions we can answer? I currently use Xojo Desktop communicating with Xojo Web apps configured by Lifeboat hosted in the providers I recommended above. Overall it’s been a smooth process.

I am not looking for web hosting. I am looking for web services.

I want to create a desktop app and a mobile app that share the same user data. I don’t want to store data locally but in a cloud service such as a database and file provider.

Imagine a simple to-do list with linked files: What kind of architecture do I need for desktop and mobile apps to work together and sync

You need a web app (of some sort, even if not Xojo) to act as an API. It is a massive security hole to connect the user client apps to your database directly. The API should be the one to connect to the database, to keep the credentials and specifics away from both the user and snooping malicious actors.

ToDo.app > WebAPI > Database
3 Likes

Thanks @Tim_Parnell my question is can I use ready to use services like AWS, MongoDB, Firebase or do I have to make my own backend with PHP and MySQL

AWS RDS offers several database engines, many of which connect directly with Xojo Database Plugins (requires a Desktop license at minimum, not available with a Lite license)

The other two you’ll need to search for drivers as there’s nothing out of the box. You will find results by searching “Xojo {engine}” but I cannot personally recommend any of them, so I will leave that option to you.

1 Like

For the database either AWS or Azure will work fine and are both pretty straight forward in regards to getting the DB setup.

The key and security issue is to have something sit between the DB and outside world that acts as an API to your DB, serving data to your APP. This API is the only thing that would have access (controlled by IP address on those same servers) to your DB.

To me, the easiest solution to create your API is PHP that handles the queries from your Desktop app through simple calls to the page, then it accesses the DB and sends back or writes the data.

1 Like