Jump to content
Robert_Ha

Connecting Delphi 10.1 App to Azure Cosmos DB for MongoDB

Recommended Posts

Hello everyone,

 

I'm new to the Cloud topic and how to connect my Delphi 10.1 dektop application to the "Azure Cosmos DB for MongoDB" Cloud-storage (NoSQL?). The MongoDB is set up by someone else and I have to connect to it, send and retrieve data in json format.
In my understanding, the cloud needs a REST-API as interface to which I connect with my Delphi-App (because of security). I don't really understand with which component or class of Delphi 10.1 I can communicate with it. Can I use the "AzureConnectionInfo" and "AzureAPI" for all tasks? Do I need to use TRESTClient/Request/Response? Is the use of FireDAC reasonable for NoSQL?

I'm lost here, because the documentation of Embarcadero is really short on that.

 

Thank you very much in advance!

 

Robert

Edited by Robert_Ha

Share this post


Link to post

Thank you so much for your input.

But I dont think I can use open source code for my project because it will handle a lot of sensible patient data. Nonetheless I will definitly look into it.

It would be great if there were some native delphi components which could handle the task. I read a lot about the Rad Server, but I'm not quite sure if it does all that I want.

Share this post


Link to post
On 9/9/2024 at 12:47 PM, Robert_Ha said:

In my understanding, the cloud needs a REST-API as interface to which I connect with my Delphi-App (because of security).

Creating a public endpoint

 

What I understand is that it is not safe to publish the Azure database endpoint in your Delphi application.

I still investigate if creating a public endpoint in Azure solve this. See link above..

Share this post


Link to post
23 minutes ago, Die Holländer said:

Creating a public endpoint

 

>>> That it is easy possible to use the azure database directly from a Delphi application I know because

>>> I wrote an VCL application just doing this and the users are very happy with it.

You wrote in your response in the other post that you achieved an easy connection and DB access. Do you have an example where I can start which the access? I'm lost which component to use and how to connect with it to the Azure Cosmos DB for MangoDB.

Share this post


Link to post

Again, thank you for the information, you are a great help. I'm currently working through the material and trying to understand everything. I apologize in advance if more questions come up. :classic_laugh:

Share this post


Link to post

Please, if you find out some good things to know for other developers then

come back here and add some solutions and info.

Share this post


Link to post

Hi again,

I'm struggeling to find a way to receive the pem files for the TLS/SSL certificates:
 

(https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_MongoDB_Database_(FireDAC))

SSLPEMKeyFile -- is the path name to the .pem file that contains the SSL certificate and key.

SSLCAFile -- is the path name to the .pem file that contains the certificate from the Certificate Authority (CA).

 

Do I need to buy them or is there a step by step guide which describes what I have to do from the very start? There are guides in the internet but I'm not sure if they explain what I need.

 

Robert

Edited by Robert_Ha

Share this post


Link to post

I can't help you with this question. Don't you need the PEM (Public) file from the server people?

Isn't it possible to ask for the connect string from Azure at your database person ("someone else")?

Like the example:

https://samadhiweb.com/tags/Azure.html

 

I believe, sometimes I see the Delphi database (FireDac) guru here on the form

Maybe you can ask him about connecting the Mongo Azure database with SSL: 

Dmitry Arefiev

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×