Transcript Slide 1

Deploying SAS Programs as Web
Services
How the power of SAS can be leveraged using
Web Service Technologies
Greg Ludwinski
June 12, 2013
Agenda
• Why expose SAS programs as Web Services?
• SAS BI Web Services for Java
– Evolution
– Architecture
– Benefits and Limitations
• Demonstration
21/07/2015
Statistics Canada • Statistique Canada
2
Web Service Benefits
• Standards based
– Industry wide (W3C and OASIS)
– Available tools/frameworks
• Encapsulation
– Language and platform transparency
– Abstraction from underlying system
– Business rules implemented in Web Service
• Scalable
– Modular design
– Leverages XML
– Part of Service Oriented Architecture
21/07/2015
Statistics Canada • Statistique Canada
3
SAS BI Web Services for Java
• The SAS BI Platform includes a facility to expose
Stored Processes as Web Services
• WSDL is created
automatically based on Stored
SAS BI Platform
Process definitions
Client
Middle
tier
tier
• Evolution:
– SAS 9.1: XMLA WebMetadata
Services
Server Services
– SAS 9.2: Generated Web
– SAS 9.3: Structured
Web Services
Data
Server
tier
21/07/2015
tier
Statistics Canada • Statistique Canada
4
SAS Web Service Architecture
SAS Server Environment
Soap request
Soap response
Web Application Server
(JBoss, WebLogic or WebSphere)
Middle Tier
Web Service Client
BI Web Services for Java
Server Tier
IOM
IOM
Workspace Server or
Stored Process Server
Metadata Server
SAS Code Repository
21/07/2015
Statistics Canada • Statistique Canada
5
Building SAS Web Services
SAS BI Web Services
SAS Stored Process
SAS Macro
Existing SAS Code
21/07/2015
Statistics Canada • Statistique Canada
6
Service Endpoints for SOAP
Structured Web Service
http://<server>:<port>/SASBIWS/services/<metadata path>/<stored process name>
Generated Web Service
http://<server>:<port>/SASBIWS/services/<generated service name>
WSDL
http://<service endpoint>?wsdl
21/07/2015
Statistics Canada • Statistique Canada
7
Service Endpoints for REST
Plain XML
http://<server>:<port>/SASBIWS/rest/storedProcesses/stored/process/<metadata path>/<stored process name>
http://<server>:<port>/SASBIWS/rest/<generated service name>/<stored process name>
http://<server>:<port>/SASBIWS/rest/<generated service name>/<stored process name>/parameters/<parameter name>
http://<server>:<port>/SASBIWS/rest/<generated service name>/<stored process name>/streams/<stream name>
JSON (Output parameters only)
http://<server>:<port>/SASBIWS/json/storedProcesses/stored/process/<metadata path>/<stored process name>
http://<server>:<port>/SASBIWS/json/<generated service name>/<stored process name>
21/07/2015
Statistics Canada • Statistique Canada
8
Features
• The Prompting Framework is leveraged to define
input and output parameters.
• Custom schemas can be create to define XML
data sources and targets (streams)
• Supports almost all Stored Process Features
• Web Configuration Options (SSL, IP Filtering)
• Metadata Security (SAS BI Web Services Group)
21/07/2015
Statistics Canada • Statistique Canada
9
Benefits
• No SAS Components required on client
machine.
• Very cost effective way to create Web Services
once infrastructure is setup
• The Stored Processes can be invoked using
other methods (Custom IOM client, Proc STP)
• All the general benefits of web services
21/07/2015
Statistics Canada • Statistique Canada
10
Limitations
• Performance overhead
– Connection setup
– Marshalling/Un-marshalling of messages
– Must be cautious with large data files
• Supported Protocols
• Control over WSDL
• IIS is no longer supported
21/07/2015
Statistics Canada • Statistique Canada
11
Demonstration
21/07/2015
Statistics Canada • Statistique Canada
12
Statistics
Canada
Statistique
Canada
Greg Ludwinski
Project Leader - SAS Technology Centre
System Engineering Division
R.H. Coats Building, 14th Floor, Section Q
Ottawa, Ontario, Canada K1A 0T6
(613) 951-2768 Fax (613) 951-0607
[email protected]
Canada
21/07/2015
Statistics Canada • Statistique Canada
13