0

We are trying to provide a cloud service where our system requires access to a contact list maintained on the user's system specifically for our site.

Due to data security reasons, we would like to allow the user to keep his list locally, not requiring him to upload the entire list to our system and we also would not like to have it on our server.

During a session, the user can click on members of the list and our system would fetch data of only those, complete the transactions , provide the results and then remove the data from the server.

What system could we use to allow a WordPress site to maintain such a database or list etc locally on the user's machine.

  • How would this data be populated in the first place? – Tom J Nowell Dec 16 '16 at 15:33
2

The solution here is to do this entirely in the browser with Javascript in a frontend application, using things such as WebSQL or Local Storage. Combine these with a REST API and you can store data locally.

This is because fetching data from a local machine in PHP on the server is not possible, PHP only knows what it receives in the request, you'd have to send the entire database with every request, which is expensive slow and won't scale, not to mention a security disaster ( anybody snooping gets the entire data set, HTTPS is a bare minimum ). If you opt to go down this route, it would be more secure from both a technical and legal standpoint to just store it on the server

Keep in mind though that this data has to come from somewhere, so users will initially have nothing to work with

During a session, the user can click on members of the list and our system would fetch data of only those, complete the transactions , provide the results and then remove the data from the server.

This implies that information about those people exists on the server. If you want no data of any kind stored on the server, then you're going to need to provide all the relevant data in a request. All a server can do is access external data sources, or process the data and return it ( in which case why not just process it locally )

As for how you would store this data locally, and how to use technologies such as Local Storage etc, that's a Frontend Javascript question, and outside the scope of this site. This part should be asked on Stack Overflow, as well as how to build javascript frontend applications

  • We are creating a parcel dispatch optimization cloud service. User dispatch data would be on the server as part of his identity, so sender address is known. We want to avoid keeping the entire contacts list including addresses and also the users past parcel dispatches to which addresses parcels have been sent. Trying to stay clean and not collect user data etc, but keep data only as required to optimize price comparison for various parcel courier services. We would like to keep dispatched parcel data, destination etc on user's machine, to be able to red-flag those parcels delivered with delay. – Pradeep Datta Dec 16 '16 at 22:10
  • ...so probably it would make sense to forget the local part and ask user to upload his contacts list to the server, keep it in his account online and provide a "settings page", where this contacts list can be edited, imported, exported etc. That certainly makes the entire site system independent too. – Pradeep Datta Dec 16 '16 at 22:15
  • If you do local storage then you'll only be able to work on that one machine locally, and the server can't do anything with those contacts. Afterall the data is local, the moment you start storing things on the server it isn't local to the user and you're storing things on the server. Follow the basic flow of a browser request and you'll see there's no avenue for the server to reach out to the user for data, it's user request -> server response – Tom J Nowell Dec 17 '16 at 0:31
  • Right, thinking deeper about it, makes sense to keep it simple, keep the data on the server. – Pradeep Datta Dec 17 '16 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.