0

Forgive this question if it's too 'newbie' or green - I'm not a professional developer or anything. I'm a hobbyist coder.

I'm developing a windows desktop application which requires the following features:

  1. The app can be downloaded to any number of client machines on a home network (on the LAN).
  2. All clients will access a shared database file (using LiteDb) which is accessible to all clients across the network.
  3. The licencing system will be online verification of a licence key and storage of such verification alongside any expiry dates in the registry (or equivalent). Thus, each client will also need to be able to access a shared registry space.
  4. Each client app will also need to access other shared files (such as shared assets - pictures/videos etc).
  5. Each client app will also have local files specific to that particular installation (e.g. themes for the client app).

My question is what is the best way to achieve this? I am scoping out my options at present. I don't want the end user having to do any set-up to enable this, such as setting up mapped network drives etc. It should all be achievable within the code itself and using Windows features.

I briefly explored Appdata.roaming - Weirdly, the same appdata.roaming folder on two lan machines for the same user had different files in - thought they were meant to be the same? Had considered this as a storage space for the shared files.

The most preferable scenario would be this being applicable for different users across the network. E.g. Windows User A has it installed on Client 1 and Windows User B on Client 2 - they can each access the same database/files/registered app. However, it would be possible to limit this to apps being used by the same windows user account if this would provide the most optimal of solutions.

Lastly, as likely goes without saying, the most optimised route is preferable - mainly being access times to the database and asset files (images/videos etc).

Don't ask for much, do I!? Hope someone more experienced and knowledgeable that I can help!

stigzler
  • 109
  • 1
  • What about FTP? WebDAV? – Arseni Mourzenko Jun 15 '21 at 18:10
  • "It should all be invisible to the end user". Is this is a security consideration? Because if I had physical access to such a machine, few methods can really keep that invisible to me. Please clarify your needs. – candied_orange Jun 15 '21 at 19:20
  • @candied_orange - fair point - I'll reword my question. – stigzler Jun 15 '21 at 20:18
  • So you want shared files in a home network, but not shared across the internet or some cloud service, right? Then you need a decicated machine for this, easiest way would be to have a dedicated file server, maybe an NAS system in the network. Or do you have something different in mind? – Doc Brown Jun 16 '21 at 08:47
  • @ArseniMourzenko - aren't these for wan applications (ie. over the internet)? My case is really just for a home network (lan). Just checking before I potentially go chasing a white rabbit! – stigzler Jun 16 '21 at 11:34
  • @DocBrown - you got it. That's a really helpful post which made me revise my expectations and design aims. I've realised that to reliably distribute say a single-file database amongst clients there will always need to be some form of "always on" client to ensure that all clients are synced to a central version. This could be a dropbox-type cloud solution; a LAN master-slave setup (a master client that holds the centralised file and distributes to slave clients when they connect) or having one 'always-on' client and other clients access this file over the network (ie. don't hold local copies). – stigzler Jun 16 '21 at 12:50
  • Ran out of space - does that sound about right? Also, I think I need to break this whole topic down into more specific questions (e.g. about how to implement a licencing system). – stigzler Jun 16 '21 at 12:51
  • @stigzler: abusing one of the clients as a server is probably more complicated than providing an NAS applicance, and probably not much cheaper. And if licensing is based on an online connection to a web service under your control, I don't see a compelling reason why to mix this requirement up with the requirement of having a file server. – Doc Brown Jun 16 '21 at 13:14
  • *“aren't these for wan applications (ie. over the internet)? My case is really just for a home network (lan).”*: there are technologies designed for LAN, such as file sharing protocols, that don't play well on the Internet, but the opposite is rarely true. What exact constraint do you have which prevents you from using FTP or WebDAV? – Arseni Mourzenko Jun 16 '21 at 14:45
  • @ArseniMourzenko: using a single, shared sqlite file by multiple users simultanously with ftp or WebDAV? AFAIK that's not possible. – Doc Brown Jun 17 '21 at 11:39
  • @DocBrown: indeed; good point. – Arseni Mourzenko Jun 17 '21 at 11:52
  • 1
    @ArseniMourzenko: ... let me add, the OP mentioned LiteDB, which I never used for myself. but from what I see on [the homepage](https://www.litedb.org/), I guess the file system constraints are very similar to those of SQLite. – Doc Brown Jun 17 '21 at 12:41

0 Answers0