a EC site. 2. def doSearch(userId: String, keyword: String) { 3. 4. val sessionFuture = ask(sessionManager, GetSession(userId)) 5. val adFuture = ask(advertiser, GetAdvertisement) 6. val resultFuture = ask(searcher, Search(keyword)) 7. 8. val recommFuture = sessionFuture.map { 9. session => ask(recommender, Get(keyword, session)) 10. } 11. 12. val responseFuture = for { 13. ad: Advertisement <- adFuture 14. result: SearchResult <- resultFuture 15. recomm: Recommendation <- recommFuture 16. } yield new Model(ad, result, recomm) 17. return responseFuture.get 18.}