Dave Hoover
e13aca6570
Prune trailing whitespace & foreachize loops.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5799 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-23 01:56:35 +00:00
Dave Hoover
b222eed2fd
A healthy dash of google-collections
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5798 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-23 01:04:08 +00:00
Andrzej Kapolka
1bdb2cae16
Added methods and @Intern annotation to stream pooled strings (a
...
la String.intern) as we do class names, by sending the value the
first time and a short code thereafter (with special handling for
datagrams, where me must continue sending the mapping until we
know they've been received). This is mostly useful for the
lengthy config names and parameter names of Project X, but it
could conceivably also be used for things like NamedEvents, which
stream the same object field names many times in the course of a
stream.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5797 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-22 22:43:19 +00:00
Andrzej Kapolka
e5172053c8
The utility of printing out the message as a byte array seems
...
limited.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5796 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-21 23:47:47 +00:00
Andrzej Kapolka
13251b0d79
Accessor for datagram transmission flag.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5795 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-21 23:36:18 +00:00
Andrzej Kapolka
31e9807c05
Note the actual transport with which events are transmitted.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5794 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-21 18:41:42 +00:00
Andrzej Kapolka
d45b0bdb00
Added an option to bind the datagram socket to a specific
...
hostname, in hopes of fixing the issue with receiving datagrams
from the staging server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5793 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-21 18:04:09 +00:00
Andrzej Kapolka
6dd16483be
Added an extra step to the datagram negotation process. Before
...
the server starts sending datagrams willy-nilly, it must wait for
a (reliable) go-ahead from the client. Otherwise, it's possible
that the server may be successfully receiving datagrams but not
sending them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5792 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-21 04:16:41 +00:00
Dave Hoover
0f70a5c8d2
Much like NamedSetAdapter, we had this kicking around in yohoho, also.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5791 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-19 19:29:29 +00:00
Michael Bayne
a6c43b3436
Enough of this verbosity.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5789 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-19 05:16:34 +00:00
Charlie Groves
c6dd5ba201
Add imports for generic types in method arguments
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5785 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-13 08:40:28 +00:00
Dave Hoover
e740f387cc
Some widening/foreaching I had lying around.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5780 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 23:25:07 +00:00
Dave Hoover
cd07e3a9ee
This puppy's been in yohoho for a while, but seems like it would be generally useful in narya land.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5776 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 21:21:02 +00:00
Dave Hoover
239fec3236
SimpleEntry's a big boy now.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5773 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-11 20:23:19 +00:00
Dave Hoover
7d3f8a2c06
Gonna need that now that I'm actually throwing some of these across the net.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5772 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-09 00:09:00 +00:00
Dave Hoover
15ca8973bc
KeyWrapper is pretty handy when you really just want a DSet stuffed
...
full of some pre-existing Streamable/Comparable type (e.g. String),
so let's buff it up to let us do that cleanly, and publicize it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5771 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-08 18:57:58 +00:00
Andrzej Kapolka
8e2a05864a
Bring this maximum back down. I had thought that oversized
...
datagrams were fragmented and reassembled at the network layer,
but apparently that's not something one can count on.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5770 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-07 02:22:25 +00:00
Michael Bayne
6c962bf3d4
Reflection is much faster these days, but we do a lot of event processing, so
...
let's not surreptitiously slow things down.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5768 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-04 17:50:44 +00:00
Michael Bayne
6eb8953c4b
Allow flush time to be customized.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5765 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-01 20:36:11 +00:00
Michael Bayne
a66c27a169
Track various peer stats.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5760 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 22:10:31 +00:00
Michael Bayne
2a4ac9b96a
These don't need to be final.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5759 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 21:59:40 +00:00
Michael Bayne
17688e9ff5
Updated comment to reflect reality.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5758 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 21:59:28 +00:00
Michael Bayne
e77949a143
Cleaned up stats tracking in PresentsDObjectMgr and ReportingInvoker. At some
...
point Pulse can probably totally replace the ReportManager at which time a
bunch of cruft can go away.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5757 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-29 19:05:04 +00:00
Andrzej Kapolka
abc0bb9eb3
UDP fixes: we can only stop transmitting the mappings sent in the
...
acknowledged datagram (not the ones before it, which may or may
not have been received). Also, make sure we don't throw an
ArrayIndexOutOfBounds exception when retrieving a bogus class
mapping (so that we show the correct error logging information).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5751 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 23:28:16 +00:00
Michael Bayne
73dd5beda4
Same here even though we were doing long arithmetic which would most likely
...
avoid blowage.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5750 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:18:50 +00:00
Michael Bayne
7e777e9c72
Divide the millis by 1000 to get seconds instead of multiplying the numerator
...
and blowing an int.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:17:36 +00:00
Michael Bayne
da4159c665
Switch to the ServerCommunicator. I'm sure it'll work just fine!
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5748 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:51:06 +00:00
Michael Bayne
a2d6549121
Comment fix.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5747 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:48:00 +00:00
Charlie Groves
749ab8e1bb
google-collect upgrade
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5745 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 23:01:40 +00:00
Michael Bayne
510ddbb717
Instated some debug logging. Some day maybe I'll make it easy to enable debug
...
logging in a fine-grained way in a running server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5744 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 19:03:17 +00:00
Michael Bayne
6fe7159b4c
Provide an Iterable for our client objects.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5743 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 17:01:38 +00:00
Mike Thomas
48b3a27af8
Prevent a divide by zero error attempting to generate a log.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5736 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:12:27 +00:00
Michael Bayne
916cb30339
Clear out our _bstrap reference when we logoff. What's good for the
...
ActionScript goose is good for the Java gander.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5735 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-18 00:07:54 +00:00
Jamie Doornbos
e76d1a6610
Interesting... if the peer disconnects before the node object subscription completes, an NPE would fire... but could this have prevented a lock from being release. It doesn't seem likely since a lock probably can't be assigned until the subscription is complete anyway(?). But then again, maybe some information is passed prior to this. In any case, stop throwing an NPE here.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 17:12:15 +00:00
Ray Greenwell
d1d6aa50d9
Unburden init() from things that can be injected.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5715 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-11 01:21:19 +00:00
Ray Greenwell
24760fa266
Create our PeerNode object through injection.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5714 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-11 01:12:16 +00:00
Ray Greenwell
18d36176a3
The PeerNode is the thing that calls clientLoggedOn/Off on the PeerManager,
...
so let's keep with that pattern for any clients there when the
peer itself connects or disconnects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5713 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-10 22:25:35 +00:00
Michael Bayne
ca8904b9db
Let's actually name that something different.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:19:25 +00:00
Michael Bayne
3b1024651a
Split our reports into the default report and a separate report for the giant
...
morass of profiling data.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5709 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:13:59 +00:00
Mike Thomas
5ba9ea1faa
Fix a big ol' memory leak. This remove() call appears to have accidentally gotten commented out in a warnings-cleanup pass because it used to assign the result of the remove to a variable only used in a commented-out Log.info(). Since the receivers stored in the hashtable can point to exciting things, like, say, puzzle panels, it was causing a pretty immense amount of stuff to get held onto.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5700 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 23:26:26 +00:00
Michael Bayne
88bec3d641
Prunexorz!
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5698 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 00:43:50 +00:00
Michael Bayne
688f2580ed
Varargified log calls.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5697 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 00:02:19 +00:00
Ray Greenwell
647a25dfdc
Even better: have the base PeerManager call clientLoggedOn and clientLoggedOff
...
for every client on another node when it connects or disconnects from that node.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5696 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 23:10:02 +00:00
Charlie Groves
0da49cb6ab
Uhh, might want to handle PresentsSession.getInetAddress returning null for disconnected clients
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5687 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-18 20:14:15 +00:00
Michael Bayne
dec9e7ee70
Execute clearClientInfo() in a transaction on NodeObject so that when derived
...
classes naturally remove extra crap from the NodeObject as a result of the
client departing this node, it all goes out in a single event. Cross-server
traffic-- go!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5684 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-11 19:27:33 +00:00
Michael Bayne
4a7cb2c82f
Rethink! Instead of hacking up the peer ClientInfo system for the one thing
...
that actually needs to look clients up by visible name (chat forwarding), we'll
just leave things as is (as in mapped by auth username) and take care of our
own shit in ClientPeerManager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5683 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-11 17:47:35 +00:00
Charlie Groves
8f05b41c6a
Add getSessionsForAddress to return all the active sessions for a given IP address.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5682 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-06 21:29:01 +00:00
Dave Hoover
7cd3f69ff6
Speeling
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5678 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-04 21:33:49 +00:00
Andrzej Kapolka
028b53df68
If a message is too big to be sent as a datagram, fall back to
...
sending it on the stream. However, also increase the maximum
datagram size.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5670 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-24 22:58:22 +00:00
Dave Hoover
41003c6059
Widen/remove unused variable
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5663 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-23 21:53:18 +00:00