|
Understanding the EsObject |
Top Previous Next |
|
There are many components that make up a multiplayer application, including clients, server extensions, and ElectroServer itself. Clients can be created as Flash applications, Java, BREW for cell phones, or any number other platforms. Server extensions are written in Java or ActionScript. All of these different parts of the overall multiplayer application need to communicate seamlessly for the system to work. To this end, we created EsObject, designed to facilitate the exchange of data between all layers of a multiplayer application.
EsObject is an object that supports a large number of data types. It allows the server and client, or clients and other clients, to exchange simple or complex object structures that retain data types. In addition, EsObjects are used in many places when dealing with extensions and values for room variables, user variables, and user server variables.
One of the most attractive benefits of an EsObject is that it allows for data to be sent across languages cleanly and easily. A plugin written in ActionScript can create an EsObject and send it to a Java client and both sides will treat it consistently. There is no need to perform any messy conversions. For example: A Flash client can create an EsObject, populate it with strings, numbers and arrays of information, and then just send it to a server plugin. The plugin receives this EsObject and can access all of that information. |