Commit Graph

40 Commits

Author SHA1 Message Date
Michael Bayne a6a6af8e99 Fix some niggling oid translation problems.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4740 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-19 01:03:48 +00:00
Michael Bayne 2fead8208c Let's not confuse terminology between one server proxying for another server
and the ProxySubscriber mechanism by which the server proxies for the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-13 22:41:41 +00:00
Michael Bayne c365afa2fc Rejiggered the way things are handled when using a Client to proxy events from
another server. The PeerManager needs both to rewrite the oid of the events
before dispatching them and to assign an eventId to them so that they will not
be filtered by PresentsClient when deciding whether or not to send them along
to its client. Also fixed compound event dispatch in the process. Now proxy
subscribers will be notified once of a compound event rather than of each
individual internal event.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-13 22:37:53 +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
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
Michael Bayne e1c5d01afd Added proxied object support to the distributed object manager framework. This
exposes the need to write a Client that is optimized to act as a proxy instead
of just using the one that is designed to run on a user's machine. However,
this will be fine for now. Integration with PeerManager forthcoming.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-03 01:14:17 +00:00
Michael Bayne 12410ee32c Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-02 23:49:24 +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 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
Ray Greenwell 26c928fc45 Use the valueOf factory methods pretty much everywhere.
These are the preferred way to get instances of Boolean, Byte,
Short, Character, Integer, Long, Float, and Double object.
It's always made sense for Boolean objects, and with 1.5 these factory
methods were blessed as the proper way to get instances unless one
absolutely needed a distinct object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4145 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-24 01:24:24 +00:00
Michael Bayne 4324149cdb We queue ourselves up every time an event comes in, so we should only process
one event when our run() method is called and then let other (non-distributed
object) things get their chance to run in proper order.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3795 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-21 19:30:39 +00:00
Michael Bayne ee144eb974 Created a basic application framework that integrates JME's rendering loop
(in fixed framerate format) with the Presents event queue in what will
hopefully be happy harmony. Also made some edits to the Presents code to
not sound like we assume things run on the AWT thread which we don't and
which is not the case in this framework.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3510 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-20 21:44:03 +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
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 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 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 91146a6805 Added support for registering, on a per class basis, a delay which will be
observed after the last subscriber of a matching distributed object has
been removed. Our client's subscription will not be flushed until after
the delay has expired, and only then if no other subscriber has come along
requesting the object in the meanwhile.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-11 04:43:14 +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 9bbe02c4cb Remove objects from the local object table when we remove their last
subscriber so that we don't hand them out as happily proxied objects to
subsequent subscribers that might come along before we receive our unsub
ack. We do still maintain non-acked objects in a dead table so that we
know when to warn about undispatchable events and when to ignore them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2210 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-22 02:02:04 +00:00
Michael Bayne 8bafb6fd32 Specifically ACK unsubscribe requests so that we don't see a bunch of
warning messages saying that we couldn't deliver events on the client that
come in after all client-side subscribers have been removed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2204 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-21 22:02:37 +00:00
Walter Korman b7e24b0b63 Fixed javadoc comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2024 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 22:04:46 +00:00
Michael Bayne bf25816235 More info (though this message will eventually go the way of the debug).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1737 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-23 18:19:07 +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 18039887b4 Added a debug hook for dumping all objects in the dobj table.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1580 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-17 01:54:16 +00:00
Michael Bayne 2f1a67077a Added code to establish the time delta between the client and server
clocks immediately following authentication.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-28 21:56:38 +00:00
Michael Bayne bcca494fdd Commented out some debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@986 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-10 04:19:34 +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
Walter Korman bc6f66f6cd Added ObjectAction.toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@953 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-07 00:24:36 +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 3df5a5d1cb Commented out debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@462 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-16 16:41:14 +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 ec1cf5c667 Changed IntMap to HashIntMap.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-17 05:18:21 +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 915f3db6f1 More work on invocation manager; modified startup sequence so that server
can get shit together before bootstrapping the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@68 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-19 07:09:16 +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 89083f4708 Moved the typed object registry into the same package with the rest of
the typed object stuff; made events typed so they can be transported;
further wiring up of event dispatch over the network.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@34 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-06-11 17:44:04 +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