Forums

Sockets on PythonAnyWhere ?

Hello, see my image I'm researching on how to organize this use case. The app uses the nice Flask framework.

« Mr B » and « Miss A » have each placed one order on the same web site hosted on pythonanywhere.com

The web site has to inform 2 different locations (“Factory B” and “Store A”) to prepare one order each for pick up by the customer in 30 minutes.

What would be the solution that doesn't use e-mail ? Socket ? Regular polling (every minute or so) the server at pythonanywhere using a “http” request by the pc's at locations “Factory B” and “Store A” ?

Thank you for your attention and have a good day at your keyboard :)

depends what form of communication factory b and store a are willing to conduct with you. eg: if they both have api's you could just hit those api's.

"Factory B" and "Store A" are low cost machines (PC) with a web browser and a POS thermal printer ... Any recommendations Conrad ? Thank you. Chris

do you mean someone at factory B and store A will check the orders with a PC? in that case you could setup a webapp for them to check?

The main goal is to print from a web site hosted by PA on the Point Of Sale printer of 'factory b' or 'store a'. The POS printer is a LAN printer (with IP address). Since the websockets are not a option at PA we are thinking of implementing a small web server with API at each location ('factory b' or 'store a').
Would this be the unique way to go with PA ? Have a good weekend !! Chris

If that would work with your printers, then that should be fine.