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

Support for multiple instances for translating services #293

Open
zefr0x opened this issue Nov 9, 2022 · 1 comment
Open

Support for multiple instances for translating services #293

zefr0x opened this issue Nov 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@zefr0x
Copy link

zefr0x commented Nov 9, 2022

Why?

  • Problem 1: Most Lingva and LibreTranslate instances (if not all of them) are being maintained by volunteers, this may make outages common among them. It could be because some times a problem occur and there is no one to fix it quickly.

  • Problem 2: These instances are funded either out of the maintainer's pocket or by community contributions, so it's a good idea to split the load by using multiple instances rather then relying on single one.

  • Problem 3: There may be some privacy (and may be security) issues when relying on a single instances.

Ideas to Fix It

  • Having a list of instances for each service.
  • Having a random instance selection mechanism and a fallback mechanism to use another instance if the first one fail.

How it works?

When preforming a translation process, Dialect will select a random instances from the list to be used. Then it will send a request, if it sucess then the translation will be displayed, if it fails then it will repeat the process again.

Things to be Discussed

  • I don't know if it should stop and show an error message after tring with all instances or after may by failing 2 or 3 times.
@mufeedali
Copy link
Member

There are a lot of potential issues with this approach and it will increase our project's complexity way too much. Some issues:

  • Language support: some instances may provide less languages than the other, especially in the case of LibreTranslate.
  • How cluttered would the UI have to be to show all data necessary. For example, how would we show the user that only one of their multiple preferred servers is currently up and running.
  • Should it actually be random? Or should it be like a fallback mechanism (first preference -> second preference -> ...)? Which one would users prefer?
  • How would features like Suggestion (in LibreTranslate) work?
  • Like you mentioned, how to handle failure of pinging one. Should we stop there or should we try others until we get at least one?

So, while this would be technically possible, I don't think it's a good way to fix the issues you mentioned.

Ideally, some large community or even company would host an instance that's reliable enough, which would solve problems 1 and 2. Problem 3 is always going to be there when using a translator, irrespective of where we send data. You'll just have to trust whoever is running the servers.

Sorry but I dont think we should implement this.

What do you think @rafaelmardojai ?

@mufeedali mufeedali added the enhancement New feature or request label Nov 17, 2022
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