Commit Graph

4495 Commits

Author SHA1 Message Date
Michael Bayne 73bcb0faaf Let's put that code in the InvocationManager because we're going to need it
elsewhere when we go fix the standalone servers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4553 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 01:21:20 +00:00
Michael Bayne ebc99935d5 If we're going to do this, I guess we're going to do it properly. Nixed the
notion of a global group (though we implicitly define one in InvocationCodes)
added a mechanism for directors (which generally handle the client side of
invocation services) to register their interest in bootstrap service groups so
that the whole goddamned complex business can happen magically behind the
scenes.

If you instantiate a director, it will automatically register interest in the
service group it needs and everything will work. If you don't use the director
code, you don't get the services and you can safely exclude all of that code
from your client even though the services are still in use on the server (and
presumably used by some other types of clients).

This is going to break all the builds, which I'll soon fix. Then I'll go write
all this in ActionScript. Yay!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4552 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 01:17:30 +00:00
Michael Bayne 9afcc526a0 Bit the bullet and implemented invocation service groups so that our various
MetaSOY clients (Swiftly, World, and soon Admin Dashboard) don't have to know
about a bunch of unrelated crap. Fricking complexity++, grumble.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 00:42:35 +00:00
Ray Greenwell d1ff63d62d ArrayIterator can be unmodifiable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-10 03:35:37 +00:00
Ray Greenwell 15c0bbbe1c It would appear to me that the logic in this method was backwards.
There is no recent (~years) modification of this line, but at the same
time it appears that none of our products use the LocationProvider.moveBody()
method, so maybe this bug has just never been tickled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4549 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-10 02:08:08 +00:00
Ray Greenwell 334a490d75 Automatically unwrap any Wrapped arguments to any Receiver.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-10 02:01:43 +00:00
Ray Greenwell e404b83531 This was never used.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-10 01:27:52 +00:00
Andrzej Kapolka d3aae4a5fd Added a utility class/method to create proxies that implement
subinterfaces of InvocationProvider and forward requests to peer nodes 
in order to use the same methods on owning peers and cloning peers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4546 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-09 23:06:18 +00:00
Michael Bayne 03dab36e3e Asynchronous programming is hard. We have long had the problem where code would
queue up an invoker unit which would go off and do some database stuff and then
by the time it came back and was ready to publish its results to a distributed
object, the object in question would have been destroyed for any of a variety
of fairly natural reasons (client disconnected or logged off, game was
abandoned, dog ate homework).

One "solution" to this problem would be to litter our games' code with
thousands of calls to isActive() in the handleResult() methods of our invoker
units. We've done a bit of that in Yohoho but I've resisted starting down that
path in our other games.

Another solution would be to create an Invoker.Unit wrapper that takes a
reference to the distributed object (or objects) that it will be modifying and
have the common unit code check that the object(s) in question are still alive
at the end of the asynchronous operation and not call handleResult() if they
are not. This has numerous problems: what do you do if one object is alive but
not another, how do you incorporate this functionality in with the numerous
other Invoker.Unit derivations we have that simplify our lives in other ways
(without getting crazy and starting to use something like AOP), do you silently
abort the operation or log something?

So instead, I've come around to the idea that this is simply a dirty fact of
life in asynchronous programming and the fact that we can accept modifications
to distributed state after the distribted object in question is dead is a good
thing. We used to log a warning every time this happened and freak out even
more substantially if one tried to start a transaction on a dead object. Now we
will simply log an informational message (I don't think this sort of thing
should be silently ignored because there are some cases where it is an
indication of incorrect code, those are simply more rare). We will also allow a
transaction to be started on a dead object and when the transaction is
committed, all the events involved will be dropped just like a single
modification would have been dropped on that object.

This allows the most sensible thing to happen which is any results that are
published to still live objects will actually be published and results
published to dead objects will be dropped without making a big fuss. Since a
dead object by definition cannot have subscribers, no one could possibly have
cared about the dropped events anyway.

Also widened.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-09 20:33:47 +00:00
Ray Greenwell 2e3ff5ed58 Don't let our class definitions clobber classes defined in a loaded SWF.
(Put the user content as a child of the system ApplicationDomain).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-09 01:15:08 +00:00
Michael Bayne a1be45996b Implemented the mechanism for initiating and clearing out a remote object
proxy. Untested, but hey, it probably works. :)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-08 19:43:55 +00:00
Andrzej Kapolka 9a39128322 Changed the lock mechanism to use a service to ratify requests to
acquire and release locks, and to use handler objects to manage locks in 
the process of resolution.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-08 00:02:11 +00:00
Par Winzell 494cda3008 Even stolen code should conform to our style.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4541 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 23:38:22 +00:00
Par Winzell 982830b003 Rather than trying to fix the broken linear congruence algorithm, here is a Mersenne Twister instead. It should be a drop-in replacement to whatever degree that matters.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4540 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 22:57:03 +00:00
Ray Greenwell f4db2536df Actionscript, you are too strange.
I thought I was casting: Function(myObject)
I gotta remember that the function-looking variants do more than cast.
For example:

  var o :Object = null;
  var s :String = String(o);
  trace(s.length); // outputs 4.   (s === "null", now)

Apparently Function(args) tries to evaluate the arguments as if they were
code. Switched to casting like (args as Function);


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4539 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 19:14:23 +00:00
Ray Greenwell b6886aabaa Added toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 03:30:48 +00:00
Ray Greenwell 8ab80b10a5 Deflexing presents.
Created a simple MethodQueue utility class that works nearly identically
to UIComponent.callLater().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 00:10:56 +00:00
Ray Greenwell 3c75faa8a1 Bugfix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-07 00:05:48 +00:00
Ray Greenwell 9744d09e52 De-flexing: don't use the MX logging facilities. They're cool and allow
filtering based on package, but we may not ever use that functionality and
it's far more useful to be able to freely include this Log class without
worrying that it will suck in some flex classes as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-06 20:49:20 +00:00
Ray Greenwell 4a630a5bb5 No need to route these events through pointless methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-06 00:01:41 +00:00
Andrzej Kapolka 2f7c992320 First pass at a distributed lock system. Barbie says, "Concurrency is
hard!"


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-05 22:19:36 +00:00
Dave Hoover dcedbbc7eb Out out, damned question marks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-05 21:22:12 +00:00
Mark Johnson f897b54099 Added cache management to the peer manager so it can inform servers that persistent data has
changed and they'll need to reload it


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-03 01:33:49 +00:00
Michael Bayne e1c5d01afd Added proxied object support to the distributed object manager framework. This
exposes the need to write a Client that is optimized to act as a proxy instead
of just using the one that is designed to run on a user's machine. However,
this will be fine for now. Integration with PeerManager forthcoming.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-03 01:14:17 +00:00
Michael Bayne 3d125f64a8 Regenerated, hopefully this won't bork Mark's changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-03 01:12:42 +00:00
Michael Bayne b49fd02c7d Widened added setTargetOid().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-03 01:12:12 +00:00
Michael Bayne 12410ee32c Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 23:49:24 +00:00
Michael Bayne 175eb754f4 In hidden ant dependency!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 23:44:59 +00:00
Michael Bayne f83e5e3b0d Out vile ant classpath.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 23:44:09 +00:00
Michael Bayne 3b2c3c921b Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 23:40:42 +00:00
Michael Bayne cadde41ccb Widening in preparation for modifications.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4523 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 22:38:19 +00:00
Ray Greenwell 8925db6450 Removed toHexString().
It's not needed, as the 'int' class has various formatting functions.
These functions can even be called on constants, if you trick the compiler
a little bit by wrapping them in parens:

    trace("hex: " + (4097).toString(16));


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-31 19:56:08 +00:00
Jonathan Le Plastrier 1780c905cf CommandEvent got moved back into this package.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4521 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-31 05:24:18 +00:00
Ray Greenwell 46e6916a58 Actually CommandEvent needs to live back here, Controller depends on it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-31 03:03:04 +00:00
Ray Greenwell b2301d520c Repackaging these into nenya.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4519 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-31 02:55:48 +00:00
Michael Bayne d6929da884 Config -> PrefsConfig in appropriate places.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4518 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-31 00:46:21 +00:00
Ray Greenwell 0a48fb2b18 Renamed, commented, deprecated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-30 18:16:21 +00:00
Ray Greenwell 4c1f21a651 Check-in comments that were laying about.
I will probably repackage everything I placed under "mx" soon...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4516 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-30 02:57:50 +00:00
Ray Greenwell 3b78e9d98d Avoid HashMap because it has tendrils into Flex. (Hashtable is just the
same but requires keys to be simple or Hashable.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4515 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-30 02:57:14 +00:00
Ray Greenwell 4c81cc104b Case-insensitive matching on urls.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4514 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-29 22:51:53 +00:00
Ray Greenwell 5fcbf90bb0 Added some hooks for subclasses.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4513 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-25 23:04:33 +00:00
Jonathan Le Plastrier 92b90162dc On second thought, we'll take care of calling javadoc first.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4512 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-24 02:44:27 +00:00
Jonathan Le Plastrier 1a67ae4e05 We want our javadocs in the snapshot as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4511 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-24 02:27:23 +00:00
Jonathan Le Plastrier 7de0fbc814 Let's build our snapshot into dist/ and not use ../snapshot as our temp directory.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4510 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-24 00:54:40 +00:00
Dave Hoover 5622bc271b Actually substitute keywords (these files are chock full of stale $Id$ tags)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4509 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-24 00:22:07 +00:00
Ray Greenwell 69529fc624 "get" is a legal function name, so let's be consistent with the Java code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-23 22:43:54 +00:00
Ray Greenwell e6c38e81c6 - Some deflexing of the low-level narya stuff. More to come, as we're
going to want the minimum client to be flex-free.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-22 19:58:24 +00:00
Ray Greenwell d10b94df85 Convert MediaContainer to be just a subclass of Sprite, so that I can
de-flex the 'world' portions of metasoy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-18 00:36:27 +00:00
Ray Greenwell ec54654354 Added toHexString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-16 22:31:07 +00:00
Mike Thomas 5640073272 Add a new value accessor for byte values.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-01-16 21:43:42 +00:00