Commit Graph

633 Commits

Author SHA1 Message Date
Dave Hoover 1645c23be5 No @Overrides for interfaces in java 1.5
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6160 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-16 17:45:50 +00:00
Charlie Groves a0d4296b4e Split tcp socket opening and datagram listening out of ConnectionManager to allow sockets to remain
open when a ConnectionManager using them shuts down.

BindingConnectionManager takes on the duties of opening sockets that ConnectionManager used to
handle, and it's injected automatically by PresentsServer.  Hopefully that means this won't change
anything for existing users of PresentsServer.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6157 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-16 02:49:29 +00:00
Charlie Groves 0d4837e71d ConnectionManager allowed a server to listen on multiple tcp and datagram ports, but it only closed
the last opened.  Close all opened listening sockets.

Also, the last opened datagram socket would be used to send all datagram messages instead of the one
datagrams were received on.  It now goes through the same channel where datagrams were last
received.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6156 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-14 22:47:45 +00:00
Michael Bayne d5dcc4a1eb Nixed some cruft, updated some source headers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6151 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-09-11 04:30:16 +00:00
Andrzej Kapolka 90929ab5d7 Fix for reconnection issue in Project X. When clients disconnect, we need to
reset the throttle state.  When they reconnect, we need to resend the message
rate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-28 02:14:09 +00:00
Charlie Groves 543a0d8a57 Allow subclasses to change how signal handlers are registered
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-23 22:28:29 +00:00
Charlie Groves c12e1e44b3 Multimap is pretty rad
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6129 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-08-12 20:59:47 +00:00
Par Winzell 46835601af Missing newline in report.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6091 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-07-02 13:32:49 +00:00
Dave Hoover c54c82da55 Slay some cyclopian variables.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6082 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-15 17:26:29 +00:00
Andrzej Kapolka 9043e99f7a Separated TCP and UDP bind hostnames (we want to be able to bind to the
wildcard address for TCP in order to accept connections on both the
public hostname and the internal hostname used for peers, but bind to the
public hostname for UDP because binding to the wildcard address seems to
cause problems receiving packets).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6066 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-05-07 01:12:55 +00:00
Dave Hoover 4b61decebb Remove trailing whitespace/unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6054 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 20:32:47 +00:00
Ray Greenwell 528a9d1f66 @Generated, going stag (without a date).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6052 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 16:12:43 +00:00
Ray Greenwell 43e556fb59 @Generated annotation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-04-07 05:33:54 +00:00
Charlie Groves d5d9b7f9ea RootDObjectManager already implements RunQueue and Executor
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-03-31 19:26:46 +00:00
Dave Hoover 83f71c606e @Override gets the point across
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-10 20:32:51 +00:00
Dave Hoover 3414612462 Nix unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-10 20:32:49 +00:00
Michael Bayne c7ac36ac51 This is dubious. We define an _omgr that shadows super._omgr, assign it in our
constructor and then never use it. This is almost a noop, except that
ClientDObjectMgr registers and starts a flusher interval that will never be
shutdown. Since ServerCommunicator lives for the lifetime of the server, this
has not caused problems.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-02-09 19:54:15 +00:00
Dave Hoover 1926012bc5 Remove now spurious casts
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-13 19:19:15 +00:00
Ray Greenwell 4c009f7a5f Simplify this, which was complexified so that it could avoid logging
when posted to a shutdown queue. There's a method we can override for that now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6013 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-01-06 20:18:11 +00:00
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 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
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
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
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
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
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
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 293ec52255 Some Galileo inspired raw type and dead code elimination.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5956 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-14 22:20:16 +00:00
Michael Bayne 05e37f4f42 This log message is not strictly necessary. The connection manager immediately
logs that it's listening on its configured ports, when start() is called. It
does so on a separate thread, but I don't believe the subtle ordering
possibilities there are something that's actually causing/likely to cause
problems and/or needs to be called out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5947 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:42:18 +00:00
Michael Bayne 179c66f46a Missed a spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5946 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:39:03 +00:00
Michael Bayne 03ff9f8220 PresentsDObjectMgr.isRunning() is really isNotShutdown() and we need to
preserve those semantics. Sigh.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5945 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:38:36 +00:00
Michael Bayne f92350f1b3 Bah, don't include the PresentsDObjectMgr's state when trying to assert our
invariants.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5944 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:36:33 +00:00
Michael Bayne a8d3227fb5 You too. Naughty misreporter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5943 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 19:32:06 +00:00
Michael Bayne 1c60b9cc75 Promote the datagramHostname to the bindHostname and use it for our TCP
connections as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5942 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-10 18:34:42 +00:00
Jamie Doornbos 701d885222 Keep track of the total number of units run independently of Stats so it is not reset every 3 minutes by pulse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5941 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-09 23:59:02 +00:00
Mike Thomas 2acedb91a4 Better protection against divide-by-zero - if we have less than a second, we'll just round up to 1 second.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5938 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-04 22:42:27 +00:00
Charlie Groves e27f0ed5e2 No more setHours
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5935 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-26 22:51:48 +00:00
Charlie Groves 90e11d00b7 More fluency, less effluent
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5934 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-25 23:14:59 +00:00
Michael Bayne cc5a87d18d isEmpty() -> getPendingUnits() == 0.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5919 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-18 23:39:34 +00:00
Dave Hoover b04e27f8fa Prune spurious semicolons
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5917 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-17 21:45:13 +00:00
Ray Greenwell 7489a64555 Every byte is precious!
No need to tell the server the callerOid, it already knows it.
This saves 4 bytes for every listener you pass into an invocation request.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5908 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-13 19:15:21 +00:00
Charlie Groves 8ca961fc9d Wait for everything to clear before starting the connection manager, and split out the code called when starting said manager so subclasses can override that
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5900 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-12 20:02:01 +00:00
Ray Greenwell 4780fefb73 Wee cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5899 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-12 18:22:46 +00:00
Charlie Groves 5aefb2a2a6 Check that interdependent invokers are empty when shutting down the PresentsInvoker in addition to
checking the PresentsInvoker itself and the DObjectMgr.  Expose waiting for all theses queues to
empty on PresentsInvoker such that Presents servers can do things like wait for all the queues to
empty before opening to the public.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5898 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-08-12 08:29:49 +00:00
Jamie Doornbos f005c3e3a8 Removed unused imports
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5888 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 14:56:04 +00:00
Charlie Groves 0cd0a67679 Include the Runnable's toString in the toString of Intervals created by PresentsDObjectMgr
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5883 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-20 23:57:24 +00:00