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

Change file sending priority for delta support #18

Open
namanmehta1997 opened this issue Jan 7, 2018 · 4 comments
Open

Change file sending priority for delta support #18

namanmehta1997 opened this issue Jan 7, 2018 · 4 comments
Assignees

Comments

@namanmehta1997
Copy link
Contributor

namanmehta1997 commented Jan 7, 2018

In the current schema only the kmz files are being transferred but from now onwords there will be a kmz file and there may or may not be a delta file associated with it.
If one kmz is transferred and if there is a delta file associated with it, then it should be transferred first then the other kmz file. We can think of as a container like a container contains a kmz and a delta file, which is being transferred now. The delta file associated with a kmz can be identified by the name of the delta and the kmz file.
For the transfer of delta these must be followed:

  1. If receiver is already having the latest delta then it should not send the previous version
  2. If receiver is not having the delta or having the older version delta than the sender's then the latest delta should be sent to it and previous version of delta should be deleted after the completion of the latest delta

The name of the delta and the kmz will follow the following example format:
kmz - TXT_priority_data_source_defaultMcs_lat_lon_timestamp_groupID_versionNo.kmz
delta -TXT_priority_data_source_defaultMcs_lat_lon_timestamp_groupID_versionNo_timestampOfDeltaCreate.delta

@ghoshbishakh ghoshbishakh self-assigned this Jan 7, 2018
@ghoshbishakh
Copy link
Member

Let me define the process:

When a node N is syncing with another node:

  1. If it starts receiving a new KMZ file then obviously it does not have a diff. So just download the KMZ file and enqueue any associated DIFF file in the receiving thread.

  2. If it has multiple nodes in range then pick the latest DIFF file while syncing.

  3. And for syncing the DIFF files, put a universal condition that only download a new DIFF if it is newer than the present diff

@ghoshbishakh
Copy link
Member

@namanmehta1997 So the identifier of a KMZ file is the mobile number(source) + timestamp?

@namanmehta1997
Copy link
Contributor Author

both KMZ and diff are having timestamp and number. But the kmz contains the timestamp of the creation and the diff contains the timestamp of creation as well as timestamp of modification
See the format of both the files as mentioned in the above comment.
It will be followed strictly in our app

@ghoshbishakh
Copy link
Member

Number = version number?
I mean what is the identifier of the KMZ? How do you relate the KMZ and the diff?

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

No branches or pull requests

2 participants