Michael Bayne 5a67aa906b A while ago, I put on my todo list: "look into changing InvocationService to
use JVM generated proxies, nix marshaller/dispatcher."

The idea was to use Proxy.newProxyInstance to magically create (at runtime)
proxies for FooService interfaces instead of generating a bunch of boilerplate
code. I figured something similar could be done for FooDispatcher on the server
side.

However, we also generate C++ and ActionScript marshallers, and those aren't
ever going away (AS might support some sort of dynamic magic to do what we
need, but C++ sure don't). So I decided to leave the marshaller side of things
as is.

I did revamp the dispatcher side of things to eliminate the need for
FooDispatcher on the server. This turned out not to even require the use of
something so magical as java.lang.reflect.Proxy, because in this case we're
just reading in method ids over the network (and arguments), and calling the
appropriate method. Such mundane activities are easily accomplished with the
regular reflection API.

The existing dispatcher stuff still works as well, of course, and though the
conversion from the old style to the new style is pretty simple:

< invmgr.registerDispatcher(new FooDispatcher(fooprov))
> invmgr.registerProvider(fooprov, FooMarshaller.class)

there's no burning need to convert things over. Fortunately, there's no
(compatibility) impact on client projects to converting Narya and Vilya, so
I'll be doing that shortly. There will be a miniscule performance impact, but I
think the cost of a single reflective method call, given that all of its
arguments were read and unmarshalled from the network, will be a good distance
south of immaterial.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6403 542714f4-19e9-0310-aa3c-eee0fc999fb1
2011-01-01 01:29:26 +00:00
2010-02-10 20:32:44 +00:00
2004-08-27 02:12:55 +00:00
2010-10-15 20:16:11 +00:00

The Narya library
-----------------

The Narya library provides various facilities for making networked
multiplayer games. Its various packages include:

  * geom, util, io - basic tools for doing networked I/O, data structure
    manipulation and some geometry math
  * resource - tools for bundling, deploying and managing media (images,
    sounds, etc.) with a game
  * media - a framework for doing "active" rendering in Java
  * media.image - tools for loading, caching, manipulating and displaying images
  * media.sound - tools for loading, caching, and playing audio
  * media.animation, media.sprite - works in concert with the active
    rendering system and provides tools for defining and manipulating
    sprites (graphical entities that follow paths) and animations
    (graphical entities that affect the display in other ways)
  * miso - a framework for defining and displaying isometrically rendered scenes
  * presents - a framework for distributing information among a server and
    networked clients
  * crowd - builds on the presents framework to create the notion of
    bodies and rooms and provides chat infrastructure
  * whirled - builds on the crowd framework and defines a scene graph with
    portals to move between scenes and provides hooks for distributing and
    updating scene data (for example isometric rendering information) over
    the network
  * cast - a framework for defining and using recolorable, composited
    characters with different poses and actions
  * parlor - builds upon the crowd framework to create the notion of a
    game with players and provides tools for making turn based games
  * puzzle - builds on the parlor and media frameworks to provide tools
    for implementing puzzle games in a networked environment
  * micasa - builds on the parlor framework to provide lobbies and
    matchmaking for multiplayer games 

Documentation is somewhat sparse at the moment, but inspection of the code
in the tests/ directory shows examples of use of many features of the
library.

Building
--------

Building the library is very simple. First ensure that the necessary third
party jar files are available either in the lib/ directory or in the
system wide jar file location specified in build.xml. See lib/README for a
list of the necessary third party jar files and how to get them.

The library is built using ant, a modern build tool available from The
Jakarta Project. If you aren't already using ant for other projects, it
can be found here:

  http://jakarta.apache.org/ant/

Invoke ant with any of the following targets:

  all: builds the distribution files and javadoc documentation
  compile: builds only the class files (dist/classes)
  javadoc: builds only the javadoc documentation (dist/docs)
  dist: builds the distribution jar files (dist/*.jar)

Distribution
------------

The Narya library is released under the LGPL. The most recent version of
the library is available here:

  http://code.google.com/p/narya/

Contributions and Contact Information
-------------------------------------

Narya is actively developed by the scurvy dogs at Three Rings Design, Inc.
Contributions are welcome.

Questions, comments, contributions, and other worldly endeavors can be
handled in the Google Group for Three Rings libraries:

  http://groups.google.com/group/ooo-libs

$Id$
S
Description
Distributed application framework, good for MMOGs
Readme 24 MiB
Languages
Java 69.1%
ActionScript 26.6%
C++ 3.1%
Go Template 0.8%
HTML 0.2%
Other 0.1%