Well, following your idea is good but we settled otherwise here at the company,
We did so, we will have a table (pendant_sync) (int reference, int terminaloffline, int typeScriptonized)
reference and ID of the object I want to synchronize
terimaloffline is the terminaloffile ID (explain below)
typeScriptonized within the system it will be an Enum.. that tells the type of data being synchronized, example if it is 1.. is a Product , if it is 3 is a user, if it is 7 is one_product and so on..
Offline terminal what is it?
Good offline terminal (I’ll give as example a pdv)
you are in the supermarket and starting the system deployment you install the administrative and the pdvs,
To start a pdv you must have an Offline Terminal.. if you don’t have pdv you simply won’t exit the offline terminal selection screen..
Registration of the terminal offline..
could have an ECF already registered and linked to pdv if you know the port that sera can put here.. if you do not know ok of anything do not select in pdv..
a description for the offline terminal,
synchronization time,
is an attribute to tie pdv to a particular offline terminal,
when registering the offline terminal,
you simply select it in pdv and bingo! a preconfiguration is ready..
supposing you signed in and missed the ECF port pdv.. will not connect but will show an option to put the correct ecf port.. you put (the synchronizer will send the port to the register on the server)
basically and this the offline terminal..
let’s go to the synchronization part
pendes_sync the table I informed you above...
when I register a product I will have to insert
the reference (product id), idterminalOffline (if you have two terminals you will have to have two inserts one for each.. ) , type (an indicator that you are synchronizing a product)
the same process to change the product..
well then what happens. if you have two terminals.. will have two inserts one for each terminal
when pdv (terminal) synchronizes it will be based on this table..
take her data.. will see that there is pending product to synchronize..
picks up his id search it and updates/inserts the product in pdv.. and deletes the record from the pending table_sync that referred to this update..
and that’s basically what we think
if you have any idea where we can get better and welcome =)