java
sql
php
iphone
c
mysql
xcode
ruby-on-rails
regex
objective-c
multithreading
silverlight
json
algorithm
facebook
tsql
delphi
apache
php5
jsp
One of the most popular systems for processing large amounts of data in a cluster is Hadoop (http://hadoop.apache.org/)
You can write functions in python using the MapReduce programming pattern (google it), upload your program to the cluster, and it will process your data.
Take a look and read up. It's a huge topic - too much for one question. If you have some specific use cases please edit your question with more info.
Well if you wrote it locally you probably wont be executing anything that require compilation in realtime (I assume your looking for efficiency and will be exchanging a whole series of computations in the cloud) which in that case you looking to send it something like a ruby file on the fly? But that doesn't seem very practical since you really aren't going to get this newly written function coming from the client side sent over and scaled well across the cluster you are sending it to.
That being said, set something up where you can send functions perimeters in the form of xml, json, etc. Use an http connection or an https if you need it secure and build it using hadoop, mpi, et.
Code mobility is a largely unexplored field with more questions than answers. Generally you cannot move arbitrary code around at runtime. There are a few programming languages that historically supported code mobility (e.g. Kali Scheme), but it is not something that would be ready for main stream use.
Concerning functions, here I am not quite sure what you are asking. There are functional programming languages that support what I would consider "precursors" to code mobility. E.g. in Erlang you can pass function signatures around and in Cloud Haskell you can send a Closure (that is a function with collocated data) within certain limitations.
Other approaches that have reached higher significance are to craft plug-ins, that is precompiled binaries that are loaded at runtime. There might be further possibilities to pass object code around so that not everything has to be compiled and linked at runtime when it is passed from one platform to an other.
Generally what needs to be clear to you is that what you develop is source code. This either needs to be interpreted at runtime (means on both platforms there must be an interpreter loaded) or compiled into binaries and then started. Then there is still the question of data and state etc. that would need to be shared before code mobility will work as we envision it.