Hi,
I have a POS software running for over 10 years already and I’m looking to rebuild / expend the data.
Currently the server hold the data, single server no replication (yup! we do backup but that’s all).
Each company have it’s down database on the server.
The clients (POS) are .NET application that keep part of the database locally for speed and full offline access. Currently the sync is done manually via websocket messages.
I would like to remove that and have each client having READ ONLY copy of ONLY THEIR database (we don’t want client A to get data from client B)… sync magically.
If the machine reboot or is offline for a while, re-sync magically.
The write would only be made on the server (master).
My questions are:
Would Couchbase be a good candidate for this type of architecture?
Would that architecture scale well if we have > 100 clients?
Can a Couchbase readonly-partial replicate be installed, configure and run silently on the machine without too much hassle?
This sounds like a very interesting use case indeed, and one that I think you will find Couchbase suited for.
There are a couple of directions you could go with this.
You could run Couchbase Server on each of your POS devices, assuming they meet the minimum specs. You could then use XDCR to sync data back to a “main” data center and use XDCR filtering to sync only the data that you want.
Another option is to run Couchbase Lite on each of your POS devices. This would be especially good if your POS devices may lose connectivity from time to time. And then Sync Gateway can be used to sync back to the “main” data center, again providing whatever filtering you need.
As for being “read only”, I guess this is an area you’d have to explore in more detail. Certainly with Couchbase Server you can supply read-only credentials to your .NET client. I’m sure a similar scenario could work with Couchbase Lite, though I’d recommend asking about that in the Mobile forum (Mobile - Couchbase Forums - don’t let “mobile” worry you, Couchbase Lite can also work in “edge” use cases like you’re describing, whether you’re using a mobile device or not).
Thanks for the reply @matthew.groves
The more I think about it and read about couchbase the more interesting it get.
I think I will try a proof of concept project and test it out.
Thanks!
To add on to @matthew.groves excellent answer - I’ve written a few .NET apps with Couchbase Lite and I’m happy to report it works extremely well. Couchbase Lite is .NET 2.0/2.1 Standard compliant and runs on .NET Framework and .NET Core.
Couchbase Lite also supports Peer-To-Peer syncing between clients running Couchbase Lite over Web Sockets. It’s pretty slick to see in action. Sync Gateway has several options to allow you to customize how you do replication between nodes and replication can be configured as one-way or two-way replication. I believe it could work for your use case. You can head over to mobile forums if you have further questions or also we have a new community-based Discord server if you are looking to chat up with some other folks in the community:
Thanks, I’m currently re-organizing my code to use Couchbase. 15 years ago my coding style was properly made (missing dependencies injection and interfaces) so now I pay the price. But once is done I will be able to jump on!