Skip to content
Discussions/App Development/DAML serverForum ↗

DAML server

App Development9 posts246 views4 likesLast activity Dec 2021
H_
h_twistOP
Dec 2021

I am trying to develop a server that will store the DAMLcontracts into a PostgreSQL database.

Reading the documentation I could identify the following requirement for this task:

  1. the standalone JAR to expose the HTTP API;

  2. the PostgreSQL driver to intermediate the ledger and persistent storage connection;

So far I am running locally with the help of the SDK (DAML deploy), do I need the SDK for the production environment as well or is there any alternative command for this task?

Also, am I missing anything or this is pretty much the backbone of a DAML ledger server with PostgreSQL?

ST
stefanobaghino-da
Dec 2021
h_twist:

So far I am running locally with the help of the SDK (DAML deploy), do I need the SDK for the production environment as well or is there any alternative command for this task?

You can also run the Daml Driver for PostgreSQL as a standalone JAR. The documentation contains instructions to download it and run it, alongside further guidance.

h_twist:

Also, am I missing anything or this is pretty much the backbone of a DAML ledger server with PostgreSQL?

Indeed, if you are running the Daml Driver for PostgreSQL that’s all you need.

H_
h_twist
Dec 2021

Thanks for your response.

So even the DAML command is not necessary?

Because this tutorial here uses both the driver and the deploy command.

ST
stefanobaghino-da
Dec 2021

You can use the SDK assistant but it’s not necessary. Deploying the JAR yourself makes the deployment leaner.

H_
h_twist
Dec 2021

Thank you very much again.

One last question, is there any place in the documentation or elsewhere where to find how to do the upload it manually?

ST
stefanobaghino-da
Dec 2021

What upload are you referring to?

H_
h_twist
Dec 2021

If I understood correctly, the command daml deploy allocates the parties and uploads the DAR files to a specific port, and on my workflow, it seems the only time which I used the SDK, then you said I could do it manually, so I wondered where to find it.

ST
stefanobaghino-da
Dec 2021

Since it looks like you are using the HTTP-JSON API, this is the documentation you’re asking for:

H_
h_twist
Dec 2021

perfect!

← Back to Discussions