Commit Graph

65 Commits

Author SHA1 Message Date
Michael Bayne f7d55b9814 More debugging for DSet duplicate business.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-20 17:02:26 +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 43edd884c0 Added the necessary machinations to make getOldValue() and getOldEntry()
work on the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2510 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 22:32:04 +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 0a5714b661 Safety first!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-30 19:38:56 +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 56b0012782 Use Comparable for the to be removed distributed set key.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-26 17:54:56 +00:00
Michael Bayne 51a883fc34 Factored toString() into two methods for easier customization by derived
classes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-18 18:59:08 +00:00
Michael Bayne 8743be2131 Enhanced which().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2115 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 18:38:05 +00:00
Michael Bayne 48823b10f9 More revamped serialization cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2079 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-20 23:41:27 +00:00
Michael Bayne 18c7b2cf6f Complain loudly about listeners or subscribers that try to add themselves
more than once. Use testAndAddEqual() where appropriate now that
testAndAdd() doesn't use object equality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2056 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 00:30:47 +00:00
Michael Bayne 6b2433600e Be a bit more freaked out if someone tries to post an event on a stale
distributed object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1930 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-10 01:43:28 +00:00
Michael Bayne d34be8e838 Enhanced error reporting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1782 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-06 20:25:05 +00:00
Michael Bayne 077d0ee13a Refuse to start a transaction on a non-active DObject.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1772 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-04 01:31:59 +00:00
Michael Bayne 99dbe3dc76 Added support for nested DObject transactions; clarified documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1768 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-02 19:29:23 +00:00
Michael Bayne 42b22f1acc Experimental alternate toString() formatting style for DObject. Hopefully
it will be well liked.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1752 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-25 03:02:00 +00:00
Michael Bayne 0df0ec348d Gracefully report an error rather than NPEing if an event is posted to an
object that no longer has an omgr reference (has been destroyed).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-19 16:38:03 +00:00
Michael Bayne bb0bd7cc52 Added convenience method for posting a message event to a distributed
object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1681 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-13 06:41:34 +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 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 e9ceaa6ae9 Marked transient fields accordingly so that the Marshaller doesn't try to
send them over the wire.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1588 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-18 00:41:59 +00:00
Michael Bayne eb04dd7ea4 Added a method which can be used to determine if an object is currently
part of a transaction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1416 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 20:47:55 +00:00
Michael Bayne 5379787dc5 Made postEvent() public so that external entities can add events (like
message events) to a transaction already started on a particular object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1233 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-12 00:00:05 +00:00
Michael Bayne aa195bed83 Added a mechanism for pluggable event access control.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1135 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-20 03:19:51 +00:00
Michael Bayne 59aeb61fe3 Added ability to update individual elements of an array field. The objects
have helper functions named set<field>At() for such a purpose.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-19 01:10:03 +00:00
Michael Bayne 7ccb9594b9 Changed DSet.Element to DSet.Entry in preparation for the addition of
array element update support. (Arrays have elements, sets have entries.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-18 23:21:26 +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 670f3a71c3 Fixed javadoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@947 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 22:47:28 +00:00
Michael Bayne 84891c9b91 Whoops, wasn't appending field data to our buffer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@939 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-05 22:27:26 +00:00
Michael Bayne a83e512270 Modified DObject.toString() to use fieldsToString() so that all of its
derived classes need not do their own toString()ing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@928 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 01:47:20 +00:00
Michael Bayne c6f72ce556 Log message edit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@926 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 00:51:15 +00:00
Michael Bayne 25717d3cce Modified distributed sets such that they can be heterogenous or
homogenous, and in the latter case, they simply conserve network bandwidth
by not transmitting the classname of serialized elements when transmitting
themselves or element added/updated events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@925 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 00:50:12 +00:00
Michael Bayne 404a56dead Per Walter's suggestion: made all of the listener interfaces extend a base
listener interface so that an object that attempts to add itself as a
listener to a distributed object is required to implement at least one of
the listener interfaces.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@921 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-03 04:38:05 +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 0ab1638611 When setting aggregate values (arrays, DSet objects), we need to clone
them before setting their value in the distributed object to prevent
subsequent events from modifying those aggregate values before the
originals were propagated to the clients by the networking thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@458 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:12:48 +00:00
Michael Bayne 2ffe47e282 Do the right thing with a null _listeners array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@441 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:29:06 +00:00
Michael Bayne 5ae6875bbb Added a note about listener registration management.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@440 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:05:31 +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 a065652ac6 Unbooched subscriber array handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:35:02 +00:00
Michael Bayne 890bad996e Added ability to update elements in a set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@266 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:45:43 +00:00
Michael Bayne 55c4847a17 Added support for distributed sets: unordered collections of elements
where the elements are user defined objects that know how to read and
write themselves on a stream. Sets are required to contain elements all of
the same type to make network traffic more efficient (avoid sending the
classname every time an element is added or removed).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:31:09 +00:00
Michael Bayne 3c413b9f3d Added documentation; modified internal array management to use ListUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@258 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-15 18:38:54 +00:00
Michael Bayne 8a67066c57 Do the right thing if subscribers remove themselves after we've been
destroyed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@217 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 00:11:53 +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 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 7873ee98f7 Added facilities for creating named locks on distributed objects that will
allow services to prevent repeated invocations of themselves from stepping
on one another because of the serial nature of event processing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 00:39:44 +00:00
Michael Bayne ae73c73ac4 Commented out debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@158 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-03 02:12:27 +00:00
Michael Bayne ba74e4600b Modified toString() to be extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@150 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-02 06:01:13 +00:00
Michael Bayne 9d93650b65 Fixed javadoc @see syntax.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@143 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-02 04:49:08 +00:00