NetTalk Central

Author Topic: Best way to communicate between Web Server and remote Windows computer  (Read 2766 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Hi All,
Running NT 14.08 and Clarion 11.0.136.   I need to communicate to and from a NetTalk Server and a remote computer running windows ( actually a type of kiosk).  I am going to run a clarion exe on the remote machine.  Instead of trying to tie the remote computers to the tables on the Web Server I am looking at an alternative way of sharing very small amounts of data.  e.g. When a user is verified on the NT server, I want to let the remote computer ( and there will be several remote computers so I need to address a specific remote computer ) have some limited data fields.  Also, when the end user activates the remote computer - actually a kiosk type setup - I need to send the data to the NT server for verification and depending on verification by the NT server, send some limited data back to the remote computer (kiosk) and then the remote computer can perform some duties.  I am not sure if this is a net simple communications need or a set of APIs.  I am sure folks have done this and can offer some suggestions.  The scenario is that the end user can verify themselves with a QR code on their mobile phone which is connected to the NT server OR they can use a RFID on the remote computer( kiosk) to verify locally.  I need to share information between these two. Any insights will be appreciated.
Thanks,
Ron

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Best way to communicate between Web Server and remote Windows computer
« Reply #1 on: October 23, 2023, 09:39:55 PM »
Hi Ron,

Your simplest setup here is that the program on the client is a NetWebClient program.
It makes calls to the server periodically.

On the server side you have NetWebServerMethod procedures. The client is calling these.

These procedures receive, and send back, anything you want. You control the "parameters" and "return values".
This is (by far) the easiest part of a NetTalk web server.

>> when the end user activates the remote computer - actually a kiosk type setup - I need to send the data to the NT server for verification and depending on verification by the NT server, send some limited data back to the remote computer (kiosk)

This is the very definition of a Web Service. (ie a NetWebClient on the client side, and a NetWebServerMethod on the server side.)

>> When a user is verified on the NT server, I want to let the remote computer ( and there will be several remote computers so I need to address a specific remote computer ) have some limited data fields.

To start with, get the client to poll from time to time for any new user information.

Once you've got all that working, you can implement a NetWebSocketClient on the client side. This will allow you to open a channel so the server can "push" instructions to the client. For simplicity, in this situation, it'll push a command to tell you to "sync now".

Cheers
Bruce


rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Best way to communicate between Web Server and remote Windows computer
« Reply #2 on: October 24, 2023, 02:54:11 AM »
Bruce,
Thanks. I wondered if a WebClient was the tool to use. Now that I know that, I can move forward and not look back.  Since the communication with the Serial port is on the remote machine, I can communicate with it directly through a windows program.  That solves the serial issue.  BTW, my son worked for Volkswagon Advanced Research in California about 6 years ago.  They ran their automobile communications through a browser and used browser through serial port for communication with all the devices in the car.  He said that it worked very well until the port number changed! May play with it at some time.
Thanks,
Ron

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Best way to communicate between Web Server and remote Windows computer
« Reply #3 on: October 24, 2023, 08:44:39 AM »
Hi,
Any webinars or segments that talk about using a Web Client to connect to a Web Server Service?
Thanks,
Ron

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Best way to communicate between Web Server and remote Windows computer
« Reply #4 on: October 24, 2023, 09:55:41 PM »
https://www.clarionlive.com/BrowseEpisodes/ww?a=459.

It's part of a series on creating and consuming Web Api's.
Since you'll be doing both sides I recommend you watch the whole series.

Cheers
Bruce