To integrate the polling into an existing WOEnvironment you could do the folllowing:
- Two AjaxUpdateContainer. One with an AutoRefresh which contains an AjaxUpdateTrigger
- If you have a new task the Trigger refreshes the big container.
Then you have fast and small polling.
On the conceptual side there could also be a message broker system considered (some small Mqtt-broker). But this is hard to fit into the WO-World. I checked the Wonder-Code and there also would be some Websocket-Support available.
Best Regards,
Wolfy
From: WebObjects & WOnder Development <webobjects-dev@wocommunity.org> on behalf of Samuel Pelletier <samuel@samkar.com>
Sent: Thursday, April 14, 2022 3:14:36 PM
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Subject: [WO-DEV] Re: Need conceptual help
Hi Markus,
I see at least 2 options that works for a web app in a controlled environment like this:
1 - Assign a persistent cookie to the device in a special page that identify the device in your system.
2- If you use DHCP assigned IP, your iPad have "static" its that can be used to identify them.
Both informations are available in the WORequest.
About the pooling comment, I do not see a real problem there for few devices that need to pool slowly. I do not see a requirement for faster than 20-30 seconds since either the device is given to the person (and a manual referee can be done there)
or the person need to walk to the device. You can implement that kind of pooling with AjaxPing very easily. Implementing WebSocket is way more complex and kind of overkill for something like this.
BTW, is there anyone with a WebSocket integration sample ? I searched to implement the server part and did not found useful sample or implementation to integrate inside a Java app, The most complete and interesting information are all using an external
server for this and the developper need to find a way to identify the client and build some custom protocol for the messaging.
Anyway WebSocket is cool for single page app but for standard full page refresh app, the socket is closed on every page load unless I missed something.
Regards,
Samuel
Thanks, this might help eventually.
However I did not want to create a native iPad app, just wanted to make sure that the browser was known to the WO server application. But maybe in the end a native app will be the solution - just not yet.
---markus---
Bonsoir Markus,
Each app on an iPad has a unique ID set when the app is installed.
In Swift code, I use the code below :
- UIDevice.current.identifierForVendor!.uuidString
Using that, I can authorize the acces to an app for specific iPads.
I hope it will help you,
Jérémy
Dear WO-ers, I need your expertise.
I want to have a defined set of tablets (iPad) tied into my application. The tablets act as a satellite device in the context of a customer checking into a clinic. The person comes up to the registration desk and is checked in. The receptionist sees that there
is some registration data missing and hands the patient a tablet with the running application (or directs the customer to "use the green screen over there”). The receptionist should now be able to remotely open the registration screen on that green iPad, the
customer filling in the data and then pressing Save.
My train of thoughts goes like this:
As a one-time operation an admin opens the application from that green iPad, goes to a registration screen, and creates a “Satellite" entry in the database. This entry gets a UUID (or something similar) and that UUID should be put into the green iPads Web Storage.
This is a one-time registration of the device (actually the browser on that device, not the device itself).
When the workday starts the receptionist logs into the application on the green iPad and goes to a dedicated screen. This screen then polls every couple of seconds whether there is some task available on the server. There may be a number of different tasks
that the receptionist can create. The receptionist assigns such a task to the green iPad (or the red one or...) as an entry in the database and the polling iPad then displays the task screen. This kind of pushes a task to a browser. When the task is done the
iPad goes back to polling. The server also knows that the green iPad is busy or not.
I need to identify the polling iPad and I want to pre-register the iPad as a security measure.
How would you tackle such a requirement?
Thanks
---markus---
|