Building Web Apps on SAS®

Allan Bowe

Why SAS?

  • Cost
  • Security
  • Data Access
  • Scalability
  • Speed

 

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) 

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;" or "abort cancel"
    • ​messes up the load balancing
    • alternative - open a macro, but don't end it!

 

Making Apps Run Faster

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

Don't do this

  • Use usernames in file / folder names
    • can cause issues where a mix of WLATIN1 and UTF8 systems are in use
  •  

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)

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

Demos

Contact

Building Web Apps on SAS®

By Allan Bowe

Building Web Apps on SAS®

  • 1,092