Commit Graph

42 Commits

Author SHA1 Message Date
Michael Bayne ebdf693143 Log the culprit when we report and continue from a fatal error.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2963 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-21 02:18:56 +00:00
Michael Bayne a26e460fd6 Catch fatal errors thrown by invoker units as well. Also only log the
stack trace if we're not going to rethrow the error.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2958 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-21 00:22:30 +00:00
Michael Bayne 813e7b0d47 Attempt to catch and recover from fatal errors. If some rogue event
listener tries to 'new int[Integer.MAX_VALUE]' or infinitely loop, they
will get the smack down and we will go on about our business.

If things have actually gone pear shaped and we are failing on every
event, we'll hit the 30 fatal events in 60 seconds cap and stick a fork in
ourselves.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2957 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-21 00:04:40 +00:00
Michael Bayne 66b627ef2c Incorporated profiles into the 15 minute dump; removed some vestigal
constants.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2952 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-09 02:13:35 +00:00
Michael Bayne 1d97122a81 Use the fine grained timer (measure in microseconds rather than
milliseconds) and same every 100th event instead of profiling every event.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2951 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-09 02:08:28 +00:00
Michael Bayne f013aba02b Additional robustness: mark the server dobjmgr internal events as private
and refuse subscriptions to invalid oids (it's not out of the realm of
possibility that the clients were somehow subscribing to oid 0 and funny
things were happening).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2778 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-16 04:14:56 +00:00
Michael Bayne 6c1274eef3 This should never be sent over the wire, but it is somehow, sometimes, and
by making these transient we can hopefully debug it more effectively if it
happens in the future.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2773 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-15 18:50:02 +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 8e158dd1e8 Let's get the class name in there as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2660 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-15 16:47:33 +00:00
Michael Bayne 7d98a59c1c Enable unit profiling and keep an eye out for exceptionally long running
units.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2652 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-12 22:10:07 +00:00
Michael Bayne d76d4e89ff Make it possible to have a distributed object destroyed when its last
subscriber is removed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2602 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 17:23:53 +00:00
Michael Bayne 36624d96ac Finally got around to making compound events actually stick together until
they arrive at the client. Mmm... network efficiency++.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-10 17:48:42 +00:00
Michael Bayne b20a6633b9 Modify the dobjmgr and invoker such that they process the rest of their
queue and then shutdown.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-31 04:11:24 +00:00
Michael Bayne ef525ebad9 Modified DSet support such that additions, updates and removals are
applied immediately on the authoritative copy of the object (the one on
the server). We already do this for all other object modifications (except
OidList which is kind of special anyway), but we should be wary of
potential wickosity.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2302 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-10 18:29:54 +00:00
Michael Bayne 52c62d3e3d The beginnings of a system for profiling the amount of time spent
processing invocation units. It needs a timer with much finer granularity
than one millisecond to be useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2223 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-27 22:56:29 +00:00
Michael Bayne f7c27a1afa Added a mechanism to check that we are running on (or not on) the
distributed object event dispatch thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 22:51:52 +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 71c392555f Fixed bug in dobj reference management.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1581 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-17 01:54:33 +00:00
Michael Bayne 35df145846 Added the ability to set up a default access controller which is used (by
default) for all objects created in the system.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-20 03:23:00 +00:00
Michael Bayne 1bca84927f Added support for DObject transactions which are collections of events
that are dispatched over the network at once and processed all at once.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@979 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-09 07:50:37 +00:00
Michael Bayne d2ee77e08e Use safeToString() when logging the object that caused a subscriber to
choke so that we don't choke if DObject.toString() chokes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@919 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-02 09:53:00 +00:00
Michael Bayne 9d9872f606 Made ObjectAccessException a nestable exception; modified
objectAvailable() error dispatching to not incorrectly report a failure to
create an object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@918 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-02 09:42:36 +00:00
Michael Bayne 5d2f302218 Created RootDObjectManager interface for those entities that want to look
up objects directly by oid. They, of course, must be on the server if they
are doing this.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@728 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-04 01:01:54 +00:00
Michael Bayne 57b2e93ac3 Modified DObjectManager.createObject() to not afford optional subscription
because subscription no longer means receiving events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 00:36:40 +00:00
Michael Bayne 804505890f We love to revamp! Created a set of listener interfaces which are used
with distributed objects rather than having a single handleEvent() by
which all subscribers are forced to hear about all events. Now one
subscribes separately and then adds onesself as any of a few types of
listener once they have access to the subscribed object reference.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:03:03 +00:00
Michael Bayne 8a4c46badc The first great Three Rings renaming. Cocktail changed to Narya, Cher
changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 04:07:54 +00:00
Michael Bayne 14b8654d3a Modified code that calls objectAvailable() to catch exceptions thrown by
the subscriber so that they don't throw monkey wrenches into anyone's
business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:40:44 +00:00
Michael Bayne 6620936a04 We've always been at war with Eurasia. Changed InvocationManager to
InvocationDirector (please god let the renaming be done). Removed IntMap
and modified code to use samskivert's HashIntMap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-02 02:08:16 +00:00
Michael Bayne 7ad883b4f6 Added the ability to post runnable units of executable code onto the
distributed object manager thread. These are slipped into the normal event
processing loop.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@222 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 01:00:26 +00:00
Michael Bayne 5dfb32d739 Modified event helper mechanism to allow helpers to abort the event
dispatch. Added code to abort object added events that are trying to add a
non-existent object to an oid list. Wrote test driver for this and
duplicate object add request handling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@196 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 21:56:48 +00:00
Michael Bayne 6fe9ad8a6e Finished wiring up oid list tracking; made shutdown() work on the cher
server; added an easy mechanism to write test modules and invoke them on
the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@192 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 00:28:49 +00:00
Michael Bayne 5320567957 Commented out some debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@190 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-07 21:25:13 +00:00
Michael Bayne 782e9501d6 Implemented object destruction; wired up some missing stuff; created a
test server to make some testing easier; various other cleanups.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@188 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-07 20:38:58 +00:00
Michael Bayne 1c8e363f98 Preparing for the additions that will allow oid list tracking facilities
to be put in place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@106 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-23 21:12:55 +00:00
Michael Bayne e912b18e27 toString()stravaganza!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@77 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-19 19:30:14 +00:00
Michael Bayne 41488822dc Modified invocation request procedure to provide a reference to the client
object that initiated the request. Implemented the invocation notification
side of things.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@76 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-19 19:18:07 +00:00
Michael Bayne 7cb9d84d54 Wired up the remainder of event dispatch and added facilities for cleaning
up after objects when they have no more subscribers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@38 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-13 05:17:55 +00:00
Michael Bayne 6a1de87f2a Further wired up the client side of the distributed object system. Removed
the facilities for fetching (without subscribing to) an object. This is
done extremely rarely and the user might as well just subscribe and
immediately unsubscribe because the dichotomy between fetching and
subscribing just served to overly complicate the internals for no good
reason.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@30 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-09 23:39:04 +00:00
Michael Bayne 029712985e DObjectManager: added unsubscribeFromObject() for subscribers that wish to
unsubscribe in the absence of a reference to the object in question and
potentially from an unsavory thread.

Client, ClientManager, etc.: Further work on the server-side of the
distributed part of the distributed object functionality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@27 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-05 22:44:31 +00:00
Michael Bayne 1c6b292edc Starting to wire up client/server dobj stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@22 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-02 01:30:37 +00:00
Michael Bayne 1929898dd8 More juicy goodness. Event dispatch seems to work now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@20 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-01 20:35:39 +00:00
Michael Bayne 45c2dc143f More progress on the distributed object stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@19 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-01 19:56:13 +00:00