Commit Graph

84 Commits

Author SHA1 Message Date
Ray Greenwell 5bd90aa797 Stop using TrackedObjects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-11 19:17:43 +00:00
Ray Greenwell 16322b1422 Added some warnings for illegal DSet operations and added a small
optimization in the process.
Previously, we dumped stack on the server if a entry add was illegal but
did nothing for update/remove.
On the client, we complained for updates and (indirectly) adds, but not
removes.
Now we complain everywhere.
And- as an added bonus, on the server we now do only one binary search for
updates and removals. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-29 02:30:23 +00:00
Ray Greenwell ec31df7a99 Removed cruft.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3486 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 20:39:56 +00:00
Ray Greenwell be8a755dad The generic set updaters weren't working because proguard renamed the
methods they were looking for.

Since it's probably impossible to have proguard generically skip renaming
for these generated method names, let's update the fields in a different way.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3434 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 22:31:46 +00:00
Michael Bayne 1d976ceaf8 Merry Christmas to the server CPUs. It occurred to me that we could
accomplish our "previous value" support in the distributed object system
without using reflection and could also avoid using reflection in the case
where we have already applied the event on the server (which is generally
the case on the server).

Rather than hacking up the gendobj script, I took this opportunity also to
rewrite the DObject generation script as an Ant task and in doing so,
implemented another recent idea which is that we can just augment the
FooObject.java file instead of having a separate .dobj and .java file.

You'd think it was spring there's so much cleaning going on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:48:07 +00:00
Michael Bayne 36a629c5e9 More ...Equal() -> ...() and ...() to ...Ref().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-23 17:36:32 +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 864adbdc20 Tracked objects. Now to set about to figuring out what to track.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3075 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-13 23:44:16 +00:00
Michael Bayne f700be00db Proving the value of the instant-review system, we repair this booch
before it has a chance to bring everything to a screeching halt.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-07 04:08:41 +00:00
Michael Bayne 212ebb1b53 As Ray pointed out, clearing the oid upon destruction causes problems, so
let's just not do it. We can accomplish our earlier goals, though with
slightly less distinction making capability, in a different way.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-07 03:10:24 +00:00
Michael Bayne 90e5231bae When a DObject is destroyed, set its oid to -1 so that it knows that it
was once alive but is now gone. Catch attempts to start a transaction on a
destroyed object and log them as such. Made isDestroyed() and isActive()
final for wholly unfounded performance reasons.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-03 07:16:56 +00:00
Ray Greenwell c8f519fc85 Rolled SettedObject right into DObject, because it's just too useful.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-03 18:15:03 +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 69a973efb2 Make our object manager available to nice askers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2903 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-11 18:36:32 +00:00
Michael Bayne ed5a97243e As it turns out to be nearly impossible to avoid occasionally trying to
post events to an object that is already destroyed, we'll allow
transactions to be started on non-active objects and we'll just log a
warning when the transaction is finally committed like we do for all other
events on non-active objects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2835 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-25 22:08:02 +00:00
Michael Bayne 5272911863 Don't really need the stack trace.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2833 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-25 00:04:00 +00:00
Michael Bayne 320f53913b We only need to introspect and sort our fields array once per class, not
every time we create a distributed object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2810 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-24 20:33:06 +00:00
Michael Bayne b19fcb219b getClass().getField() creates a new Field instance every time and possibly
creates an Object[] as well. Now we cache the Field instances and look
them up ourselves which will likely be much more efficient at only a small
additional memory cost.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2805 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-23 17:16:46 +00:00
Michael Bayne 76af5d2353 Prevent propagation of lock release events.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-22 22:54:14 +00:00
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