eclipse-thingweb / eclipse-thingweb/node-wot

What is the best way to create URLs for hosted things

Open
#1,376 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
3d 2h
Merged PRs (30d)
6

Description

Based on https://github.com/eclipse-thingweb/node-wot/issues/1351 and the proposed PRs (https://github.com/eclipse-thingweb/node-wot/pull/1352 & https://github.com/eclipse-thingweb/node-wot/pull/1375) to fix name clashes a more general question arose.

**What is the best way to generate URLs for hosted things?**

At the moment, we use slugify to create human-readable URLs based on the given name of a thing.
In the case of name clashes, we add a suffix like `_2` to differentiate them.

In the case of many sensors with the same name, these _artifacts_ might happen very often...

In a discussion with @relu91 we also talked about using the given `id` or create UUIDs if the id is not given. Unfortunately this make it hard to predict URLs like we do in some examples (causes problems for humans)

![Image](https://github.com/user-attachments/assets/b12e9d74-7598-4c3c-bbf8-7f5b72f9da85)

Having said that, I think we need a more general discussion how URLs should look like and whether they might differ depending on the protocol.

Feel free to comment and share you view!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.