1
Web Server - Ask For Help / Re: Global MEMORY file
« Last post by JohanR on August 06, 2026, 08:08:39 PM »Hi Sean
Yes thanks,
I am using the In-Memory file driver for the 'global memory' file.
Queues are only used as a local data structure in the procedure that builds the HTML output.
My concern was where to do this best, and where and how to control the updating of the file.
and if there were any specific points to keep it safe and bulletproof.
Each subsequent session or thread will only read the data
thanks
Johan
Yes thanks,
I am using the In-Memory file driver for the 'global memory' file.
Queues are only used as a local data structure in the procedure that builds the HTML output.
My concern was where to do this best, and where and how to control the updating of the file.
and if there were any specific points to keep it safe and bulletproof.
Each subsequent session or thread will only read the data
thanks
Johan
2
Web Server - Ask For Help / Re: Global MEMORY file
« Last post by seanh on August 06, 2026, 03:38:00 PM »The Inmemory db driver should also be able to do this.
3
Web Server - Ask For Help / Re: Global MEMORY file
« Last post by Jane on August 05, 2026, 04:36:17 PM »Johan,
I've never used the multi-host for a real app; just played with the example.
I would not start from the webhandler.
Many of my web servers actually have a source procedure as the first procedure in the app tree.
This is example code from one that looks at the commandline, does some initialization, starts a timer window, and then runs the web server.
I've never used the multi-host for a real app; just played with the example.
I would not start from the webhandler.
Many of my web servers actually have a source procedure as the first procedure in the app tree.
This is example code from one that looks at the commandline, does some initialization, starts a timer window, and then runs the web server.
Code: [Select]
GlobalInit()
IF COMMAND('/setup')
SetupWindow()
RETURN
END ! IF
if GLO:LogMaxRecords = 0
GLO:LogMaxRecords = 500
end ! if
GLO:RunningAsService = gSelfService.AmService
GLO:SuppressUI = GLO:RunningAsService
GLO:DataServiceThread = start(timerwindow,25000)
if GLO:RunningAsService
AddErrorLog('ADIS started as service.')
ELSE
AddErrorLog('ADIS started manually.')
end ! i
GLO:ServerStartDate = today()
GLO:ServerStartTime = clock()
WebServer()
4
Web Server - Ask For Help / Re: Global MEMORY file
« Last post by JohanR on August 05, 2026, 04:48:24 AM »Hi Jane
Thanks for the detailed reply,
I like the STARTED procedure with the timer running.
This way if I want to add other similar procedures they will be kept separate and organization will be clean.
Multi-host?
Would this be checked and started from the webserver or webhandler, just thinking about multihost situation.
thanks
Johan
Thanks for the detailed reply,
I like the STARTED procedure with the timer running.
This way if I want to add other similar procedures they will be kept separate and organization will be clean.
Multi-host?
Would this be checked and started from the webserver or webhandler, just thinking about multihost situation.
thanks
Johan
5
Web Server - Ask For Help / Re: Global MEMORY file
« Last post by Jane on August 04, 2026, 11:37:11 AM »For something small like that, you might also consider Capesoft MaxQueue.
As for loading the queue (or file), is the data pre-staged (in which case the load would be almost instantaneous) or does it have to be gathered?
I have some webservers that need the underlying data refreshed periodically. Perhaps I overcomplicate things, but my flow is:
1. When the app starts, START a window that has a timer. Capture the thread returned by the START command into a global variable (I use GLO:DataServiceThread).
2. I declare an equate
6. You might want to wrap the actual reloading of your data inside a critical section to restrict access while the refresh is taking place. Don't know whether that is needed with MaxQueue.
As for loading the queue (or file), is the data pre-staged (in which case the load would be almost instantaneous) or does it have to be gathered?
I have some webservers that need the underlying data refreshed periodically. Perhaps I overcomplicate things, but my flow is:
1. When the app starts, START a window that has a timer. Capture the thread returned by the START command into a global variable (I use GLO:DataServiceThread).
2. I declare an equate
Code: [Select]
eqMyClose equate(event:user + 4) 3. In the window that has a timer, in ThisWindow.TakeWindowEvent before the parentCode: [Select]
of eqMyClose
! any other cleanup code here
post(event:closewindow) 4. In the webserver procedure, at the beginning of thisWindow.KillCode: [Select]
if GLO:DataServiceThread <> 0
post(eqMyClose,,GLO:DataServiceThread)
end ! if5. Timer in window triggers refresh of data.6. You might want to wrap the actual reloading of your data inside a critical section to restrict access while the refresh is taking place. Don't know whether that is needed with MaxQueue.
6
Web Server - Ask For Help / Global MEMORY file
« Last post by JohanR on August 03, 2026, 11:11:57 PM »Hi,
I need a global MEMORY file with about 200 records that should be available to all sessions.
Data in the MEMORY file would be loaded/refreshed once a day
Sessions would read this data and use it in Netwebsource procedures to build HTML using local queues.
What is best practise and best place to load the data for safest and optimal performance.
thanks
Johan
I need a global MEMORY file with about 200 records that should be available to all sessions.
Data in the MEMORY file would be loaded/refreshed once a day
Sessions would read this data and use it in Netwebsource procedures to build HTML using local queues.
What is best practise and best place to load the data for safest and optimal performance.
thanks
Johan
7
Web Server - Ask For Help / Re: Nettalk and PassKey!
« Last post by Jane on August 03, 2026, 10:26:42 AM ».
8
Web Server - Ask For Help / Nettalk and PassKey!
« Last post by osquiabro on August 03, 2026, 01:43:44 AM »9
Web Server - Ask For Help / Re: Warning the user of session timeout
« Last post by rupertvz on August 02, 2026, 09:33:35 PM »Thank you Jane,
10
Web Server - Ask For Help / Re: Warning the user of session timeout
« Last post by Jane on August 02, 2026, 12:59:23 PM »Quote
or have implemented this
Are you using the session manager template settings?
https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#NetWebSource
If so, you might also add the logout logic I describe in this thread:
https://www.nettalkcentral.com/forum/index.php?topic=9482.msg38919#msg38919
Recent Posts