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

BGDIINF_SB-2380: Added ADR for short ID algorithm #44

Merged
merged 1 commit into from
May 20, 2022

Conversation

ltshb
Copy link
Contributor

@ltshb ltshb commented May 17, 2022

No description provided.

@ltshb ltshb force-pushed the feat-BGDIINF_SB-2380-shortlink-adr branch from 17355fa to 0b4fa34 Compare May 17, 2022 06:06
Copy link
Contributor

@rebert rebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the conclusion. Thanks for the summation.

Copy link
Member

@hansmannj hansmannj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the effort here @ltshb 👍

I tried to verify the calculated collision risk using a different approximation and got (almost) the same results as you did 😉

def approximation(n, d):
    p = 1 - math.exp(-1*n**2 / (2*d))
    return p

Also double checked with the numbers in the birthday paradoxon that you referred to: https://en.wikipedia.org/wiki/Birthday_problem.

Unexpected after a first glimpse, that we get a 99% collision risk after 10 years although we'd have only a very small fraction of all available combinations in use so far. Guess that's why it's called paradoxon 😉

I agree with the suggested decision. Keeping our current algorithm is fine. And even if we get 1 or 2 more characters after 2037 is not a big deal from my point of view.

@fkm
Copy link

fkm commented May 17, 2022

Keeping the same algorithm sounds sane.

But I would recommend against using the BGDI domain. Most people don't know that this is related to admin.ch and might be reluctant to open it.

Copy link

@procrastinatio procrastinatio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two main applications of the shorturl were twitter (limited to less thant 160 characters back then ) and the QRcode (using shorturls, otherwise the image is unreadable). It's nice to keep short, but that all (when was the last time you wrote a shorturl in the URL bar?)
And frankly, what happen past 2030, is not my business anymore.

@davidoesch
Copy link

  • additional application of shorturl: to be used as link in text: mail , documentation etc
  • domain: s.geo.admin.ch is a must ( BGDI.CH is internal use only, admin.ch is a domin of trust.) there were once plans to have a short URL provided by admin.ch --so we might have solved this in the future /2037
  • lenght: Max 10 char: since otherwise the QR code might become unreadable on prints (to small)

@ltshb ltshb force-pushed the feat-BGDIINF_SB-2380-shortlink-adr branch from 0b4fa34 to 0fe6fcd Compare May 19, 2022 10:32
@ltshb ltshb merged commit 2794fc7 into develop May 20, 2022
@ltshb ltshb deleted the feat-BGDIINF_SB-2380-shortlink-adr branch May 20, 2022 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants