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 UA definitions #51

Open
dsl400 opened this issue Jan 16, 2025 · 6 comments
Open

Dynamic UA definitions #51

dsl400 opened this issue Jan 16, 2025 · 6 comments
Labels
enhancement New feature or request

Comments

@dsl400
Copy link
Contributor

dsl400 commented Jan 16, 2025

usually software remains in production for ages and no one would bothers to update the binaries just to have a fresh UA parser

any thoughts on how to make a "high-performance zero-allocation Go library designed to parse browser name and version, operating system, and device type information from user-agent strings with sub-microsecond parsing times." with dynamic definitions ?

a "high-performance" algorithm with dynamic definitions could do the trick :D

@ayuhito
Copy link
Member

ayuhito commented Jan 17, 2025

By dynamic definitions, do you mean something that pings "some-link.com/latest-uas.json" on startup or are you looking to put your own custom user agent lists in as a parameter?

@ayuhito ayuhito added enhancement New feature or request and removed enhancement New feature or request labels Jan 17, 2025
@dsl400
Copy link
Contributor Author

dsl400 commented Jan 17, 2025

any method that does not require to deploy a new version of the application that consumes this library

@ayuhito
Copy link
Member

ayuhito commented Jan 18, 2025

Thinking more about this, I don't think this is a necessary feature.

User-agents rarely ever change and are very infrequently updated (just see how often I actually update the user agent list in this repo).

Since we use pattern recognition, the only time the list is updated is to catch rare edge cases or add new browsers. Existing browsers will indefinitely be supported even if their versions are bumped up.

@ayuhito ayuhito closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2025
@ayuhito ayuhito added the wontfix This will not be worked on label Jan 18, 2025
@dsl400
Copy link
Contributor Author

dsl400 commented Jan 18, 2025

As stated in the initial post, software remains in production for a long time and releasing a new version is not always a straight forward process.

or add new browsers

this is the reason why the definitions should be dynamic.

For my use case I only need a method to provide a newer definitions file without recompiling and deploying a new version of my application.

@ayuhito
Copy link
Member

ayuhito commented Jan 19, 2025

I understand the usecase (especially in something like IOT contexts).

Does your conditions allow you to at least restart the software? In this case, maybe an API like NewParserWithURL lets you pass in your own definitions via file path or remotely?

@dsl400
Copy link
Contributor Author

dsl400 commented Jan 19, 2025

Application can be restarted. The updated definitions should be provided by the app that consumes this library

@ayuhito ayuhito added enhancement New feature or request and removed wontfix This will not be worked on labels Jan 19, 2025
@ayuhito ayuhito reopened this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants