Building Web Apps on SAS®

Allan Bowe

Why SAS?

  • Scalability
  • Speed
  • Security
  • Data Access
  • Analytics
  • Privileged Actions

 

How?

High Level

What is a Stored Process?

What NOT to do

Drawbacks:

  • Performance
  • Maintenance
  • User Experience
  • Developer Experience

Basic Approach

Benefits

Stumbling blocks

  • No consistency in approach
  • Potential for code injection
  • Forwards Compatibility (Viya) 

HTML5 for SAS

HTML5 for SAS

  • Standard interface to SAS
    • JavaScript sends / receives javascript objects
    • SAS receives / sends SAS datasets
  • FAST
    • Data uploaded as CSV, downloaded with proc json
  • Extensively Tested
    • Numerical Precision
    • Special Characters

H54S - Frontend

H54S - Backend

Frameworks

Development Tips

TIPS

 

  • Turn off system error for hard abort
    • rc = stpsrvset('program error',0);
  • List all STPs and source code locaitons
    • yourserver/SASStoredProcess/?_debug=list
  • Go directly to STP BIP Tree
    • yourserver/SASStoredProcess/?_action=1063

TIPS


  • Don't use "endsas;" below 9.4M3
    • ​messes up the load balancing
    • alternative:
      • data _null_; abort cancel; run;

Making Apps Run Faster

  • Write efficient code
  • Install better hardware
  • Load Balancing
  • Adding Multibridge connections
  • Reduce Logging

COST Based

  • Reliable / default option.
  • Dead ports do not have their cost removed, and so are ignored
  • For best performance, initialise all your ports to avoid startup cost

RESPONSE

  • Keeps a count of the response time and uses the server with lowest rate
  • This of course depends on what is being run though!
  • Do not set refresh rate to 0 - it will 'round robin' every multibridge, some of which may be dead

Load Balancing Algorithms

See Documentation.  Consider Browser limits (6 connx in chrome)

Uh oh

Holy Crap

Documentation

mkdocs

Write documentation with markdown

https://www.mkdocs.org

doxygen

Self Documenting SAS code

source: http://www.doxygen.nl/

example: https://rawsas.github.io/coredoc/files.html

Resources

Online Resources

Support

Code

Demos

Contact

Building Web Apps on SAS®

By Allan Bowe

Building Web Apps on SAS®

  • 94
Loading comments...

More from Allan Bowe