I am going to develop a web based point of sales system. It is going to be based on linux and php. Users will access it via internet and using browser as the tool.

Problem is if the web server is down? The user want to be still able to do their business locally and update the central database once the web server is up? What best solution can I do here? So is web the right way to go or should I just build some windows based application.

Dani AI

Generated

Several posts point to two linked needs: reliable local operation when the central server is unavailable, and a safe, repeatable way to reconcile changes afterwards. and have the right instincts about keeping local state and syncing later; ’s inclination toward a Windows-native client is one valid route. What the thread lacks is a concise pattern that ties persistence, sync, conflict handling and security together so the POS can run unattended and recover cleanly.

A practical architecture that fits most shops is an “offline‑first” client plus a simple, versioned server API. Locally, store every sale as an append‑only record in an embedded store and assign a universally unique ID (on Windows that can be produced with Guid.NewGuid()). Queue those records for upload; make the server endpoints idempotent so retries don’t create duplicates. Keep read‑only reference data (catalog) separate from transactional logs so updates and syncs are lower risk. Decide ahead whether the server is authoritative (server wins) or whether conflicts require human reconciliation—inventory updates often need conservative rules to avoid over‑selling.

Choosing C# for a Windows-only rollout is pragmatic: native apps simplify printer/driver and peripheral integration and can run a background service to handle retries, encryption and scheduled syncs. For cross‑platform or zero-install needs, an offline-capable web client (browser or wrapped in a lightweight shell) using a local JS store and background sync is an alternative. In every case, enforce TLS, short‑lived auth tokens, local encryption, audit logs and robust error reporting.

Quick checklist to implement and test:

  • use UUIDs for client-created records and idempotent server APIs
  • keep an append-only local transaction log and a durable backup before sync
  • implement resumable uploads with exponential backoff and clear status indicators
  • define conflict rules for inventory and provide a manual reconciliation view
  • encrypt local storage and rotate credentials/tokens regularly
  • run automated tests that simulate network loss, partial uploads and concurrent edits

This approach keeps the web option viable while making a native C# client a straightforward, production-ready choice for Windows deployments.

Recommended Answers

All 6 Replies

You can use desktop syncing applications like Microsoft's SyncToy, SyncBack etc or have a custom application developed.

Should i then fully develop using C# everything else.

Member Avatar for Member #120589

You're probably better to use something like Java if you want to build it yourself. Of course this could be done in php/mysql, but it seems a little awkward having to install a LAMP/WAMP system on each machine.
For the user to use this locally, when the internet is down, you'd need to ensure that the local db had a up-to-date data with regard to products/pricing.

How to develop in JAVA using eciplse? How about C# ?

Member Avatar for Member #120589

I would imagine anything that can run on your OS without too much fuss and can access remote sites.
The tech should have the ability to write to disk / store locally, eg xml / json / applet.

The thing with PHP/mysql is that it depends on configuring a web server and a load of other guff.

You have any experience with c#?

PHP/MySQL for the site on your server if fine though. You just need to allow programs and other sites to access it (securely).

Dear Diafol,
            Thank you for your help but I think for the offline mode the best is C# then.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.