Commit Graph

62 Commits

Author SHA1 Message Date
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
Michael Bayne 09f0bee0f3 Yet more header patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4602 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-24 00:39:27 +00:00
Michael Bayne 0384c8c129 Update our AuthRequest on session resume so that we deliver the proper
bootstrap services.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4601 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-23 23:19:11 +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 1e4c28ecff Fixed typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4492 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-12-21 06:58:11 +00:00
Michael Bayne 7379cf09db Communicate the client's timezone to the server during the authentication
process and keep that information around in case the server ever wants to know.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 01:56:41 +00:00
Ray Greenwell 0149aa3b1d Rollback last commit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:34:07 +00:00
Ray Greenwell a0626f8a3a Pass the authdata returned by the Authenticator into the ClientResolver.
This is actually kind of sketchy, because the resolver can't depend on it
because there are methods to resolve a client object without having an
authenticated connection.
For now, I'll leave this in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:05:22 +00:00
Michael Bayne bc9f53396c Revamped distributed object creation. There was no particular reason to create
distributed objects by reflection since we don't allow clients to create
objects, furthermore we needn't do it asynchronously. The object creation
methods were moved into the server-side only interface and made "immediate", so
the caller creates a derived instance of DObject and registers it with the
system instead of creating it with a Subscriber callback.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 23:46:48 +00:00
Michael Bayne 6be44f5a65 Finished up the basic peer system and wired up the tell forwarding. In theory
it all works, now to test it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-05 22:48:32 +00:00
Michael Bayne e492f09bee Now that we use the standard resolution observer mechanism, we need to
decrement the reference count of the client object as it is normally
incremented for every resolution listener.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-05 22:29:38 +00:00
Michael Bayne 8afd0316ec I decided to go hog wild and clean up all the type use in Presents which
required some serious bending and folding of the generic type system, but for
the most part we managed to avoid any mutilating. The gendobj task now
generates properly typed "addToXXX" and "updateXXX" DSet methods based on the
parameterized type of the DSet. This might cause unrecompiled code to break,
but I don't think there are many cases in the base toolkit where people call
DSet adders or updaters. We'll see and I'll add backwards compatibility
versions for cases where we need them to support GG games (everything else we
can just recompile).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4245 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-05 00:55:05 +00:00
Michael Bayne 0bceb75365 Move these up with their accessor friends.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4240 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-01 03:30:05 +00:00
Michael Bayne 7d54db4a95 Cleaned things up, fixed a years old bug. Now we will not get hosed if client
resolution fails for whatever reason and we will properly track our pending
resolutions (not leaving them dangling if resolution failed) and do so more
elegantly (by simply acting as a ClientResolutionObserver ourselves).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4239 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-01 03:29:19 +00:00
Michael Bayne 33a758dfce The basis of cluster support for Presents servers. All servers in a cluster
make connections to other servers in the cluster and can exchange events (in a
limited fashion).

This is different than Liz's project wherein servers share an oid space and one
can interchangably work with distributed objects from any server. This package
provides a means by which certain services (by default, presence and chat) can
be communicated between servers to allow communication between players
scattered around a bunch of otherwise independent server instances.

This is less general purpose but also less likely to encourage people to write
code that tightly couples multiple servers and then falls over because it
generates gobs of network traffic as events are flung willy nilly behind the
scenes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4238 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-01 00:19:59 +00:00
Michael Bayne d40435b221 Accept and honor the reset parameter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4220 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-25 23:09:19 +00:00
Ray Greenwell 79c6427c21 StringBuffer -> StringBuilder.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4191 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-13 22:42:20 +00:00
Ray Greenwell f9f1307884 Count how many client resolutions are currently being processed at any time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3599 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-15 20:46:36 +00:00
Michael Bayne 713e76373b Allow the authenticator to slip some authentication data down the line to
the PresentsClient which can then use it to fill in things like access
control information for the user. We could use this to replace the
UserStash mechanism we use on Yohoho, but that works so I doubt I'll do
that. However, this is needed to do things the more elegant way on future
projects, like Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:08:23 +00:00
Ray Greenwell bd80c348eb The great Interval revamp.
There is no more SafeInterval, instead Intervals can be constructed with a RunQueue to use for expiring.
PresentsDObjectMgr implements RunQueue.
Client has a getRunQueue() method to get the client side RunQueue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 19:23:00 +00:00
Michael Bayne 254e60811e Removed our temporary code as we have figured said things out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3234 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-24 20:37:36 +00:00
Michael Bayne 4cdcec6149 Do some hackery until we figure out where AuthUserObjects are getting
mapped into the client table without mogrified names.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3226 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-23 00:17:46 +00:00
Michael Bayne 8856ae43a0 Made session ending more robust in the face of potential boocehs by
derived classes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3118 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-09-15 18:21:26 +00:00
Michael Bayne a9720fd905 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:21:06 +00:00
Ray Greenwell 60f9159f25 When flushing inactive clients, don't let a choke in one prevent us
from flushing the rest.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-05-10 17:45:27 +00:00
Michael Bayne 32dee3cbaf 405 modified source files and 17,367 lines of diffs later we now enforce
more discipline when handling names in our code base. Any user entered
name should find its way into a Name object as soon as it comes out of a
text field or whatnot, and stay that way until it makes its way into a
text field or into a database record (for which String objects are vastly
simpler because of JORA magic).

Dear God, let me never again make a change this large for the rest of my
mortal life.

Unfortunately, this means we have to keep an eye out for funny business
pretty much everywhere. However, since we will absolutely want to test
market stalls and so forth on Azure, we'll have an opportunity to iron out
any funny business that might fall under the radar during our internal
testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-03-06 11:29:19 +00:00
Ray Greenwell a7908454a1 Removed insano tracking that allowed me to find the IntroPirate bug.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2962 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-21 01:00:23 +00:00
Ray Greenwell cd2d0ef47b Completely hacky debugging code added to help me figure out why intro pirates
sometimes (never on my server!) released twice. This will save the stack
trace from the first release and spit it out after the "normal" error-reporting
stack trace from the second release.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2955 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-13 19:10:54 +00:00
Michael Bayne 233ccbc01c Not to freak out about unmapped authing connections, connections are only
mapped after they are authenticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-20 19:30:52 +00:00
Michael Bayne 493c75b865 Make client and connection count information available.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-22 02:50:49 +00:00
Michael Bayne 34cd22cc18 Need to register as a shutdowner.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 21:27:23 +00:00
Michael Bayne 057a5458ad Have the client manager let the clients know that they are being shutdown.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 21:04:18 +00:00
Michael Bayne 687dc5f564 Map client connections by normalized auth username rather than credentials
instances.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2294 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-02 03:47:06 +00:00
Michael Bayne 55f40108b8 Added simple mechanism to resolve a client, apply some operation to it and
release it back into the wild.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2010 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 23:40:32 +00:00
Michael Bayne 371ca60bf5 Replaced old wacked-in-head system with proper reference counting for
client objects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1989 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 02:14:25 +00:00
Michael Bayne fa206b76ed Metrics! Added support for a "state of the server" report, in which
managers can participate, reporting lies, damned lies and useful
statistics. Initial participants include the client manager, the
connection manager and the distributed object manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1894 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-05 02:17:56 +00:00
Michael Bayne 2e32b6c3a7 Periodically scan the clients table and end the session of any expired
clients.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1872 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-31 21:04:19 +00:00
Michael Bayne 6c7bee6c1d Logging cleanups.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1747 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-24 00:51:01 +00:00
Michael Bayne ba4985053f Revamped "persona selection" support. Things now actually work, and in as
sensible a way as we can hope for.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1717 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-19 23:36:59 +00:00
Michael Bayne fc1232b98b Added means by which client's username can be changed (very carefully).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1684 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-16 23:34:25 +00:00
Michael Bayne c3191b9170 Brought code into line with the new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1606 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-23 05:52:49 +00:00
Michael Bayne cf8608f20a Enhanced reporting in failure conditions; fixed a problem where attempting
to end the session of a client that was already ended would result in
funny business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1567 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-10 01:26:21 +00:00
Michael Bayne 52790799d2 Name changes; comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1295 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-26 02:34:11 +00:00
Michael Bayne e3fafb5b8c Exposed the mechanism for locking down client objects during a client
session so that fake sessions can effect their own locking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1294 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-26 02:32:27 +00:00
Michael Bayne 2b6a4a1a5a Destroy the client object if we decide to unmap it because we're the only
ones that know that such an action is safe and we don't want stray client
objects lying around cluttering things up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1278 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-18 22:37:08 +00:00
Michael Bayne d635c003e2 Added getClient().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-18 20:46:43 +00:00
Walter Korman 4fc5f574d8 Added facility for enumerating the body objects for all active users on
the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1274 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-18 00:44:50 +00:00
Michael Bayne 9e16e87a69 Doris the refactorasaurus. Restructured the whole client object resolution
process so that it can be done by other entities than just the client
management services. Coordination between these parties is managed so that
no toes are stepped on in the course of loading and unloading clients and
everything is generally much nicer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1086 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-05 05:33:25 +00:00
Michael Bayne 16efe382bd Augmenting the AuthResponseData with server stuff turned out to be a bad
idea because that class is shared between the client and the server, so
instead we provide a blank object reference in which the authenticator can
provide whatever information it wants to the client services.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-03 22:01:57 +00:00