User guide
Data Integration with Sybase Avaki Studio 5
What is a view model?
Everywhere you can enter JavaScript expressions, you have access to an object called
variables, which in turn gives you access to parameters, control variables for down-
stream operators, and columns in the input result sets.
Studio provides contextual menus for constructing JavaScript expressions. The menus
let you click to select elements like column names, operators, global parameters, and
predefined functions. For many expressions, no knowledge of JavaScript—or touch
typing—is required.
For more information, see “Using expressions within Avaki Studio” on page 66.
Performance
Two important points affect the performance of data services deployed from Avaki
Studio:
• The operators are all implemented in Java, and all the significant data manipulation
happens in Java. JavaScript is used only to tie the operations together and to pro-
vide a way to evaluate expressions (for example, the where clause in a Select oper-
ator).
• The runtime model is implemented in a “lazy,” or “pull,” fashion that defers any
computation until a result is requested by the next step in the model. Even when a
result is requested (with a couple of exceptions), an operator performs only as much
computation as necessary to produce the next row before returning. Thus, a model
consisting only of a Select operator and a Projection operator will run through the
input result set exactly once and will not create any intermediate result sets that
need to be copied.
Exceptions to this rule are operators that need to examine all rows of one or more of
their inputs. These include Order By and all the operators that depend on sorted
values such as Join, Group By, Aggregate, and Intersection, as well as any opera-
tor that uses the Distinct option to eliminate duplicate rows.