How can we use latency compensation when the meteor method on server can fail? -
latency compensation nice trick show immediate feedback user without having wait server update go through, , remove critical time delay.
but in many cases there problem server method , update/insert fail. latency compensation becomes problem in these cases when there chances server method might fail reason. in case showing user immediate effects , rolling misleading.
so how can utilize latency compensation without addressing issue?
one solution utilize spinner-like indicator if server roundtrip phone call takes more x milliseconds, suggesting display treated "interim". if , when server method call return, indicator turn ✔ checkmark.
that's why meteor has feature called method stubs. if define method on client same name server method, meteor run effort predict outcome of server method. when code on server finishes, prediction generated on client replaced actual outcome of server method.
failure (as in explicit error returned server) should distinguished network error throwing error message, while client beingness disconnected should display connection status message.
meteor
No comments:
Post a Comment