~~CLOSETOC~~
<html><font color=#990000 size="+2"><b>RPL Script Tutorial</b></font></html>

StreamScape is changing the way organizations do business by allowing them to develop and deploy enterprise applications that were traditionally on-premise, client-server based into an on-demand, multi-tenant Web environment using the Service Application Engine™. This application platform allows organizations to build new applications based on their business needs, using their semantics and taxonomy to express data structures and logic.

Although on-demand infrastructure (IaaS) vendors such as VMware, Amazon and Microsoft Azure offer great solutions for spinning up and scaling-out stack components like databases, application servers or integration hubs, there are some practical limitations: 

  * Cost and complexity of assembling technology stack components (such as LAMP) into an integrated, business-specific application platform
  * Impedance mismatch between scalable, multi-tenant architecture and traditional client-server style application design ((We call it Ground-to-Cloud Impedance Mismatch))
  * Lack of tools for building applications that take advantage of the scale-out capabilities offered by IaaS (([[wp>Infrastructure as a Service]])) vendors

To address these issues, and fundamentally change the way developers create on-demand systems, StreamScape offers the industry's first extensible, multi-tenant development environment and programming language for building high performance, on-demand business applications.  Combined with powerful data virtualization and event processing features //RPL Script// allows developers to access legacy systems, Files, Databases, Message Systems and even Web Service calls from a common language environment.

RPL stands for Reactive Programming Language (([[wp>Reactive Programming]])).  The RPL Script ((Can be pronounced Ripple-Script)) is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements across components in the StreamScape application fabric. RPL syntax is based on Java and JavaScript semantics.  While strict getter/setter methods may be used when working with data objects, direct access to the fields via dotted notation is also supported.  

DSQL queries may be freely mixed with API calls and variable assignments.  In many cases, objects that are returned from DSQL queries may have function methods that can be applied.  ANSI standard SQL types are also supported as part of the language and may be relevant when dealing with ''Timestamp'', ''Date'' or ''DateTime'' objects.

RPL allows developers to add business logic (Event Triggers) to all data changes, system events, Service calls and Web requests (ie. button clicks). RPL functions can be initiated by Web service requests, from event handlers, triggers on objects and services or as part of DSQL query.  Event Handlers scripts are triggered strictly in response to events being raised in the application fabric.  Multiple event types can be correlated and matched across time frames.

====Syntax Basics====

====Whats so Reactive?====

====Using Semantic Types====

====Data Collections and Semantic Types====

====Special Objects====

MAP

EVENT

TABLE


====Using RPL Function Libraries====

^ Package Extension ^ Description ^
| this.   | References the current component's context |
| event.  | Used to work with Event objects |
| file.   | Used to work with File objects |
| ds.     | Use to work with Dataspace objects |
| log.*   | Used for accessing Logger facilities |
| sys.*   | Used for System calls such as LOOKUP | 

====Performance Considerations====

RPL is an interpreted function-oriented language. It is implemented using standard Java Reflection as a function call layer above core Java.  It does not require compilation, yet executes at virtually the same speed as compiled Java programs.  As with Java, heavy memory usage and 

====Service Event Triggers====


====Dataspace Event Triggers====


====System Event Triggers====


====Functions====


====Event Handlers====


====Importing Java Packages====


====Using DSQL Queries in RPL====


====RowSet Results====


====Using SL Session (SLANG) from RPL====


====Calling the API from RPL====


====Working with Events====


====Loops and Case Logic====


====Try/Catch and Exception Handling====


====Raising Exceptions====


====Transaction Control====



