Commit Graph

5937 Commits

Author SHA1 Message Date
Dave Hoover fdf51a634a Welcome to the future.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-04 21:47:46 +00:00
Charlie Groves 67e88e2df5 Fuck off with that inject.internal shit
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-04 21:27:53 +00:00
Charlie Groves 2ba4d6a0d0 Wait to check if an interdependent invoker has posted back to the presents invoker until all the
interdependents have indicated they're blocking to check.  Otherwise the unit running before the
last BlockingUnit can post to the presents invoker and those newly posted units will be skipped.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-29 07:44:09 +00:00
Mike Thomas cb5aac620c It looks very much to me like we were able to occasionally sneak by the checks and shutdown the omgr too early in the following condition:
- PresentsInvoker decides it's empty
- It waits on other dependencies
- During the wait, something (probably from one of the other dependencies) posts to the PresentsInvoker
- We loop back around, the dependencies are empty
- We end early, with the posted bit still to be done...

So... after waiting, do a quick check for emptyness and if not satisfied, start the whole dern cycle over.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-23 19:58:34 +00:00
Dave Hoover 6ab0c7c95e As Charlie points out, that makes more sense being abstract. Shame on me for copying
NamedSetAdapter on autopilot; there you have multiple things that you might not want
to bother with, but here you damned well BETTER implement that one method yourself.

Also, while I'm at it, make that protected since I really doubt you're going to find
yourself sitting on top of an EntryAddedEvent that you're REALLY SURE is the right
one & want to pass it in to one of these by hand. And if you do, suck it up and let
the string compare burn the couple extra cycles to make sure. (I feel like making
the same change to the other Named* things here real quick, but I should really 
double check that I don't break anybody's stuff/change anything I see using it that
would now be making the named versions more visible for now good reason)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-15 23:56:39 +00:00
Dave Hoover 9269d5b617 Much like NamedSetAdapter and NamedAttributeListener, I'd like to conveniently
listen for ElementUpdatedEvents on specific bits on dobjs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-15 23:38:06 +00:00
Ray Greenwell cd88ba7634 All Executors, all the time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-08 19:58:55 +00:00
Ray Greenwell fc77b1bb0b Prefer Executor over RunQueue...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-08 19:05:06 +00:00
Ray Greenwell f546167ca7 RootDObjectManager (PresentsDObjectMgr) implements Executor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-12-07 21:26:44 +00:00
Jamie Doornbos 72ce4370af Fixed incorrect import. Luckily this suddenly started not compiling for me locally. But, bizarrely, it has been working on the build machine and at runtime since 11/09.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-30 17:24:45 +00:00
Andrzej Kapolka ded9f02350 This is not that interesting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-13 20:54:20 +00:00
Dave Hoover f3e5682f8c Sometimes a short is still excessively long.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5997 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-12 21:38:10 +00:00
Dave Hoover b65bfae2e3 recordToChatHistory(UserMessage, Name...) went away.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 18:49:13 +00:00
Dave Hoover 51dc6e65d7 Make build in 1.5
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 03:57:38 +00:00
Jamie Doornbos c71c2379fc Oops, missed the boilerplate stuff for invocation service transmissable objecthood upon final multi-node testing in msoy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5994 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 01:47:35 +00:00
Jamie Doornbos fd7b3ae383 Method to poll all peers for chat history and asynchronously return the result.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5993 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 01:13:58 +00:00
Jamie Doornbos 90a21319f1 Expose the chat history between crowd peers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5992 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 00:34:41 +00:00
Jamie Doornbos 5e6cf46926 Backtrack a bit for recording channel speaks to the history. Instead of weighing down UserMessage with extra stuff (there is a lot of infrastructure that seems intent on avoiding this), record the value only in the server's history by wrapping messages in a new value class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5991 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-10 00:05:56 +00:00
Jamie Doornbos 09c7229fa6 Add channel-based communications to the chat history logs as well. This groud work for msoy issue 286, which has probably been around since the channel system was added.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5990 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-09 20:31:46 +00:00
Ray Greenwell 6c65caeb1b readField() also gets an untyped return type.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5989 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 23:09:26 +00:00
Andrzej Kapolka c88ca10d26 Provide a means of adjusting the select loop time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5988 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 22:00:30 +00:00
Ray Greenwell 00c4777460 Example text.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5987 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 21:50:21 +00:00
Ray Greenwell d82a926ca1 Add an example to the docs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5986 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 21:18:43 +00:00
Andrzej Kapolka a707c8b515 Set the traffic class for datagrams to low-delay. I doubt this will
actually reduce latency, but wouldn't it be cool if it did?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5985 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 20:56:37 +00:00
Ray Greenwell ee27342a24 Proposed change to readObject().
The purpose is to
- Ensure type checking for "fail-fast" detection of streaming errors.
- But simplify it so that callers don't have to cast themselves and
  potentially screw up by using "String(obj)" or "Array(obj)", or miss out
  on the fail-fastyness by using "obj as SomeType".
- But, at the same time, allow for the sveltest code possible.
    // first one is a bit shorter!
    _name = ins.readObject(Name);
    _name = Name(ins.readObject());

    // first one is a bit shorter!
    _state = ins.readObject(String);
    _state = ins.readObject() as String;


So, to sum up: the code is the shortest and doesn't require special-casing
if you are reading a String, Number, int, uint, Boolean, or Array.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5984 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-11-06 01:27:03 +00:00
Ray Greenwell c16de5994e Moved these here to narya.
Lately I'm trying to do things more "actionscripty", and so we just
use the "natural" iteration on an object (either 'for' or 'for each').
Plus, we never use these Iterators anywhere except in presents-based code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5983 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-27 00:57:48 +00:00
Michael Bayne 6137fbfb79 As Charlie points out, we can use the protected constructor if we're creating
an anonymous extension of DefaultMap and any other creation is better done
through the static factory methods, so don't present the user with a pointless
choice.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5982 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-23 04:58:49 +00:00
Ray Greenwell b124934a97 MethodQueue -> DelayUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5981 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-21 21:49:17 +00:00
Charlie Groves 90c97a54b3 Turns out USR1 is reserved by the JVM on pretty much every platform but Mac, so only expose USR2 for
injected handling by subclasses.

I had a nice version of this that allowed user controlled handling for any signal to be injected.
Unfortunately it used multibindings from guice, and I'm loathe to add a dependency to narya just for
that.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-21 20:47:55 +00:00
Charlie Groves 9284f1b4b6 Expose USR1 and USR2 signals to users of AbstractSignalHandler if they bind instances of a
SignalReceiver class for those signals.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5979 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-19 20:58:03 +00:00
Mike Thomas 644de92f7b toString() is being overridden, mark as such.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5978 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-08 20:28:09 +00:00
Michael Bayne ecec43418b Fluency--.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5977 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-04 23:26:09 +00:00
Michael Bayne 5f3f1ad5c9 As Ray points out, we don't need a special interface for this. The creator is
simply a function from K to V. Sorry to break users but I know you're few and
being able to integrate with all the excellent Google Collections functional
stuff is a juicy reward for a little egg breaking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5976 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-10-01 01:07:28 +00:00
Andrzej Kapolka dd15495810 Avoid NPE for final datagrams sent/received after client cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5975 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-28 21:51:08 +00:00
Andrzej Kapolka 8cbc3fcf1a Throttle datagrams as well as streamed messages.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5974 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-27 02:23:17 +00:00
Charlie Groves 2d044ec3f5 Fix the docs now that fetch has shown up and break out a factory for instance Creators separate from
newInstanceMap.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5973 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-26 00:35:13 +00:00
Ray Greenwell c42cb490cf Every "case" should have a "break", even the last one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5972 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 21:17:15 +00:00
Nathan Curtis ea49d70129 * Add Msoy's MethodProfiler so I can use it in Riposte.
* Apparently, a couple of whitespace cleanups my gvim did awhile ago while I was looking around in
  here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 20:40:48 +00:00
Ray Greenwell 1c538ac78e Drive-by logging modernization.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5970 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 20:18:14 +00:00
Ray Greenwell dae0f7f44f Fuckit, let's use uint paramters and make the default uint.MAX_VALUE.
Unless I have to roll this back because the like compiler in CS3
shits its pants trying to understand it (external references for
default parameter values seem to sometimes fail).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5969 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 20:13:39 +00:00
Ray Greenwell 3f2468e7a1 Oh crap, let's make ObjectOutputStream protect against fuckup, too.
Note that we're using ints instead of units for offset/length.
Does anyone really need a byte array larger than 2^31?
And if so, wouldn't you then also be within sight of busting 2^32?
Why not make it a Number and support up to 2^53?
Number is no guarantee of a desire for a floating-point value in
the flash libraries, see Graphics.lineStyle()'s first parameter.
Actionscript, you fail for not having long.
And... I said I wasn't going to bitch at Adobe/Macromedia any more
but this is a total FAIL.
0 is a valid length. Everyone knows this.
Can you imagine if they picked a different constant?
   length: the number of bytes to read, unless it's 9, in which case
   it reads *all* the bytes. Your code should check to see if you're
   about to read 9 bytes, and instead read 8 in one go and then
   a follow-on byte.
uint.MAX_VALUE would have made tons more sense.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5968 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 20:09:35 +00:00
Ray Greenwell 33d19f7a69 Another fix for potential streaming errors.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5967 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 19:37:34 +00:00
Ray Greenwell 730d448e40 As far as I can figure, ArrayMask objects are used even when
the Array length is 0, so let's make sure we don't cause any
streaming errors here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5966 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-24 19:35:35 +00:00
Michael Bayne a6a008cb50 Turns out we want to highlight the difference between normal getting and
getting that adds the default value to the map. I opted for fetch() which at
least means something close to get() and can be documented as also inserting
the default value. I also considered obtain() and acquire() but those both felt
like they had something to do with locks. apply() seemed too functional.
wangle() seemed like a strong contender for a while.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-22 20:25:05 +00:00
Charlie Groves 3c159a6497 Widened
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5964 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-22 00:05:18 +00:00
Ray Greenwell f75d46f75f Add a better toString, for debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5963 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-17 23:16:22 +00:00
Ray Greenwell 53f1dff95d These are all final.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5962 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-17 21:58:30 +00:00
Ray Greenwell f9bc385c99 Some examples.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5961 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-17 21:53:02 +00:00
Ray Greenwell a24b0d2d03 So, these classes like Integer and langBoolean exist solely for
streaming to our java server, so let's just make them streamable directly.
Does away with the need for custom Streamers.
Also made them Hashable, in case we read a StreamableHashMap containing
Integers as keys, for example.
Less code is better code.
(Why was BooleanStreamer added the other day? langBoolean was already Streamable
 and was already in Translations)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5960 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-17 21:42:25 +00:00
Ray Greenwell 055aac9b55 Use Joiner instead of StringBuilder, in some places.
Use String concatination in others (it's faster in actionscript than in Java)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5959 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-16 21:13:07 +00:00