Commit Graph

3830 Commits

Author SHA1 Message Date
Michael Bayne a60a71552a Generated readObject()/writeObject(), widened some things along the way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4689 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:17:41 +00:00
Michael Bayne ea8bf25c0a Some fiddling to handle classes that extend SimpleStreamableObject.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4688 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:17:24 +00:00
Michael Bayne 1ec22804da Oops, we need to do things a little differently.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4687 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:08:04 +00:00
Michael Bayne 410d85d49d A task to generate readObject() and writeObject() for Streamable classes (for
use in non-sandboxed environments). Unfortunately we have to do this for all
Streamable classes, not just the ones that have protected/private members
because we need to be able to call super.readObject() and have that exist even
if our superclass contains only public members.

Doing magic streaming with combinations of classes that do and don't have
readObject() would start to get extremely complicated, particularly if the base
class had readObject() an intermediate class had none, then a later class had
one again. Madness. Doing things with compiled methods will be faster anyway...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4686 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:04:50 +00:00
Michael Bayne 77fef0c22e Factored management of "generated fields" and "generated methods" blocks into a
utility class.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4685 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:02:31 +00:00
Michael Bayne 3036bcb70d Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4684 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:02:03 +00:00
Michael Bayne 63c5449b00 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4683 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:01:48 +00:00
Michael Bayne 64da3b6229 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4682 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:01:32 +00:00
Michael Bayne 4d455eb6e6 _usermap is referenced by both the conmgr and dobjmgr threads, so access to it
must be synchronized.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4681 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 02:25:03 +00:00
Michael Bayne 69485a88ee Widened, fixed documentation and nixed unneeded runnable posting for
clientSessionDidEnd() which is called on the dobjmgr thread directly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4680 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 02:11:33 +00:00
Andrzej Kapolka 9694f12dc5 Added a StreamableTuple class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4675 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-26 01:12:37 +00:00
Andrzej Kapolka d3d841e3e5 Some fiddling to handle cases where peers become connected after having
been disconnected (in which case there may be conflicts in lock 
ownership) or are connected asymmetrically (A is subscribed to B, B is 
not yet subscribed to A).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4674 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-24 19:47:12 +00:00
Michael Bayne f8ef4aeebc Instead of doing two instanceofs on every compare, just wrap bare keys in a
fake Entry implementation. This also avoids breakage if a DSet entry's key
itself implements DSet.Entry (which just happened for the first time in Narya
history).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4673 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-23 18:59:29 +00:00
Michael Bayne beace3839b Nth time's the charm.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4672 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 16:40:57 +00:00
Michael Bayne 184b621ee9 Let's fix toWriteObject() as well since we are aiming for correctness.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4671 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 16:39:19 +00:00
Michael Bayne 86aae8809a ByteArray must be read with readField().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4670 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 16:35:28 +00:00
Michael Bayne 8f59462972 Handle // @Override // blah comments more robustly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4669 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 16:35:05 +00:00
Michael Bayne ad8acdbd1d Comment fiddling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4668 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 02:47:16 +00:00
Michael Bayne 1060f0d160 More jockeying:
- handle // @Override // blah style comments
- deal with fields that are assigned to anonymous inner classes (actually
anything with braces, which would also include array literals).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4667 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 02:38:16 +00:00
Michael Bayne 17b9162881 Widened, honor @ActionScript(omit=true) on classes and constructors, sort of
handle inner class declarations, emphasis on sort of.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4666 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 01:28:10 +00:00
Michael Bayne cefe7f0788 Widened.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4665 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-18 01:16:57 +00:00
Michael Bayne 1ca159fe34 Added isFailure().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4664 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-16 21:47:53 +00:00
Michael Bayne 2ec9d50b6f Dispatch tell failures via a TellFeedbackMessage so that we can easily route
them to the appropriate ChatDisplay when we're doing chat in IM-style
individual windows.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4663 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-16 21:42:18 +00:00
Mark Johnson 773e53ec2d Add support for having multiple servers store seperate config information in the same
database


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4660 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-10 21:52:17 +00:00
Michael Bayne d61083db7e Fixed another beans frank problem.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4659 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-10 01:01:07 +00:00
Michael Bayne 32a97f5b18 Or we'll just fix the bug. How did any of this ever work?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4658 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-10 00:54:20 +00:00
Michael Bayne b24fd5c408 Log the local oid assigned to all proxied objects so that we can see if
something funny is happening with spurious objects dispatched across servers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4657 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-10 00:51:17 +00:00
Michael Bayne 1fd540ab48 We don't even need this check. Simplify simplify simplify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4656 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-07 20:01:21 +00:00
Michael Bayne 9d5cf32ce0 Nixed premature optimization wherein a frequent premature optimizer, who we
will not name, was trying to allow certain authentications to proceed directly
on the authenticator thread instead of making a round trip through the
invoker. This resulted in those authentications trying to post their results
from the authenticator thread, which is bad because all downstream messages
should be posted from the distributed object thread.

The only authentications that would "benefit" from this optimization were peer
authentications of which there would be extremely few (currently one in our
largest installation) compared to the hundreds of thousands of normal
authentications, which have to make the invoker thread round trip as a matter
of course.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4655 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-07 19:57:51 +00:00
Michael Bayne 558d9ec2dc Widened. Modified authenticator to freak out rather than just go ahead and
process an authentication request if it is asked to do so before it has an
invoker (meaning the server is not yet initialized).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4654 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-07 19:47:29 +00:00
Michael Bayne 3546567824 Log the thread in question as we're seeing this warning on code that certainly
looks like it should be running on the dobjmgr thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4653 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-07 19:39:24 +00:00
Ray Greenwell cbb661337f Just check if the message event is private.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4650 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-06 20:53:49 +00:00
Ray Greenwell 5843ce777c Only attempt to call a method on the manager if the received event
is a ServerMessageEvent.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4649 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-06 20:46:15 +00:00
Ray Greenwell c4fac45b9c Created a ServerMessageEvent that is just like a normal MessageEvent
except that messages will never leave the server. If generated on a client,
they'll go to the server and be processed like a normal event there
(event handlers will be called) but the event will not leave the server and
be sent to subscribing clients.

Changed the ManagerCaller used by PlaceObjects to use ServerMessageEvents.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4648 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-06 19:00:41 +00:00
Michael Bayne 63413f862c Widened, added sanity check to postMessage() to log a warning and stack trace
if it is called from any thread except the distributed object dispatch thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4647 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-06 18:29:42 +00:00
Michael Bayne 3ac5ab2e10 Reset the framing output stream before we write the message rather than after
in case we freak out in the middle of writing a message.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4645 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-05 17:20:53 +00:00
Michael Bayne 295633909e Widened, tweaker error messages.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4643 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-04-03 18:10:55 +00:00
Michael Bayne 00e24d5ed6 Let's let whoever catches this exception decide if they want a stack trace
logged.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4642 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-31 02:38:28 +00:00
Michael Bayne 30252afc83 Apparently that's an IOException by the time it makes it up to us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4641 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-31 02:35:49 +00:00
Michael Bayne 3e2080cfd2 If we fail to read the AuthRequest from an out of date client, don't stick a
fork in the proceedings, pass the partially initialized request on to the
authenticator who will either get a version of 0 or an out of date version and
reject them properly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4640 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-31 02:20:01 +00:00
Elizabeth Fong 3c7a546472 rollback r4636 due to interference with non-yohoho projects
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4637 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-27 21:49:25 +00:00
Elizabeth Fong f76825c76e Fix yohoho singleplayer NPE boochery caused by unsafe direct call on DObjectManager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4636 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-27 21:11:13 +00:00
Michael Bayne 99662df60f Safety first!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4635 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-25 17:14:44 +00:00
Ray Greenwell 68030c0719 Do the actual reboot with a LongRunnable so that we don't get logged
warnings about it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4634 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-23 20:41:11 +00:00
Michael Bayne 30a2269c32 Log a warning to go with our stack trace and add a comment to explain why we
don't in the other case.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4630 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-18 17:02:57 +00:00
Michael Bayne 94cdf6f2dc Some of this got moved into samskivert.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-16 20:51:18 +00:00
Ray Greenwell 5ed85d4967 A marker interface that can be implemented by components other than normal
texty-input components that wish to have the chat system leave their focus
alone.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4626 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-13 18:47:29 +00:00
Michael Bayne f0fe896194 Widened, modified sendRequest() to avoid freakout if it is called after the
director is cleaned up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4624 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-13 18:18:06 +00:00
Ray Greenwell f3f810b49f Change the meaning of holdsToken(): now the token(s) specified must be
EXACTLY held. I think this is ok because all callers currently pass a single
token at a time, but I have not verified this for every project.
Please verify this for your project!
Added holdsAnyToken() which has the old behavior of returning true if any
bit is on.

I think we should change all the projects' various isSupportPlus() methods
to be just called isSupport() and those will return
holdsAnyToken(SUPPORT | ADMIN | etc);
If you need to check if a user has a single SUPPORT token but is not an
admin, you can do that by hand.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4617 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-06 22:38:33 +00:00
Michael Bayne 3b4c331e0b Log when we're calling logoff() for our local peers to see if this is or isn't
happening on the hanging dev server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4604 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-27 00:46:32 +00:00