Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic server URL in subjects - make moving servers between domains easier #590

Open
joepio opened this issue Feb 10, 2023 · 0 comments
Open

Comments

@joepio
Copy link
Member

joepio commented Feb 10, 2023

  • Create a resource on localhost/myresource
  • Host the server on some other place, e.g. example.com
  • How can we now access our myresource? We can use the /path endpoint, but we can't go to example.com/myresource.

This behavior happens because all subjects used in Atomic Data (and Atomic Server) are absolute. We could refactor atomic-server to use relative urls, so we could move our server between domains and keep our data. Let's look at some considerations:

  • We'll probably need a new Subject datatype (see Change subject / string type arguments #561). When serializing to a client, we should generate the actual URL. We should consider the subdomain here, too. It probably needs Store to properly serialize. This new Subject type will be anywhere.
  • When building indexes we should use the compressed format, too. This also means that we should create these compressed representation when building a query.
  • External resources pointing to the old domain will no longer work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant