On the server side you can access any other function by calling it on the gateway over HTTP.
### Function A calls B
Let's say we have two functions:
* geolocatecity - gives a city name for a lat/lon combo in JSON format
* findiss - finds the location of the International Space Station then pretty-prints the city name by using the `geolocatecity` function
findiss Python 2.7 handler:
```
import requests
def get_space_station_location():
return {"lat": 0.51112, "lon": -0.1234}
def handler(st):
location = get_space_station_location()
r = requests.post("http://gateway:8080/function/geolocatecity", location)
print("The ISS is over the following city: " + r.content)
```
### Function Director pattern
In the Function Director pattern - we create a "wrapper function" which pipes the result of function call A into function call B then returns the value to the caller. This saves on bandwidth and latency vs. client-side piping: