Commit Graph

4578 Commits

Author SHA1 Message Date
Nathan Curtis bb73488fe8 don't know how this escaped my last commit...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4586 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-20 22:59:09 +00:00
Ray Greenwell 687dbe0216 Simple frames-per-second displayer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4585 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-20 05:22:27 +00:00
Ray Greenwell 1b774f3f15 Oh hey, when I de-flexed our Log class I forgot that the flex version
had the capability to add targets (with their own module / log-level).
Add back in this capability, in very simple form for now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4584 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-17 03:03:41 +00:00
Michael Bayne a22bcfeb42 Yes ma'am, in the future, I promise to compile before committing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4583 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-16 00:00:11 +00:00
Michael Bayne 44efca0c18 Demoted message to debug.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4582 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-15 23:49:28 +00:00
Ray Greenwell bca51291ae Video's been broken for a little while, but I had removed all my video
objects so was not seeing NPEs that others were.
Fixed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4581 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-15 00:54:59 +00:00
Andrzej Kapolka 2376e86f3f Forward events to proxies. Fixed NPE, changed account names used in
peer sign-on to be the connecting server's node name.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4580 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-15 00:26:52 +00:00
Ray Greenwell a3cb9f1f81 Fixed unstreaming a List from the server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4579 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-15 00:15:49 +00:00
Andrzej Kapolka 32d99abe15 Missed a couple lines.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4578 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-14 22:20:09 +00:00
Andrzej Kapolka 0fa6d2f233 Keep track of node subscribers (and lock action ratifiers) by their
client oids.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4577 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-14 20:35:11 +00:00
Andrzej Kapolka 51fed0676e Use the number of subscribers to determine how many responses to expect.
Take the lock immediately if there are no subscribers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4576 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-14 02:30:37 +00:00
Michael Bayne 9c03e16434 Added Iterable<E> constructor; widened.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4575 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-13 19:12:17 +00:00
Michael Bayne 9ac3e86fe0 Being available in standalone mode should be the default. This will of course
make life harder for Yohoho, but making life easier for Yohoho should not come
at the expense of baffling default behavior.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4574 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-13 00:26:46 +00:00
Michael Bayne ff30b2e116 Type safety!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4573 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-13 00:23:13 +00:00
Michael Bayne de633c61b5 Standalone mode logon needs to be done less hackily now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4572 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-13 00:20:02 +00:00
Michael Bayne bc21aaa44d Regenerated ActionScript listener marshallers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4571 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 21:51:38 +00:00
Ray Greenwell 54d23f0247 The args from invocation responses will be unwrapped for us automatically.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4570 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 21:50:24 +00:00
Ray Greenwell 69ea4f349f Auto-unwrap invocation response arguments as well.
Make Long not wrapped for now.
Don't svn update until after mdb regenerates everything..


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4569 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 21:49:21 +00:00
Ray Greenwell b217e87519 - Have the ArrayStreamer always look up its delegate, as it may need one
for element types other than String.
- Changed streamer init to prevent the above change from triggering
  a re-init when the delegate is looked-up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4568 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 21:31:21 +00:00
Ray Greenwell 789fe8e433 Found the streaming bug:
I was looking up streamers by java name, but passing in the actionscript
name. This was only affecting Object[]'s containing String elements
due to the addition of String to Translations.

Previously, 'java.lang.String' wasn't getting translated into the
actionscript equivalent, so it just worked. Two bugs can cancel each other out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4567 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 21:29:57 +00:00
Ray Greenwell 1e2295dd09 Use cleaner TypedArray factory method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4566 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 19:29:50 +00:00
Ray Greenwell f461149176 Do what we say we're going to do.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4565 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 19:08:08 +00:00
Michael Bayne 02387b46ec And another.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4564 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:41:16 +00:00
Michael Bayne d0d31eb5bf Nixed stray debug line.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4563 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:40:46 +00:00
Michael Bayne 46a23342b3 More jockeying to make String[] streaming work and to make service group
registration work. Keeerist Flash is annoying.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4562 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:40:14 +00:00
Michael Bayne 40538c81ad This needs to be a TypedArray and then written out with writeObject() not
writeField(). Fiddly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4561 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:10:34 +00:00
Michael Bayne 4bc3e1e48d Some error message clarification, added java.lang.String to Translations, some
widening.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4560 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:10:05 +00:00
Michael Bayne 0a06460b24 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4559 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:09:00 +00:00
Michael Bayne d9089e10d3 Widening, one additional log message added in STREAM_DEBUG mode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4558 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-12 03:03:51 +00:00
Michael Bayne a617b9322e We need to run willLogon() immediately, also modified BasicDirector and Client
to fail if a director tries to register services groups but was not created
until after the client was logged on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 20:37:28 +00:00
Michael Bayne cb5fd7ff55 I write two lines in the morning. I write two lines at night.
I write two lines in the afternoon and it makes me feel alright.
I write two lines in times of peace, I write two in times of war.
I write two lines before I write two lines, and then I write two more.

Bringing ActionScript world into line with the Javver.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4556 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 03:28:48 +00:00
Michael Bayne b7e16c86f5 Added getBootGroups() to Client, made use of it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4555 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 03:08:04 +00:00
Michael Bayne c2dbae4809 We'll actually need to call clientWillLogon()...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4554 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 01:50:11 +00:00
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