FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Microservice with DBF Files – A Practical SQL Alternative
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Microservice with DBF Files – A Practical SQL Alternative
Posted: Sat Jul 12, 2025 07:57 AM
Hello friends,

With the working DBU WebClone and native microservice access to .DBF/.CDX files, it becomes clear:

A lightweight microservice backend for DBF files is a fully-fledged, future-proof alternative to traditional SQL database systems – especially for legacy applications in the Xbase/Harbour/Clipper environment.

βœ… Advantages over SQL in CRM/ERP applications:

| Advantage | Description |
| ------------------------------- | ------------------------------------------------------------------------------ |
| No migration required | Existing DBF applications remain usable without changes |
| Future-proof development | Modern web UIs, REST/WebSocket, JSON, token auth etc. can be integrated easily |
| Minimal overhead | No SQL parser, session handling, or query planner – extremely efficient |
| Index control via code | Full control over search, sort, and filter logic (e.g. DbSeek(), SetScope()) |
| Fast startup & access | Microservice ready in milliseconds – no heavy daemon required |
| Simple integration | REST or WebSocket with lean JSON – ideal for HTML/JS frontends |
| Low system requirements | Runs even on embedded systems, USB sticks, or VMs without a DB server |
| Readable, portable, transparent | .DBF remains a structured, directly readable file – no black box |

🆚 SQL comparison for small to medium datasets (1,000 – 50,000 records):

| Criterion | SQL (e.g. MySQL/MariaDB) | DBF Microservice |
| ------------------------ | --------------------------------------- | ----------------------------------- |
| Initial connection setup | TCP, auth, optionally TLS, SQL parser | Immediate via REST/WebSocket |
| Database startup | Service start \~300–1000β€―ms | EXE start \~5–10β€―ms |
| Search | SELECT ... WHERE + optimizer | DbSeek() directly in index |
| Switching indexes | Non-trivial (must utilize index) | SET ORDER TO TAG ... |
| Single-record access | Query + network + JSON | Recno() + FieldGet() directly |
| Error diagnostics | Server log, query log, possibly EXPLAIN | Code/log directly from microservice |
Example application:

A hotel with 35,000 customer records accesses the data via `xbrowse.php` (HTML/JS).
Editing, searching, and paging occur in real time – no SQL server required, full REST integration,
zero latency on the local server.


A DBF-based microservice is ideal for developers who want to preserve existing applications while modernizing them.

It combines the best of both worlds: the transparency and performance of DBF with the openness of modern web technology.

Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Microservice with DBF Files – A Practical SQL Alternative
Posted: Sat Jul 12, 2025 07:41 PM

Topic: WINHOTEL Microservices – Modular Start Based on the Unix Principle

It often takes a long time to recognize the simple solutions.

The idea behind microservices follows the proven Unix philosophy:

"Do One Thing and Do It Well."

β†’ Do only one task – and do it well.

Especially for existing DBF systems like WINHOTEL, this approach is ideal for creating maintainable, decoupled modules – without having to rewrite everything.

We’re starting with the following structure:

/microservices/

β”œβ”€β”€ ms_kunden.exe (Port 9090) β†’ Customer Database

β”œβ”€β”€ ms_zimmer.exe (Port 9091) β†’ Room Plan / Occupancy

β”œβ”€β”€ ms_kassa.exe (Port 9092) β†’ Cash Register / Invoicing

β”œβ”€β”€ ms_dms.exe (Port 9093) β†’ Documents & Memos

└── ms_waren.exe (Port 9094) β†’ Inventory / Stock Management

Advantages of this separation:

  • Clear source code per module – no more global mess

  • Each microservice focuses on a core function

  • All services use the same base framework (routing, JSON, logging, etc.)

  • Easily extendable – services can be replaced or added if needed

  • Debugging and restarting possible per module independently

  • REST and WebSocket support

  • Compatible with DBF/CDX – no migration required

  • Start & stop can be controlled flexibly – microservices can be started/stopped via frontend or host system

The core principle: Each service operates independently – but the framework (server loop, JSON handling, logging) remains the same for all.

This separation not only improves maintainability but also paves the way for modern web frontends and modular development.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Microservice with DBF Files – A Practical SQL Alternative
Posted: Thu Jul 17, 2025 10:26 AM
Hello friends,

With HARBOURINO – my own patcher and preprocessor – and a solid understanding of HTML, JavaScript, and PHP, I can build the system exactly the way I need it. Thanks to modern AI tools, it's now possible to develop many components independently – without unnecessary dependencies.

Just last night, I started working on the form designer. The database fields are automatically loaded into the selection box as JSON, and I can already create simple forms using drag & drop. The entire form layout is fully responsive.

Best regards,
Otto





Continue the discussion