I think you're going about it the right way.


A web service is nothing more than a regular TAF, but one that a computer is 
going to send a request to, rather than a browser.



I wouldn't use the "web service" technology which is soap based, think along 
the lines of other http APIs you've used that use post arguments or name value 
pairs.



The easiest way to do this is to break the import taf you already have into two 
parts. The first, running on the laptop, prepares the data for the database, 
but instead of an INSERT action, it makes a WEBCALL, with the data packaged in 
some serialized format.



The second half, residing on the server, receives that formatted data, parses 
it and makes the INSERT into the database. Usually you'll want to return a 
fail/success flag so you can debug problems.



I've seen implementations where the actual SQL Insert query is the serialized 
format. Sort of a SQL RPC.



Of course you want to be mindful of security. SSL, password, IP restriction, or 
best, VPN, should be used.



Robert



From: Fogelson, Steve [mailto:foge...@askics.net]
Sent: Thursday, July 11, 2019 8:05 AM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Web Service



Good morning. I have an eCommerce app that is also used as a POS at retail 
shows. Sometimes the shows are outdoors with limited bandwidth, so I adapted 
the app to run on it’s own LAN. After the show is over and the laptops are back 
at the main location, I update the live database with the show database using 
an import taf I wrote.



One show in particular has 40,000 people in attendance. Their mobile phones 
suck up the available bandwidth during the day, but there is plenty of 
bandwidth available in the evening to use a hotspot to access the internet.



I would like to write a taf running on a cron job on the local LAN that will 
update the live database over the hotspot. Not sure if I should write a web 
service utilizing TeraScript (it is in the documentation) on the live database 
location to receive the db update requests.



I have used TeraScript’s Web Call action to access many web services, but have 
never written a web service. Does anyone have any experience or examples of a 
web service written in TeraScript or another way of accomplishing what I am 
trying to do?



Thanks



Steve Fogelson

Internet Commerce Solutions







  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
<mailto:lists...@terascript.com>  with "unsubscribe terascript-talk" in the 
body.




----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to