Commit Graph

4805 Commits

Author SHA1 Message Date
Michael Bayne 0cd1be4728 Clean our our native libraries when we run clean.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4863 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-07 01:57:04 +00:00
Michael Bayne aa10f80b16 Bring on the Googley goodness. There may be build breakage as we find all the
projects that use Narya and now need google-collect.jar but it had to be done.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-02 23:10:06 +00:00
Michael Bayne d84b2ac8a0 Report a more useful error if we have a bogus controller. Tidied some other
bits up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4861 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-02 23:02:36 +00:00
Michael Bayne 87a1e8968e Target 1.5 when building.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4860 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-30 06:20:06 +00:00
Par Winzell a30dca8581 Oops, warnings, I guess they don't auto-cast function references to booleans without grumbling. Good for them I suppose.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4859 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-28 15:05:27 +00:00
Par Winzell b7d2bfb1af Another handy adapter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4858 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-27 18:54:53 +00:00
Dave Hoover 6719d18caa Rerun generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4857 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 21:06:53 +00:00
Charlie Groves 0784d40c10 Eclipse metadata
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4856 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 18:37:07 +00:00
Michael Bayne e6af23ad38 Let's report that in a friendlier way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 17:41:24 +00:00
Ray Greenwell 480abdee8a For primitive types, the coercive casts never fail. Let's be lenient and let
a TypedArray of int work if people fill it with strings like "4" or "9".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4854 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-24 21:51:32 +00:00
Michael Bayne 13fe8fc930 On second thought, reference equality is really the only appropriate thing for
DObject. There will never be multiple instances with the same oid that
represent "equal" objects and it's possible that in certain (controlled and
limited) cirumstances, objects with different object managers might have the
same oid even though they are different objects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-20 18:50:27 +00:00
Michael Bayne 4280391d03 Implemented hashCode() and equals() as it could come in handy if we want to
stick objects in a collection.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4852 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-20 18:48:06 +00:00
Michael Bayne 4f83cf0119 Added a backwards compatible registerDispatcher() call to repair GG games.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4851 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 23:16:52 +00:00
Michael Bayne 27b95dd19a Nix another redundant cast.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4850 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 18:28:56 +00:00
Michael Bayne 66660bc490 Don't need to cast the result of an array clone.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-19 18:22:37 +00:00
Ray Greenwell 2f4439c64e Made the map work with null as a key.
(Dictionary supports null keys, so we merely call null a 'simple' key.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4848 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-18 23:55:26 +00:00
Michael Bayne a2af35fcfd Log a warning rather than NPEing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4847 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-18 18:49:52 +00:00
Andrzej Kapolka 8c4776a3f0 Might as well use a different signifier in case people do want to use
negative indices.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4846 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-18 18:01:49 +00:00
Andrzej Kapolka 924a8a319d That was a fun one to track down. Using an index of -1 for Array.splice
inserts the element just before--not after--the last element.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4845 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-18 01:41:19 +00:00
Michael Bayne a34e500ea6 Added startTransaction() and commitTransaction() to the InvocationDirector so
that EZGame can batch up state change requests which are all invocation service
requests.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4844 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-17 21:33:05 +00:00
Michael Bayne 6b46554eaf Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4843 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-17 21:06:17 +00:00
Charlie Groves 45034b895e Reference the client immediately rather than on the dobjmgr thread so it doesn't get released before we tell the listener it's resolved.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4842 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-10 02:01:48 +00:00
Michael Bayne 8cfe92aba6 Nix empty directories.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4841 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-09 06:04:14 +00:00
Michael Bayne 466ae35688 Proper Long handling and checking for @ActionScript(omit=true) up the
superclass chain. Other such annotation "inheritance" is needed for methods,
but that I'll do later.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4840 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-09 01:52:22 +00:00
Michael Bayne 8f81893a0c getFailureMessage() should be protected as it's not part of the persisting
unit's public API.

handleResult() and handleFailure() could also be protected but we're adapting
Invoker.Unit to something that appears to provide a different (persistence
friendly) public API even though the invoker doesn't actually call it, but
rather the normal Unit public methods call the new public methods. But we still
want to maintain the "feel" of these being the PersistingUnit's "main thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4839 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-08 23:55:51 +00:00
Michael Bayne d4562ff806 Allow external parties to call applyToDelegates().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4838 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-02 23:29:02 +00:00
Michael Bayne 13c2173829 Don't need two of these fellers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4837 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-02 00:09:13 +00:00
Michael Bayne 4cc4c3c9f1 Use the bare BlockingCommunicator in the PeerNode instead of the
ClientCommunicator which does stuff like try to save its preferred connection
port using the Java preference system (which is no longer available to server
processes due to the removal of their home directories).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4836 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 23:47:02 +00:00
Michael Bayne ab632ffe83 Refactored communicator so that we can not do some things in the peer client
(which runs on the server) that we do in a normal client (which runs on a
user's computer). Eventually we'll make a custom Communicator for use on the
server that integrates with the ConnectionManager's polled socket I/O which
will be easier now that this bit of factoring has been done.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4835 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 23:44:31 +00:00
Michael Bayne 120d641dea Comment rearranging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4834 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 21:26:27 +00:00
Mark Johnson 1ec7f25ea6 Refreshing the peers seems to often take just over 500ms, so increase the time we wait before logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4833 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-28 23:26:42 +00:00
Mike Thomas b3678b086d The client manager was busy registering client objects on the ConnectionManager thread rather than the dobj thread. Give it a nudge in the right direction.
Also, added logging to the PresentsDObjectMgr to check for this type of thing and dump stack if anyone is trying to register objects anywhere but the DObj thread (assuming we're sufficiently far started up that there is one).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4832 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-28 18:35:20 +00:00
Michael Bayne 873eede988 Log a message when we drop a forced move request due to a pending move.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4831 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 20:47:17 +00:00
Michael Bayne 6904c467bf Identify ourselves if we turn out to be a long dobj unit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4830 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 17:23:02 +00:00
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 30cb0b6122 Use junit4.jar.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4820 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-28 20:26:04 +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