Commit Graph

4320 Commits

Author SHA1 Message Date
Michael Bayne 400a42930b Return the correct value if we're asked for this node's public hostname or
port.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4829 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-20 01:49:56 +00:00
Michael Bayne c0ead54dbe Dispatch our client tick on the RunQueue so that it doesn't end up running on a
separate thread and racing against other client actions. Also nixed a pointless
type check and cast.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4828 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-19 03:35:17 +00:00
Nathan Curtis 57421c8a58 There are many ways I could rant about this, but I'm going to try to keep it short and
informative (and clean ><)...

While testing the ability to go straight to someone in a game from My Whirled, I was getting 
decoding streaming problems (but only sometimes) when fetching the game data.  After many hours
of looking for the problem and swearing up and down that it was nothing but consistent, malicious 
bitrot, I've tracked it down to this.

In Underwhirled Drift (which is the game I was testing this on), I have a couple of property arrays
that get set when the game is first started up with this:

    _control.set(PLAYER_STATE, new Array(numPlayers));

This allows me to fill in the proper indices at a later time in random order.  This was working
fine for multi-player games, and after what I've discovered here, I think I can get away with 
something simpler, but that can wait for later.

When this was getting encoded, the expected effect would be to encode a TypedArray with a null
in each spot that is defined in the source array (numPlayers long).  In fact, it was creating an
empty, zero length TypedArray.  I'm not sure why - but that was confusing the system somewhere
along the line so that when that set of bytes was read back from the server on another client 
(for instance, when fetching the EZGameObject when trying to join an in-progress game).  Of course,
zero-length TypedArrays should go over the wire just fine, so I'm not entirely convinced that I've
tracked down the entire problem (or if that is in fact the issue, then it needs to be addressed).

The diffs here will cause the encoding and decoding to correctly pull nulls out of the array, and 
put them in the TypedArray.  The moral of this story is to watch out for this construct:

    for each (var obj :Object in arr) {
    }

...it may not always be doing what you would rightfully expect...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4827 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-18 23:29:49 +00:00
Michael Bayne 93c89fe0a7 Be sure that we always dispatch subscription responses (success or failure) on
the dobjmgr thread to relieve the caller of the burden of knowing what thread
they are on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4826 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-14 18:17:50 +00:00
Mike Thomas e4cb816fba This is being called on other-than-the-DObject thread, and we really don't want to be posting messages directly outside that thread.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4825 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-14 17:58:54 +00:00
Dave Hoover 59a65e9ef2 We're waiting to hear that our PlaceObject has been destroyed so we can
call didShutdown, so we can't stop listening to it until then.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4824 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-13 21:38:01 +00:00
Michael Bayne e71fed20c3 Clear out our PlaceManager listenerships when we shutdown to ensure that the
manager can be collected even if the object lingers about for a while and
because it sets a good example.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4823 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-11 22:20:28 +00:00
Michael Bayne bc739b6520 Clear out our speak service once we've unregistered it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4822 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-11 19:59:08 +00:00
Michael Bayne 9f2a90f001 Implement Comparable<Name>. The old compareTo() did funny things if a Name was
being compared with a non-Name but I'm almost certain that never happened and
was just Ray being kooky.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4821 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-10 17:34:53 +00:00
Michael Bayne 810969f6f9 Pass a message along with a FailureResponse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4819 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-22 01:15:39 +00:00
Michael Bayne 9a150ebcda Some widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4818 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-22 01:12:02 +00:00
Michael Bayne 52be62ddbf Added a helper method for calling an invocation service method on one or more
remote nodes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4817 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-17 21:02:44 +00:00
Michael Bayne d92f81af78 Crowd peer services now forward broadcasts as well as tells. We must get the
word to the people, all the people.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4816 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 22:38:40 +00:00
Par Winzell 3204cc6266 We're not going to do this INDEX: comment thing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4815 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 21:53:53 +00:00
Michael Bayne f90a39207f Created a peer-aware DatabaseConfigRegistry that broadcasts changed runtime
configuration information to other peers so that they all remain in sync.

Also nixed constructor arguments to the peer manager so that it can be created
at server construct time like all other managers and be available for the
twisty maze of inter-registration that takes place during the manager init
process.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4814 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 20:53:17 +00:00
Michael Bayne b18ebdbc53 Whitespace trimming.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4813 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 18:33:45 +00:00
Michael Bayne f80495f906 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4812 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-16 18:25:46 +00:00
Robert Zubeck 59086147e6 A signed 64-bit integer can be stored as two 32-bit integers in Actionscript, but converting
them to a single number becomes inconvenient for values larger than an single int, and tricky 
when the value is negative (i.e. in two's complement split into two words, with sign bit only
in the high int). 

Instead of splitting a long into two ints, we store it internally as a byte array that corresponds 
exactly to Java's serialized version (sequence of eight bytes, high byte first), and we provide 
accessors to convert to and from Actionscript numbers. This makes Java Long values readable in 
Actionscript, and vice versa.

Unfortunately, Actionscript does not have a native 64-bit integer - the closest equivalent is the 
Number class. Since this is a double float with a 52-bit mantissa, very large long values will 
suffer precision loss during conversion. 




git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4811 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-10 20:49:03 +00:00
Robert Zubeck 77ef41cb42 Separated out chat message listener functionality, and subsequent chat message
processing. This enables subclasses of ChatDirector to listen for their own
types of chat messages, but call the superclass to process them.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4810 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-10 20:33:03 +00:00
Andrzej Kapolka 2ac50f387a Added a StreamableHashSet class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4809 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-10 19:44:02 +00:00
Par Winzell 1eda45d8c8 Document index use.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4808 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-07 18:11:30 +00:00
Michael Bayne a6be47fa83 Adjust the shutdown process to ensure that we can get messages generated during
the shutdown sequence out to our clients where desired.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4807 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-06 18:38:27 +00:00
Michael Bayne 0c5a4f6683 Useful error reporting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4806 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-04 02:16:24 +00:00
Michael Bayne 4260a71946 When we call leavePlace() make sure locationDidChange() is dispatched to
listeners letting them know that we're no longer in a location.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4805 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-03 22:40:00 +00:00
Michael Bayne 87bad12e19 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4804 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-02 21:52:11 +00:00
Michael Bayne affca34556 Pipe down there little fellas. There seems to be no easy way to not show debug
logging on the console so let's not be uninformatively verbose.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4803 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-02 18:48:45 +00:00
Michael Bayne 0cb497e6ce This ain't overridin' nothin'.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4802 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-01 17:45:19 +00:00
Michael Bayne 5a490043c4 Added support for switching Java fields to a different type in their
ActionScript counterparts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4801 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-01 17:40:35 +00:00
Michael Bayne 010b2fc77a Regenerated from the Java version.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4799 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-01 17:24:26 +00:00
Michael Bayne 871cc64819 Do instanceof Streamable sensibly instead of via the cracksmoking way I was
doing it. Don't generate ActionScript methods for the instrumented field reader
and writer methods.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4798 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-01 17:23:13 +00:00
Michael Bayne 7fc92f99b1 Be sure not to leave our lock dangling if the wrapped operation fails with an
exception.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4797 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-31 23:33:13 +00:00
Mike Thomas 638f8b6246 Break out registering the command handlers to its own function so subclasses can call it/override it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4796 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-31 22:44:02 +00:00
Michael Bayne 3f7705dfc2 Split SpeakProvider into SpeakHandler and SpeakUtil. SpeakProvider is now a
proper interface like all the other new invocation service backends.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4795 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-31 21:05:23 +00:00
Michael Bayne ea501d7083 Automatically register the peer manager as a shutdowner rather than require
that it be shut down manually.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4794 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-31 20:01:52 +00:00
Ray Greenwell 47bace1003 This is tested.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4793 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-31 06:50:19 +00:00
Michael Bayne 3c1c1d1921 We need to restore the remote oid as well before we send the unsubscribe req.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4791 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-27 21:47:50 +00:00
Mike Thomas 3327f4b7e8 Since the classname is coming from a properties file - rip off any trailing whitespace.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4790 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-27 20:57:07 +00:00
Michael Bayne 3c4c633b60 Created a ResultListenerList that maps the InvocationService.ResultListener
interface to a list of listeners. Also made RootDObjectManager a RunQueue so
that we can pass around references to the interface rather than requiring a
PresentsDObjectMgr.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4789 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-27 20:48:18 +00:00
Robert Zubeck 73b7e56563 Fixing a typo that prevented the creation of lock release handlers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4788 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-27 17:46:10 +00:00
Michael Bayne c2b44deb2d Once we've unproxied an object, we need to remap it into our Client's
distributed object space so that the unsubscribe from the remote server is
properly handled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-27 02:38:14 +00:00
Michael Bayne 7a8bb7389a Screw backwards compatibility. We're all about the future.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4786 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-26 20:49:13 +00:00
Michael Bayne 81044c6512 Provide a PersistenceContext accepting constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4785 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-26 20:41:09 +00:00
Par Winzell 29bfb576d3 Depot implementation of the Config persistence - hopefully schema compatible with the old version.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4783 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-26 20:04:27 +00:00
Par Winzell 363cf719ec Depot implementation of the Peer Node persistence - hopefully schema compatible with the old version.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4782 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-26 20:01:44 +00:00
Robert Zubeck 8275f739c0 Wrapper for peer network operations that need to acquire and release resource locks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4780 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-23 17:09:08 +00:00
Michael Bayne 962326fcaf Revamped the way BodyObject.location is tracked. Now we use an object which can
be extended to contain the sceneId by Whirled (Vilya's Whirled, though also
Whirled Whirled by extension) so that we don't end up with problems where
BodyObject.location changes but BodyObject.sceneId remains stale. This won't
impact Yohoho because the Yohoho client is always in a scene, it uses a
separate mechanism to track games, whereas Whirled's natural usage is to move
between scenes and non-scenes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4779 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-21 00:46:25 +00:00
Michael Bayne 9ef330b291 Added applyToNodes().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4778 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-18 22:46:49 +00:00
Michael Bayne 91ffdd810b Name our invokers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4777 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-18 22:03:17 +00:00
Michael Bayne b0ec20eff9 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4776 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-18 21:58:16 +00:00
Michael Bayne 6531aa581c Extract client info clearing into a method that can be easily extended.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4775 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-18 21:35:54 +00:00