Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 222 - Sticky Web Services  (Read 107 times)
Reuben B.
Four Js
Posts: 1063


« on: April 26, 2024, 02:22:48 am »

With a Web Service, successive requests can be handled by any member of the Services Pool, that is any fglrun process that has been started to service those web service requests.  Web Service code should therefore be stateless so that each request is independent of other requests.  This means you should not have any modular or global variable influencing the result, and you should have no sequential or scrollable cursors left open after each request.
 
What if you wanted a web service to return one row of the database cursor to a calling program, the user in the calling program then clicks something like Next , and to then call the same web service returning the next row from the database cursor?  If it is a scrollable cursor you might want to allow the user to click something like Previous and fetch the previous row from the database cursor.  This means you need the same fglrun process and database cursor to be called by consecutive requests.
 
By adding an attribute (mode=”sticky”) to a web service .xcf, we can signify that the web service is a Sticky Web Service.

Read more at https://4js.com/ask-reuben/ig-222/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines