You can extend the Aster Server by adding user defined functions or by adding SQL-MapReduce functions. This section presents the pros and cons of each approach and suggests some things to consider.
User Defined Functions | SQL-MapReduce Functions | |
---|---|---|
API | Typically simpler to write a user defined function. The framework takes care of things like iterating through the input and emitting output. | Greater flexibility and capability in data processing. For example, SQL-MapReduce functions can process data from multiple input relations. |
SQL | User defined functions can be used in a SELECT list just like other SQL expressions. | SQL-MapReduce functions can only be used in the FROM or ON clauses. |
Multi-compute | An Aster instance can execute multiple user defined functions. For example, those in the same SELECT list, at the same time on each vworker. | An Aster instance executes one SQL-MapReduce function at a time on each vworker. |