NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - GordonF

Pages: 1 ... 4 5 [6]
76
Thanks Bruce, without wishing to sound dim what does the NotifyChangeSession do and when is it called in the context of ending a sesssion?

I was also planning to use the webserver ._DeleteSession as a tidy up point, does this make sense?

Cheers
Gordon

77
Thanks Bruce, I'll do that.

Gordon

78
Thank you Jane, you've given me food for thought.

Cheers
Gordon

79
I'd be very interested to know what strategies people employ to manage potentially concurrent record updates. Being session based and given the vagaries of internet connections, I wouldn't use any actual record locking, in fact I don't use standard record locking in my multiuser desktop applications, I use a record hold control file to the same effect.

I realise that some multiuser application really don't need records to be held as they tend to partition off users to their own areas, however more general purpose systems run a real risk of data loss if record updates aren't protected in some form.

While I'm happy with my reliable approach for desktop apps, I'm also looking at optimistic locking, which is actually no locking until it is time to commit changes. The problem is that it is late in the day to discover someone got there first and your updates will overwrite their update or yours will be lost, merging changes is only a likely partial and potentially confusing alternative to the first two choices.

Therefore I think the approach I will take is extend my current locking strategy to use the sessionid (am I correct in believing this remains constant for the duration of a user's session?), that way the web users and desktop users can operate on the same data in harmony. In effect I will hold a record via my hold table if it is not already held. If it is indicated as held by a sessionid I will check the session is still active, if not I will purge that session's locks and lock the record for the new requester. When a record is updated or the update process is cancelled I will release the lock. I will also release all locks for a session at session timeout or user logout. The webserver would also purge all locks at start-up and I could also have a housekeeping background thread checking for litter, as in locks from no longer active sessions but this shouldn't be required if I get the rest right.

Before someone says don't lock/hold a record (real or via my method) I should say my clients deal with medical records and arbitrarily writing over changes to data is simply not an option.

Please feel free to comment, I'm not afraid of help or criticism.

I seem to have posted a few messages in the last few days, my excuse is I'm new to WebServer and this forum so please tolerate my posts, hopefully they aren't banal.

Gordon

80
I have a question relating to the client software upgrade process.

During client system upgrades there is a requirement to close any running applications, perform the upgrade and then relaunch any applications that were stopped.

For years I have used an ini file to control requests to suspend and then restart, basically I have a suspend, a start and a control app for each background application in the suite, by using these I get reliable and graceful control over upgrades. However, it is something I have used for many years and I'm sure that there may be a better method of achieving inter-application communications, maybe using built-in Windows events, so feel free to enlighten me, perhaps WinEvent already provides this facility.

Now to the point, I have only recently added a WebServer application to the suite and it is working fine, but I do have one concern and perhaps Bruce is best placed to answer this question. By default I have a 1 second timer on the application's main Window (WebServer), each second I check an ini for a suspend request, if found the application closes gracefully. My concern is the effect a 1 second timer will have when running on the main WebServer window. The alternative is to launch a timer process on a separate thread and pass a user defined event or a notify back to the webserver window to instruct it to close down.

Any suggestions welcome, how do others close a webserver for software upgrades, there are too many clients to do this manually.

Gordon

81
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 20, 2021, 02:54:37 AM »
Hi Bruce,

No that doesn't work on an iOS device (I tested it on an iPhone but iPads have the same issue), you can't scroll and are stuck with all or part of page 1. I suspect it is because it is using Safari's built in PDF viewer, which to be blunt isn't very good. Using PDF.js you aren't reliant on the browser's built in PDF viewer which may or may not be up to the job.

Hope this helps.
Gordon

82
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 19, 2021, 04:58:28 AM »
I hope the following is useful, it's certainly simple and seems to work fine on iOS devices in addition to others.

You can download PDF.js from this link, I used the prebuilt (stable version).

https://mozilla.github.io/pdf.js/getting_started/

Extract the files and you will have 2 folders (build and web) and a license terms file. I renamed the web folder to viewer, edited viewer.html as follows:

one simple edit, change the script reference to the location of pdf.js as below

<script src="/build/pdf.js"></script>

Copy the folders and subfolders to you applications web folder, the renamed folders don't clash with any standard folder names.

Simply insert the following html into your own web page at the appropriate position, please note file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf
in this code refers to a subfolder of web called gendocs and the filename is E0A59F8B-38E8-4607-9C73-179C93030D63.pdf, the %2F represent the path / characters in the viewer file parameter structure, obviously use your own folder structure and filenames.

<div>
  <iframe id="pdf-js-viewer" src="/viewer/viewer.html?file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf" title="webviewer"  STYLE="width:100%; height:1000px; overflow:auto; attribute:scrolling="no"; border:none"></iframe>
</div>

I hope this is useful, I'm no html expert so please feel free to improve on it and share the improvements.

Gordon

83
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 18, 2021, 07:42:37 AM »
I have this working if anyone is interested, I build a page that uses PDF.js and it works fine for viewing on a desktop and also on IOS devices including scrolling.


84
Web Server - Ask For Help / PDF viewing on IOS
« on: May 18, 2021, 04:38:10 AM »
Normally embedded PDF's don't scroll on an IOS device, has anyone tried a solution such as PDF.js to get around this, if so how successful was it?

Cheers
Gordon

85
Web Server - Ask For Help / Re: Webserver iconized
« on: May 18, 2021, 04:35:07 AM »
Thank you Bruce.

86
Web Server - Ask For Help / Re: NetTalk 12 and Date entry
« on: May 18, 2021, 02:49:54 AM »
Thank you Bruce, that worked perfectly

Gordon

87
Web Server - Ask For Help / Re: NetTalk 12 and Date entry
« on: May 17, 2021, 11:54:17 PM »
Thank you Jane, I've switched to a string and it works fine and no lookup button.

With regard to the date entry and calendar lookup button alignment, the button is on the same line as the entry but offset horizontally about quarter of a character lower than the entry and also slightly detached from the entry field, the comment aligns with the lookup button. This only happens with the 'base' theme, the trouble is I like the base theme.

I've attached an image, your help is much appreciated.

Gordon

88
Web Server - Ask For Help / NetTalk 12 and Date entry
« on: May 17, 2021, 08:16:25 AM »
Since upgrading to NetTalk 12 and using the 'base' theme the horizontal alignment of a date field, lookup button and comment on a form are no longer horizontally in line, the lookup and comment are lower than the prompt and entry. Has anyone experienced this and if so is there a fix.

Also is it possible to have a date field without the calendar lookup button?

Any help will be much appreciated.


89
Web Server - Ask For Help / Webserver iconized
« on: May 17, 2021, 02:36:56 AM »
Hi,

I'm new to NetTalk Central and also quite new to Webserver, so forgive me if the answer to my question seems obvious, as it isn't obvious to me.

Will a webserver app run perfectly normally minimized (iconized), I know I can run it as a service but for the time being I'd like to run it iconized, might seem like a silly question but I'm not sure if running iconized would affect the resources and priory for the app.

Any advice appreciated.
Gordon

Pages: 1 ... 4 5 [6]