Question: What programming languages does SAP HANA support in embedding code to run within the HANA cluster similar to how you would write your own SQL functions to run inside an RDBMS, or your own code to run on a Hadoop cluster.

Answer: 
You basically have two options here. The first thing would be **Stored Procedures**. These are actually pretty common in other databases like MySQL or DB2. You can create a new procedure with `CREATE PROCEDURE`. More information on this can be found in the [HANA Documentation](http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/d467407519101484f190f545d54b24/content.htm). The supported languages for this are [SQLScript](http://help.sap.com/hana/sap_hana_sql_script_reference_en.pdf) and [R](http://en.wikipedia.org/wiki/R_%28programming_language%29).

Another thing that should be mentioned is the **XS Engine**. Every HANA (I think) has the XS Engine built in. This is basically a JavaScript frontend for your HANA. You can use the XS Engine to write JavaScript APIs, interfaces and applications directly on your HANA using JavaScript. Get started [here](https://help.hana.ondemand.com/help/frameset.htm?3762b229a4074fc59ac6a9ee7404f8c9.html).
SAP HANA offer XS Engine to integrate and develop apps. Its a good way, considering the network traffic, authentication and security.

The XS Engine is 'server' which allows .html, .css, .js, .csv, images files and .xsjs.

The last one type is a kind of javascript which run as a back-end language, creating connection with database.