使用 DNS 作为 URN 解析器

发布于 2024-10-28 12:17:34 字数 737 浏览 1 评论 0原文

我正在寻找或构建一个 URN(通用资源名称)解析器,它将返回给定 URN 的 0 个或多个 URI。

例如:urn:fooid:6e8bc430-9c3a-11d9-9669-0800200c9a66:foo可能解析为http://www.example.com/fooservice/6e8bc430-9c3a-11d9-9669 -0800200c9a66/foo。该服务将了解 fooid 样式的 URN,并知道如何查找基本 URL (http://www.example.com/fooservice/) 从 GUID 中获取,并将冒号转换为斜杠以形成完整的 URI。

我搜索过“URN 解析器”,但没有太多。然后我突然想到——因为 DNS 就是以可扩展和分布式的方式快速解析地址,并且因为它已用于其他应用程序 (参见此处)——也许它可以用于执行基本 URL 查找部分。

以前是否这样做过?它是否是仅使用传统数据库的实用替代方案?

I'm looking to either find or build a URN (Universal Resource Name) resolver, which would return 0 or more URIs for a given URN.

For example: urn:fooid:6e8bc430-9c3a-11d9-9669-0800200c9a66:foo might resolve to http://www.example.com/fooservice/6e8bc430-9c3a-11d9-9669-0800200c9a66/foo. The service would be aware of fooid-style URNs and know how to look-up the base-URL (http://www.example.com/fooservice/) from the GUID and convert the colons to slashes to make a complete URI.

I've searched for "URN resolvers" but there's not much out there. Then it occurred to me that--since DNS is all about quickly resolving addresses in a scalable and distributed fashion, and since it has been used for other applications (see here)--maybe it could be used to do the base-URL lookup part.

Has this been done before, and would it be a practical alternative to just using a conventional database?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

左岸枫 2024-11-04 12:17:34

要在 DNS 中执行此操作,您需要使用 NAPTR 记录作为动态委派发现系统应用程序的一部分,如 RFC 3401, RFC 3402RFC 3403

特别是对于 URN 解析,另请参阅 RFC 3404RFC 3405 它建立在前三个之上,提供将 URN 映射到其他内容的标准方法。

理想情况下,如果这是一个全球通用 URN,您将请求在 urn.arpa. 域空间内委托 fooid

请访问 IANA 网站,查看现有的注册 URN命名空间。

To do this in DNS you would need to use NAPTR records as part of a Dynamic Delegation Discovery System Application, as defined in RFC 3401, RFC 3402 and RFC 3403.

For URN resolution in particular, also see RFC 3404 and RFC 3405 which builds on the previous three to provide a standard way to map URNs to something else.

Ideally if this was a global general-purpose URN you would request a delegation of fooid within the urn.arpa. domain space.

Take a look at IANA's website to see the existing registered URN namespaces.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文