Commit Graph

111 Commits

Author SHA1 Message Date
Dave Hoover 9b1624ced6 Whitespace
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6081 542714f4-19e9-0310-aa3c-eee0fc999fb1
2010-06-15 17:26:27 +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
Andrzej Kapolka 00569e651f Added a system for tracking the messages sent to and received from the
server for the purpose of statistics tracking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5948 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-09-11 00:19:10 +00:00
Michael Bayne 6e9077780c Added/updated source headers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5829 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-06-20 21:09:34 +00:00
Andrzej Kapolka eb77929940 As on the server, provide a means to detect whether we can
transmit datagrams.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5801 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-26 20:10:46 +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 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 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
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
Jamie Doornbos eaa270be35 Stop java clients from queueing up ticks after logoff. This was sometimes causing a warning during shutdown.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5614 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-04 06:09:36 +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 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
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
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 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 2e8b63435a Thinking about it more, what we really want is for the client to target the per
second rate (10 messages per second), and to do the same 10x buffer on the
server that we were doing before so that we avoid disconnects due to network
congestion (which might "save up" some throttled messages and then end up
delivering them in a bunch with some later messages).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5424 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-08 20:13:30 +00:00
Michael Bayne 234b00df27 That's initialized in the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-08 19:39:35 +00:00
Michael Bayne 9c65e203b5 Client side message throttling. The server is configured with a hard limit, it
communicates that limit to the client which queues outgoing messages so that it
does not exceed the limit. When the throttle is changed, the server does not
apply the new throttle until the client has ACKed it to avoid edge cases where
the client is up against the limit when the throttle changes.

ActionScript side of all of this forthcoming as well as more testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5422 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-08 19:38:00 +00:00
Dave Hoover 8856120403 Import cleanups
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-26 17:29:59 +00:00
Dave Hoover 7ee6ace683 Javadoc warnings cleanups.
Note: this involves generated code from a samskivert patch I only just sent to mdb,
but he's in a meeting, so that won't show up for a little.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 17:59:26 +00:00
Charlie Groves 80ca1dbc64 Fix broken javadoc links and params to kill my Eclipse warnings. This includes
importing receivers from their senders to satisfy their links.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-21 01:46:51 +00:00
Jamie Doornbos 495e29fa05 Actually append the creds. Why was I not surprised by creds=] when I tested this?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-20 04:52:08 +00:00
Dave Hoover df2e316330 Pedanticism police.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 23:19:25 +00:00
Jamie Doornbos 172349abb3 Give a little bit of information about Client instances when one is logged. This is for the bureau
launcher which manages a lot of clients, but seems generally useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-14 20:53:35 +00:00
Michael Bayne 3385e9ba4a It's not entirely obvious how we should respond to multiple calls to logoff()
fired in such rapid succession that we have not completed processing the first
call before the next one comes in. We could do the cumbersome thing and keep
track of an _isLoggingOff state but that is so inelegant that I can't bear to
do it. I'd rather just cope in the Presents code and put the onus on the caller
not to do wacky things like this.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-07 16:52:19 +00:00
Michael Bayne 725f656197 Fixed a bunch of type safety bits pointed out by the latest version of Eclipse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5274 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 12:58:51 +00:00
Dave Hoover 6b1d65553f And finally, narya gets the imports/overrides/regen love.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5241 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-18 23:20:17 +00:00
Andrzej Kapolka ac3640dc9d Standalone clients don't have communicators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5129 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-23 21:00:08 +00:00
Andrzej Kapolka 9bafa5e7c8 Basic support for datagram messaging. Hope I haven't fucked
anything up!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5090 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-13 21:12:39 +00:00
Charlie Groves b65487f318 Cut the number of times a service class needs to be specified to two
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4993 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-10 01:18:32 +00:00
Dave Hoover 2ce35db583 Remove unneeded casts.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4923 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-17 01:25:52 +00:00
Michael Bayne 5ae87258fa If we lose our connection, let anyone who had a pending subscription request
outstanding know that their subscription request failed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4873 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-13 02:56:35 +00:00
Michael Bayne ab632ffe83 Refactored communicator so that we can not do some things in the peer client
(which runs on the server) that we do in a normal client (which runs on a
user's computer). Eventually we'll make a custom Communicator for use on the
server that integrates with the ConnectionManager's polled socket I/O which
will be easier now that this bit of factoring has been done.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4835 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-01 23:44:31 +00:00
Michael Bayne 6904c467bf Identify ourselves if we turn out to be a long dobj unit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4830 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 17:23:02 +00:00
Michael Bayne c0ead54dbe Dispatch our client tick on the RunQueue so that it doesn't end up running on a
separate thread and racing against other client actions. Also nixed a pointless
type check and cast.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4828 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-19 03:35:17 +00:00
Michael Bayne 77e3f22d90 Added moveToServer() which does pretty much what it says. Boy I love writing
everything in two languages. Especially when one doesn't support inner classes
and has non-C syntax just to make life easier for parser writers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4762 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-07-13 21:57:55 +00:00
Michael Bayne 2fead8208c Let's not confuse terminology between one server proxying for another server
and the ProxySubscriber mechanism by which the server proxies for the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-13 22:41:41 +00:00
Michael Bayne c365afa2fc Rejiggered the way things are handled when using a Client to proxy events from
another server. The PeerManager needs both to rewrite the oid of the events
before dispatching them and to assign an eventId to them so that they will not
be filtered by PresentsClient when deciding whether or not to send them along
to its client. Also fixed compound event dispatch in the process. Now proxy
subscribers will be notified once of a compound event rather than of each
individual internal event.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-13 22:37:53 +00:00
Elizabeth Fong 3c7a546472 rollback r4636 due to interference with non-yohoho projects
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4637 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-27 21:49:25 +00:00
Elizabeth Fong f76825c76e Fix yohoho singleplayer NPE boochery caused by unsafe direct call on DObjectManager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4636 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-03-27 21:11:13 +00:00
Michael Bayne 09f0bee0f3 Yet more header patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4602 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-24 00:39:27 +00:00
Michael Bayne de633c61b5 Standalone mode logon needs to be done less hackily now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4572 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-13 00:20:02 +00:00
Michael Bayne a617b9322e We need to run willLogon() immediately, also modified BasicDirector and Client
to fail if a director tries to register services groups but was not created
until after the client was logged on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 20:37:28 +00:00
Michael Bayne b7e16c86f5 Added getBootGroups() to Client, made use of it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4555 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 03:08:04 +00:00
Michael Bayne c2dbae4809 We'll actually need to call clientWillLogon()...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4554 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 01:50:11 +00:00
Michael Bayne ebc99935d5 If we're going to do this, I guess we're going to do it properly. Nixed the
notion of a global group (though we implicitly define one in InvocationCodes)
added a mechanism for directors (which generally handle the client side of
invocation services) to register their interest in bootstrap service groups so
that the whole goddamned complex business can happen magically behind the
scenes.

If you instantiate a director, it will automatically register interest in the
service group it needs and everything will work. If you don't use the director
code, you don't get the services and you can safely exclude all of that code
from your client even though the services are still in use on the server (and
presumably used by some other types of clients).

This is going to break all the builds, which I'll soon fix. Then I'll go write
all this in ActionScript. Yay!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4552 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 01:17:30 +00:00
Michael Bayne 9afcc526a0 Bit the bullet and implemented invocation service groups so that our various
MetaSOY clients (Swiftly, World, and soon Admin Dashboard) don't have to know
about a bunch of unrelated crap. Fricking complexity++, grumble.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-02-11 00:42:35 +00:00
Michael Bayne 4894d1cfde Annoyingly, ClientObserver.clientDidLogoff() is called before the client's
inner bits are all clear and ready to try logging on to a new server. We
specifically wait to call clientLogonFailed() until after everything is
cleared, but I don't want to change the behavior of clientDidLogoff() for fear
that any one of the zillion directors depends on something being around during
that call.

Instead I added another callback clientDidClear() that is called when a
successful session is fulled cleared out (basically when we're not calling
clientLogonFailed()) so that entities that are waiting for a logoff to finish
so that they can logon somewhere else have a clean way of doing so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4255 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-07 04:02:42 +00:00
Michael Bayne 33a758dfce The basis of cluster support for Presents servers. All servers in a cluster
make connections to other servers in the cluster and can exchange events (in a
limited fashion).

This is different than Liz's project wherein servers share an oid space and one
can interchangably work with distributed objects from any server. This package
provides a means by which certain services (by default, presence and chat) can
be communicated between servers to allow communication between players
scattered around a bunch of otherwise independent server instances.

This is less general purpose but also less likely to encourage people to write
code that tightly couples multiple servers and then falls over because it
generates gobs of network traffic as events are flung willy nilly behind the
scenes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4238 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-07-01 00:19:59 +00:00