I am considering adding LocalDB for data storage to my application.
Background:
1) My Application has 2 parts.
a. A Desktop Client. (Running Under the user that logged into the computer)
b. NT Service. (Running as Local System)
NT Service:
1) Make web service calls to our back end server for client specific settings and configuration options.
2) Upload client created records.
Desktop App:
1) Load the settings downloaded by the NT Service and run according to those settings.
2) Create client records.
LocalDB seem like a good fit here but can both of these items access the LOCALDB at the same time? After some investigation online it looks like a LOCALDB shared instance may be possible. However does that mean the NT Service would have to keep the LOCALDB connection alive all the time?
Having done a very similar deployment to what you have described, yes this can be done. However I would strongly advise against it.
Some thoughts:
Do you really need a database or could the thick client write out a file to a specific location for each record that the service then inspects(or builds a buffer) and sends on its way?
Another alternative is to remove the NT Service and make its functionality the a part of the Client start up process. Why have a long running process that constantly checks for config changes and only pushes data if the user is actively using the system? Assuming you don’t have requirements/an existing system.