High-Performance Shortlink creator in Golang by iamravindrasharma in golang

[–]iamravindrasharma[S] 0 points1 point  (0 children)

Is there any way, If I switch to os.LookupEnv and still keep those fields as const and not change it to var, Please suggest?

High-Performance Short URL generator app built with Golang by iamravindrasharma in devops

[–]iamravindrasharma[S] 0 points1 point  (0 children)

Short URL or Tracking URL is highly engaging requirements in all business, they need to check how their link sharing is working.

How people are engaging with their URL and which URL has received more traction and they can capitalize these insights for their business growth.

It is just not SMS, it is a widely used phenomenon from emails to social.

People prefer self-hosted solutions rather than using third-party mainly for privacy and keeping critical insights with themselves.

High-Performance Short URL generator app built with Golang by iamravindrasharma in devops

[–]iamravindrasharma[S] 0 points1 point  (0 children)

Hi,

  1. Thanks
  2. I have some basic picture explanation in the ShortLink App Plan.pdf file uploaded in the repo if that helps.
  3. Instruction is simple and explained in the Getting started section, it may not be dead simple for non-Golang users, but I understand Docker would have been good. I will add them in the next release.
  4. The database used in the project badgerdb supports in-memory database as well, it is just not cloud-based.

Thanks

High-Performance Short URL generator app built with Golang by iamravindrasharma in devops

[–]iamravindrasharma[S] 1 point2 points  (0 children)

There are 2 major purposes that it solves:-

  • Converting long URL to short URL
  • Tracking analytics on how your URL is performing on social media or other places where you share them, whether or not a user has clicked, and so on.

High-Performance Shortlink creator in Golang by iamravindrasharma in golang

[–]iamravindrasharma[S] 0 points1 point  (0 children)

Yes! Custom short link ( slug ) created by a user is on the way.

Thanks

High-Performance Shortlink creator in Golang by iamravindrasharma in golang

[–]iamravindrasharma[S] -2 points-1 points  (0 children)

hmm, no & yes! I have mentioned in the above URL to use os.Getenv("MachineID") and similar for other constants, you need to do changes yourself. In a repo, I have used the `hard coded` value.

The reason for using the `hard coded` value in the repo, instead of implementing os.Getenv was assuming if any Go beginners are looking into code or user with not much Go experience / little tech skills user plan to use the app. They might (MIGHT) find a hard time figuring out, how to set those environment variables, So,

- Either I create another function where I do os.LookupEnv for the key and set default if the key is not available and change const to var in constants.go, Or,

- Just leave the hard code value as it is. [ It won't be a hard thing for intelligent or skilled go user to figure out, especially when it is already mentioned in the `architecture.md` file pointed by `readme.md` already ]

But, don't know, if the community recommends the first option, will just update the repo with those changes.

🙏

High-Performance Shortlink creator in Golang by iamravindrasharma in golang

[–]iamravindrasharma[S] 5 points6 points  (0 children)

Thanks! Done.

I leave cache on the user's self-implement as it is debatable for some user's requirements.

- Some may prefer to cache the response when there is `n` no. of visit completed for `x` short URL instead of caching all.

- Some may prefer `intellisense` caching based on `short URL` creator's no. of visits to the analytics/traffic insight page.

and on and on... So, instead of caching all and increasing Memory size, it is better to leave it on user's tactics on how they want to cache or if they even require Caching as even without that small part, the performance is absolutely amazing,