Serving .terraindb using Cesium Asset Server

Hi,

I’m trying to host .terraindb files in a server directory, but if I add a new file on the directory where its serving the files, it’s not visible.

Here are the steps that I did.

  1. I have a directory called Data, I added 3 files, WorldTerrain1.terraindb, WorldTerrain2.terraindb, and WorldTerrain3.terraindb.

  2. I ran asset-server -d Data

  3. I can access the 3 files perfectly through these links.

http://localhost:8002/WorldTerrain1/layer.json
http://localhost:8002/WorldTerrain2/layer.json
http://localhost:8002/WorldTerrain3/layer.json

  1. I added a new file called WorldTerrain4.terraindb on the Data directory.

  2. Tried browsing this link but it says
    {"code":"ResourceNotFound","message":"/WorldTerrain4/layer.json"}

  3. Tried restarting the asset-server command and then the link becomes available.

Is there a way to automatically serve the .terraindb files without having to restart the asset-server?

1 Like

Hi Cesium team,

I have this issue as well.
Is there any information for this?

1 Like

We are using 3D Tileset on-premises version here so I was not able to find a solution probably due to minor users population.

Can someone please answer this question in the cesium team?

1 Like

Hello,

Because .terraindb are database files that cannot be served statically, the server does need to be restarted when new such files are added. If you tell us more about your use case, we may be able to provide advice and/or create a feature request for asset-server. Can you please tell us more about why you need to be able to add .terraindb files without restarting asset-server?

Thanks,
Matt

1 Like

Hello Matt,

Thank you for your reply.
The reason why we need to add .terraindb files without restarting asset server its because we are generating these files through an API so new .terraindb files are created.

The links created by the asset-server is then being used to a terrain provider.

The link to the terrain tiles gets a 404 response code not until you restart the asset server manually, we worry that this would affect other users of the API when we restart the asset-server because other users are depending on the links hosted by the asset-server

1 Like

Hi,

Thank you for letting us know more about your use case. This is a reasonable feature request, and we’ve opened an internal ticket to track it. I do not have a timeline for it yet so I can’t say how soon we will get to it, but I will provide updates in this thread.

Thanks,
Matt

Hello,

I ran into this same requirement in my app. Is this feature available or have a timeline for it already?

Thanks!

Hi @Matt_Boyd-Surka,

Happy New Year. I’m reaching out to follow up on the ticket that was opened regarding the issue of updating .terraindb files without restarting the asset-server. Has there been any progress on this?

Additionally, I’m curious if there are any temporary workarounds to avoid restarting the asset-server every time new .terraindb files are added. For example, is there a possibility of implementing a “soft” or “polite” restart which wouldn’t disrupt the current service?

The ability to update and serve terrain data dynamically seems fundamental and I’m wondering if there’s an obvious solution that I might be missing.

Thank you for your attention to this matter.

Best regards,
Marc

Hi @marcj,

With the release of Cesium ion self-hosted we’ve sunset asset-server as self-hosted supercedes and replaces asset-server. If you’re interested in checking out self-hosted you may find the section on tiling and serving data without kubernetes to be useful. Using self-hosted you can do exactly the flow you’re requesting, where you just copy a .terraindb file into the folder you’re serving and it will immediately become available.

I hope this alternative helps.

Best regards,

Adam