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

Extra Params for Network quality #222

Open
spirosoik opened this issue Aug 3, 2016 · 5 comments
Open

Extra Params for Network quality #222

spirosoik opened this issue Aug 3, 2016 · 5 comments

Comments

@spirosoik
Copy link

setup params like requireNetwork(Network.Quality.GOOD). Imagine that you are trying to upload an image as external job and you receive because of bad network multiple timeouts even with retry strategy this will keep failing, so it will super nice if we have also a param which will setup the quality of the network.

@spirosoik spirosoik changed the title Optimisation Network quality Extra Params for Network quality Aug 3, 2016
@yigit
Copy link
Owner

yigit commented Aug 3, 2016

Seems like a "one off" feature request because most apps don't have a way to measure this. How are you measuring the quality ? How do you understand it recovers?

Mobile networks are fragile by design so it would be better to rely on back-off instead of an additional property.

@spirosoik
Copy link
Author

spirosoik commented Aug 3, 2016

It's not a "one-off", you are right that they are fragile but what you can easily do is to check the type of the network. if you based on ConnectivityManager.TYPE_MOBILE then we can decide for example the type. Not sure if this based on the type of the antenna but I think it's based on how the symbol icon is shown in a device 4g, 3g, 2g, gprs which means the speed of the network.

about back-off this is what we have right now but imagine that you are in a place where the network is really bad by default.

@yigit
Copy link
Owner

yigit commented Aug 4, 2016

Actually, there are many times where you can get better speed from a 3g network then a 4g network due to congestion etc. so that information is not super solid (but helpful).

You can still provide your custom NetworkUtil but all you'll get is 3 levels. (UNMEASURED, MEASURED, DISCONNECTED). This might be enough.

For the future, I have some plans to allow custom constraints on jobs so once I have it, this might be implemented on top of it but I don't think it is prominent enough to become part of the API.

@spirosoik
Copy link
Author

So @yigit what you suggest about the case when a job starts Run and suddenly the network is down but you haven't an indicator of an exception in your task you are executing in the Job. Job is going to finish successfully but the task is not done. How can I mark my Job as not done based on the status of the task which I am executing there?

@mattvb91
Copy link

mattvb91 commented Nov 5, 2017

@spirosoik did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants