Chapter 9. Remote Methods


Chapter 9. Remote Methods

Remote procedure callsone of the building blocks of any client/server architecturewere first defined in 1976 ("A high-level framework for network-based resource sharing" by J. E. White, in Proc. National Computer Conference , June 1976) and made popular by "Implementing Remote Procedure Calls" by A. Birrel and B. Nelson in 1984 ( ACM Transactions in Computer Systems , vol. 2, no. 1, February 1984).

A remote procedure call (RPC) occurs when code on one computer invokes a function (procedure) on another computer. Object-oriented systems provide a similar feature referred to as remote method invocation (RMI) because the methods of remote objects are invoked instead of functions.

FlashCom provides developers with an elegant and powerful set of mechanisms to invoke methods remotely. A movie can invoke methods on the server and the server can invoke methods in movies. Method calls can be broadcast to every movie and application instance connected to a shared object or stream, or they can be sent to and from individual movies. An application instance can even create proxies of methods belonging to another application instance.

This chapter shows several examples of how to use the RMI methods and why you might choose one over others. Each section contains a sample application or code snippet to help understand the concepts. Toward the end of the chapter, we also cover optimizations because RMI calls can be significantly slower than local code execution.



Programming Flash Communication Server
Programming Flash Communication Server
ISBN: 0596005040
EAN: 2147483647
Year: 2003
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net