Commit Graph

68 Commits

Author SHA1 Message Date
Michael Bayne 768e6a76be Create our shutdowner list at class init time so that it is safe to register a
shutdowner at any time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4915 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-12-20 22:05:49 +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
Michael Bayne a6be47fa83 Adjust the shutdown process to ensure that we can get messages generated during
the shutdown sequence out to our clients where desired.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4807 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-08-06 18:38:27 +00:00
Michael Bayne d1313d2296 Let the server delay shutting certain things down until it knows that the
invoker and dobj threads are well and truly finished.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4737 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-15 00:03:31 +00:00
Michael Bayne 8206753188 A we bit of (not so) new logging world order conversion.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-23 18:40:15 +00:00
Michael Bayne 91f8ac6fa6 Turns out Sun has secret support for handling signals, so we'll use that
instead of our native library. I've left the native library support in in case
the Sun stuff is not available, but that's so extremely unlikely in a server
environment (IBM recreates Sun's signal handling in their VM because it's so
dang useful) that I should probably just nix it altogether and simplify things.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-14 21:36:58 +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 c25024f497 Move some low-level object access control into Presents from Crowd (default all
objects to non-modifiable, restrict client object subscriptions to the client
in question). Modified Peer code to not log a warning when a peer is not online
in an expected way (not listening for connections).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-23 19:41:30 +00:00
Mike Thomas 5b83ee58a0 Call the proper removal function...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4288 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-24 23:29:43 +00:00
Mike Thomas 02113e6eab Allow shutdowners to be removed in case they're no longer interested.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-24 23:27:19 +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 e7cb973b94 Missed a spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4236 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-30 18:29:32 +00:00
Michael Bayne b417d3cb0b Java uses SIGUSR1 for interrupting threads when it wants to send them an
asynchronous exception, so we can't use it or badness will ensue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4235 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-30 18:26:58 +00:00
Michael Bayne a63af7933e Make it possible to generate a non-resetting report externally.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4225 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-25 23:31:21 +00:00
Michael Bayne 012549d177 Differentiate between interactive reports and periodically generated reports.
Only reset our accumulating counters for the periodic reports.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-25 23:03:51 +00:00
Michael Bayne 091fda3e77 Revamped stats tracking so that it all happens on the same reporting interval.
Turned off the very verbose unit profiles as we don't currently use them. Wired
up SIGUSR1 to dump a report to the log.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-25 22:47:42 +00:00
Ray Greenwell aa5f38be5d Changed the way the Authenticator is created.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4204 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-21 03:47:32 +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
Mike Thomas cd8c665cf5 Pull out the ClientManager creation so it can more easily be overridden.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-06 01:01:07 +00:00
Michael Bayne 77adfc15ec Revamped the basic Presents client to support attempts to connect to the server
on multiple ports, falling back from one to the next as appropriate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4158 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-30 22:12:15 +00:00
Michael Bayne 15528d9055 Multiple ports!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3657 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-07-21 19:34:26 +00:00
Michael Bayne 0e2f51b91f Recreate our shutdowner list when we re-init() so that we don't end up
freaking out in standalone mode where the server is started, and shutdown
and started again repeatedly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3418 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-19 00:30:27 +00:00
Michael Bayne 9682983526 We can't rely on the connection manager not being shutdown to determine
whether or not we're already shutdown as it may have shutdown
unexpectedly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-18 19:08:18 +00:00
Michael Bayne 121f6d7e53 Did the refactoring necessary to get the client and server to live happily
together in one JVM and both interoperate with the AWT thread in a manner
so harmonious as to bring a tear to the eye. This was surprisingly much
easier that I expected, thanks to my eminently sensible initial design,
I'm sure. ;)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:34 +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
Ray Greenwell 7b3750c19c Log when a shutdown is initiated by someone pressing ctrl-C (or sending
the process the same signal another way).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3263 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-06 22:11:57 +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
Michael Bayne e1d5b096ed Invoker refactoring.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-29 03:22:22 +00:00
Michael Bayne fadc9b82d9 Other entities may also want to queue up a shutdown.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-03 09:03:06 +00:00
Michael Bayne d618d3c771 Eclipse suggested cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Michael Bayne ef17c4487e Would you believe, we still missed a fricking newline.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2771 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-13 22:46:13 +00:00
Michael Bayne c9f9cfe34d Fix up registered interval reporting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2770 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-13 21:38:37 +00:00
Michael Bayne 72674bbf49 Report the number of intervals registered as well as the number fired in
the reporting interval. Now we can see if we're leaking intervals (which
would be double plus ungood).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2769 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-13 21:05:28 +00:00
Ray Greenwell b59b9b5954 New very safe shutdown scheme. An Invoker.Unit runs on both the Invoker
and dobj thread until they're both empty (or it has been passed 50 times)
and then shuts the threads down.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2744 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-08 03:11:55 +00:00
Michael Bayne b009981c5f Refuse repeat shutdown requests.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-31 04:11:01 +00:00
Michael Bayne 23ec0c58ec Shut down all nice and happy like when we get a ctrl-c.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-31 02:10:37 +00:00
Michael Bayne f275f57a3b Make shutdown() an instance method so that it can be augmented.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 21:27:13 +00:00
Michael Bayne 1655f680aa Added a mechanism for participating in server shutdown.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 20:40:47 +00:00
Walter Korman a2867539bc Log interesting system information on server startup; logging at start of
init() also provides immediate feedback re: the server starting up and a
timestamp in the log against which subsequent action timeliness may be
weighed.  I suspect mdb will decide this is better off residing in the
Yohoho-specific server and outputting to something like the server state
audit log, but I like it here and so I've forged ahead.  If this does get
the axe, I still claim that logging "Server starting up..."  as the first
business in init() is useful and desirable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2143 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 22:36:58 +00:00
Michael Bayne f13bfa62aa Allow the state of the server report to be logged in a custom manner.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2084 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-22 07:27:20 +00:00
Michael Bayne 9e9dc24b72 Need to put this in a config file, but for the time being, up the "state
of the union" report to once every 15 minutes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1922 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-06 06:18:17 +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 a0e9044e93 Config clean up and unification. The base servers were doing more than
they needed to and when all that was stripped away, they didn't really
need their own config files.

Now what little config they need is provided by the users of these basic
services so that said users can make their own decisions about where to
obtain configuration information.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1820 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-21 20:56:21 +00:00
Michael Bayne d49e724693 Don't start up the connection manager until the dobject manager has
processed everything put into its queue during the initialization process.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1767 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-01 05:15:45 +00:00
Michael Bayne e54a4d41f4 The great invocation services rethink of 2002! Rearchitected the remote
method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-14 19:08:01 +00:00
Michael Bayne d06aeb2cc7 Shut the server down if we were unable to initialize it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1616 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-25 20:24:02 +00:00
Michael Bayne 587e89ef24 Created services for distributing delta times over the network which are
interpreted according to a globally established base time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1404 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-28 23:14:06 +00:00
Michael Bayne 27866e0541 Moved configuration fiddling into config object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-28 22:25:44 +00:00
Michael Bayne a2db66aa21 More Config rethink.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1167 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-28 23:59:34 +00:00
Michael Bayne b486315e47 Revamp! Modified the way configuration is handled.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1166 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-28 22:32:34 +00:00