DAML server

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?

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.

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

1 Like

Thanks for your response.

So even the DAML command is not necessary?

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

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

1 Like

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?

What upload are you referring to?

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.

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

2 Likes

perfect!