B4J Question Server app structure and logics

peacemaker

Expert
Licensed User
Longtime User
HI, All

I'm trying to make a B4J server app as Windows service, for the first time.
1) Now my app is UI, with a form interface.
2) But constant background work is required after any PC restart.
3) But the UI is also needed sometimes for manual setup, preparing the data for app work.

So, should it be a service on a Windows OS ?

What is wrong in my next text ?

* Server app must use "StartMessageLoop"
* "StartMessageLoop" is applicable only to the non-UI apps.
* Only a non-UI app can be a Windows background service
* If only Windows OS is needed: a server OS version is not the must for the background service. Regular OS version is also OK for Windows service running. (BTW, what Windows OS version now should be chosen for cheapest server solution, for 1-2 users only ?)

All these correct ?
If yes - how to add a required, but rarely used UI to such app ?
 

Pendrush

Well-Known Member
Licensed User
Longtime User
Server app CANNOT be B4J UI app.

You have a lot of different solutions, here are my preferred two:
1. Run server non UI app, then use web UI (html) to fill and submit form.
2. Run server non UI app with API interface (probably best solution is JSON), then run second B4J UI app which utilize (get/post) server API with OkHttp.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Server app CANNOT be B4J UI app
Clear, thanks. What about "win service" type ? Server app under Windows must be a service ?

1. Run server non UI app, then use web UI (html) to fill and submit form.
Not so clear here. Could you explain a bit more detailed ?

If the UI is dynamical picture redrawing interface - it's not good for HTTP web-interface, slow.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Thanks for Scheduler idea again - it's working ! UI app on Win server is started by Scheduler at PC boot OK !
But it's running as the background thread and after login the interface is not visible :)
 
Upvote 0
Top