Commit Graph

5491 Commits

Author SHA1 Message Date
Michael Bayne 37c14fe414 Depot now exports google-collect.jar for us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5553 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-17 18:47:59 +00:00
Michael Bayne 0de7d59bdb Have narya depend on depot which depends on samskivert.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5552 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-17 18:46:23 +00:00
Michael Bayne d76d1678cf Find Depot in its new home.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-16 07:46:11 +00:00
Michael Bayne 40e9394817 Fix use of raw type.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-14 03:12:33 +00:00
Jamie Doornbos 79f5a17600 Oops, stray debug line got left in
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5549 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-14 01:51:28 +00:00
Jamie Doornbos 71af5514da Be nicely behaved if the user manages to close the client before the socket is opened
* Use _writer != null iff the socket is open and the authrequest has been sent
* Warn when posting messages prior to socket connect
* Clear the outgoing queue prior to sending the auth request, the servers authing connection expects this
* If a logoff is encountered prior to the socket opening, just shut down without sending auth request
* Driveby unused variable removal

This should fix the log warning "AuthingConnection$1: Received non-authreq message during authentication process"

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-14 01:49:58 +00:00
Dave Hoover e1afaccd23 Cleanup some unused stuff & mark some overrides.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 18:46:06 +00:00
Michael Bayne 9c1e09f8ab Don't let a peer connection linger for 8 minutes before we time out it. If a
peer disconnects for any reason, end its session immediately.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5546 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:55:05 +00:00
Michael Bayne 8890583476 If we are asked to end a session after the omgr has shutdown, just log
something friendly and drop the request. The server is about to go away.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:54:37 +00:00
Michael Bayne ca2dc8dc4a Don't start our writer thread until we know our socket is connected and ready
to send data.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:32:54 +00:00
Michael Bayne c62cf6ba6f Don't start our tick interval until we've successfully logged on. There's no
utility in sending pings before we're authenticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:30:35 +00:00
Andrzej Kapolka a0a235e32a Import Transport if used in invocation method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 20:38:08 +00:00
Michael Bayne c16731c8d1 Let's enforce that client reference copying with the structure of ObserverOps.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5541 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 19:09:42 +00:00
Jamie Doornbos 0f8c7d8f4c Get the trace for that pesky NPE in Client.Reader.receiveMessage
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5540 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 18:53:48 +00:00
Michael Bayne f4544ff76e Include current connection and handler count in our conmgr stats.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5539 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 18:47:58 +00:00
Jamie Doornbos 2014f8c906 Prevent calling observers with a null client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 18:43:29 +00:00
Michael Bayne a0cc2fd348 Nixed the notion of a ConnectionObserver. The only observer was the
ClientManager and it is already pretty tightly coupled to the ConnectionManager
so we weren't really fooling anyone with that ham-fisted attempt at
abstraction.

Also cleaned up more mid-shutdown behavior. If a session is unmapped after the
omgr exits, avoid generating a warning by trying to hop onto the omgr thread to
clean up after ourselves. We still do all the actual socket related closing so
that the party on the other end of the socket benefits from a clean shutdown
where possible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 01:52:29 +00:00
Michael Bayne 2c0ca57551 Nix startup listener since that was only being used to shut everything down if
we fail to bind to any of our desired ports. We'll just do that automatically
because no one wants a totally hapless server sitting around unable to actually
accept any connections.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 01:04:08 +00:00
Michael Bayne 641967564c A bit of tidying. Move the shutdown related methods below all the methods
dealing with normal operation.

Nixed getFlattener() in favor of createDatagramSequencer() so that the
ConnectionManager doesn't have to expose its guts quite so much.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:54:59 +00:00
Michael Bayne 22762a5aa9 Added a count of how many socket events we see (sockets reporting ACCEPTable or
READable), tidied up some other bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:31:31 +00:00
Tom Conkling 96ae821e58 ArrayUtil.removeFirstIf(), removeLastIf(), removeAllIf() predicate-based removal functions
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:22:26 +00:00
Michael Bayne 58123a4df1 Added ConMgrStats.closes. Added code to dump conmgr stats to the log every 30
seconds so that we can see more about what's going on if we manage to recreate
our freakoutery.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:21:15 +00:00
Michael Bayne 065e5918e7 Comment clarification. Only the PresentsInvoker coordinates with the
PresentsDObjectMgr to achieve a coordinated shutdown.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:14:48 +00:00
Michael Bayne f71613e3d6 We go to all the trouble of implementing ShutdownManager.Shutdowner, let's go
ahead and actually register ourselves with the ShutdownManager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:13:39 +00:00
Michael Bayne 64115155ec Shut down our flusher when we're cleaned up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 03:35:02 +00:00
Michael Bayne fd74fa955f Don't append a null if we're clearing out a local attribute that's not set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 03:21:12 +00:00
Michael Bayne 27f6675acf We're having issues with the ServerCommunicator. Let's roll back to the
blocking version while we investigate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 02:42:21 +00:00
Michael Bayne 9e1510c37d Some useful logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 02:34:19 +00:00
Andrzej Kapolka 3be495e23b Added a note indicating that only references to streamable
classes can be streamed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 02:17:20 +00:00
Andrzej Kapolka 28c7609df8 Allow streaming Class references.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 01:57:42 +00:00
Michael Bayne 4b9477ca91 RunQueue related updatery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5523 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-08 00:07:35 +00:00
Charlie Groves a5a8272900 Cancel the shutdowner at the end of didShutdown in case shutting down emptied the room and caused it to schedule.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 22:44:25 +00:00
Michael Bayne deb8d90e07 Fail fast on fuckup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5521 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 19:18:02 +00:00
Michael Bayne 4ab8689ea9 Allow additional identifying arguments to be passed to the PersistingUnit for
use when logging failure.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 19:12:45 +00:00
Michael Bayne 2187609696 Stop our tick interval in cleanup() rather than logoff(). Logoff is not always
initiated by the client, but we always want to stop our ticking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5519 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 18:46:36 +00:00
Jamie Doornbos aa44d90aab Fixed log warning for failed persistence. It was not logging the exception in the correct slot and was using the name of the unit in the message rather than in brackets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5518 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 18:40:14 +00:00
Michael Bayne 9a6e3e9fe9 Temporary fix for the local server timing out outgoing connections. I don't
think it should be needed but I need to do more testing, post-bling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 03:14:46 +00:00
Michael Bayne eeb87f0721 Some new-style logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5516 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:50:58 +00:00
Michael Bayne 93d36c045f Small tidying.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5515 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:44:21 +00:00
Michael Bayne 01ac320432 When a peer connects to us, turn around and immediately connect back to them.
Don't wait up to 60 seconds for the next peer refresh interval.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5514 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:33:23 +00:00
Michael Bayne 38e352443f Nixed more debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5513 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:27:12 +00:00
Michael Bayne c81f970590 Nixed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5512 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:26:59 +00:00
Michael Bayne c4909a5a5c We need to start our connect() process on the conmgr thread and we also need to
properly handle a connecting connection becoming idle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5511 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 01:21:02 +00:00
Michael Bayne 89f02fc728 Created ServerCommunicator which does all I/O using the ConnectionManager's
polled socket system. This much more cleanly and efficiently integrates peer
(and other server to server) connections into the normal server I/O framework
and should also eliminate for good the annoying server hangs that result when
our old blocking client I/O threads got their pants wedged.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5510 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-07 00:27:07 +00:00
Michael Bayne b81ccde75b ClientFactory -> SessionFactory, etc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5509 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-06 18:24:44 +00:00
Michael Bayne c69630b7e0 PresentsClient -> PresentsSession (Jamie's suggestion) and associated changes
on down the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-06 18:04:42 +00:00
Ray Greenwell a9f7175d2f Removed unused import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:13:08 +00:00
Ray Greenwell ff20abf27d Fixed parameter reading on Windows.
(We are parsing a URL, and even though it represents a file, it's still
a URL, so it uses the standard slash and not the microsoft slash.)
This will make SDK testing work on Windows.
We suck a lot for not fixing this sooner, but
- I didn't have Windows set up for development.
- It was broken for so long, we deprioritized and then sorta forgot about it.
This has been broken for over 5 months, when I last touched this file
to make it work on Macs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:11:49 +00:00
Par Winzell 1a467468ff Don't fill the array with zeroes when we reinitialize the Throttle with the same number of operations as we already had, as that allows a potentially dangerous burst of operations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 17:17:41 +00:00
Par Winzell bb670e14a8 When we reinitialize the Throttle with a smaller number of allowed operations within a time period, we should preserve the oldest rather than the newest ones, or we'll most likely be in immediate and unfair violation of the limit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 00:21:17 +00:00