FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Click & Run β€” Harbour / MariaDB / Node.js for Desktop
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Click & Run β€” Harbour / MariaDB / Node.js for Desktop
Posted: Thu Jan 08, 2026 09:20 AM

Hello friends,
Zero-install setup.
Copy & paste only.

I just ran a real-world test on a completely fresh PC.

I copied only three portable components:
Harbour executable
portable MariaDB
portable Node.js

No installer.
No registry entries.
No system configuration.

After copying the folder, I simply:

started MariaDB
started Node.js via a small start.bat
launched the Harbour application

What happens next:
Harbour.exe inserts 100 new records
immediately after that, it reads the complete table (1,000 rows)
all communication goes through the Node.js SQL service

JSON over local IPC
Total runtime: 7 ms end-to-end

This includes:
JSON encode / decode
service hop
SQL execution
result transport back to Harbour

Nothing preloaded.
Nothing cached.
Fresh machine.

For me, this confirms a few important points:

a service-based SQL approach is not slow
JSON + IPC overhead is negligible
the whole stack is fully portable
no SQL client DLLs inside Harbour
no TLS stacks, no ABI or compiler coupling

You can literally copy the folder to another PC and run it.
This is exactly the result I was hoping for by separating responsibilities:

Harbour β†’ business logic & orchestration

Service β†’ SQL & infrastructure

Very happy with this outcome.
Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Click & Run β€” Harbour / MariaDB / Node.js for Desktop
Posted: Thu Jan 08, 2026 10:09 AM
 FUNCTION SQL_request()

  LOCAL cReply, hJson
  LOCAL nLimit  := 1000
  LOCAL nOffset := 0
  LOCAL cCmd
   
  /* --- WebSocket connect --- */
  IF ws_init() != 0 .OR. ;
     ws_connect( "127.0.0.1", 8082 ) != 0 .OR. ;
     ws_handshake( "127.0.0.1:8082", "/" ) != 0
     RETURN NIL
  ENDIF
   
  /* --- Command bauen --- */
  cCmd := ;
     '{ "cmd": "LIST_CUSTOMERS", ' + ;
     '"limit": '  + hb_ntos( nLimit ) + ', ' + ;
     '"offset": ' + hb_ntos( nOffset ) + ' }'
   
  /* --- Request / Response --- */
  ws_send_text( cCmd )
  cReply := ws_recv_text()
   
  /* --- JSON β†’ Array fΓΌr xBrowse --- */
  IF ! Empty( cReply )
   
     hJson := hb_jsonDecode( cReply )
   
     IF ValType( hJson ) == "H" .AND. hb_HHasKey( hJson, "rows" )
   
        aData := {}   // alte Daten verwerfen
   
        AEval( hJson["rows"], {|h|
           AAdd( aData, ;
              { ;
                 hb_ntos( h["id"] ), ;
                 h["name"], ;
                 h["city"] ;
              } )
        } )
   
        oBrw:SetArray( aData )
        oBrw:Refresh()
   
     ENDIF
  ENDIF
   
  ws_close()
  ws_cleanup()
   
   RETURN NIL

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Click & Run β€” Harbour / MariaDB / Node.js for Desktop
Posted: Thu Jan 08, 2026 06:23 PM

Continue the discussion