Commit Graph

434 Commits

Author SHA1 Message Date
Michael Bayne 9d93ea7a90 Nixed our ATUnit dependency which wasn't working. Better that we just do the
Guicing we need ourselves.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5884 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-07-21 00:29:37 +00:00
Michael Bayne a1aa2d77ae Revamping/cleanup of how we handle authentication usernames as well as chained
authenticators and chained session factories. We can share a lot more code this
way and the implicit requirement that the default authenticator/factory had to
be configured before anyone else configured a chanied author/factory is gone.

The other big change is that Credentials doesn't require a username
(UsernamePasswordCreds inherits that username so most derived classes don't
notice any difference). Instead we require that a canonical authentication
username be determined and configured in AuthingConnection during the
authentication process. This canonical username is then used to resolve the
client session and map everything in the client manager.

This is pretty much exactly what was going on before except that we were doing
it all in an ad hoc way by jamming a new name into Credentials during the
authentication process and also doing jiggery pokery in
PresentsSession.assignStartingUsername. That all goes away and/or becomes
cleaner and more explicit.

This is going to impact some Yohoho jiggery pokery, which I will shortly commit
a patch for, but we're going to need to test it. Omelets, eggs, etc.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5828 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-06-20 00:56:01 +00:00
Dave Hoover 201e0d0cd6 Random cleanup I had kicking around
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5818 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-06-09 05:52:53 +00:00
Jamie Doornbos 3fe286e3c5 Fixed unchecked cast warning
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5774 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-05-12 00:47:48 +00:00
Michael Bayne 34fd5fda85 Test our streamable tuple changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5558 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-18 21:15:32 +00:00
Michael Bayne 1a6e705f81 Made "ant tests" compile and run the tests not just compile them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-18 21:14:56 +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
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
Michael Bayne c544146c45 Brevity is going to be our friend here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5473 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-28 17:53:40 +00:00
Michael Bayne 7c52427d83 Added local attributes to DObject. These are objects that are stored only on
the local JVM (in general we'll use them on the server). The idea is to get rid
of all of our messy transients in BodyObject on down (and possibly other
places) and encapsulate them in a nice ClientLocal object (extended to
BodyLocal and on down).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5472 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-28 17:46:27 +00:00
Michael Bayne 1b7e182b18 Make some assertions.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5471 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-28 17:44:39 +00:00
Michael Bayne 9cf79c22b3 Simulate a client that remains up against its message limit for well beyond the
10x buffer provided by the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5458 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-24 20:43:01 +00:00
Michael Bayne 92f79dad34 Use varargs logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5451 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-21 01:52:05 +00:00
Michael Bayne ae6e3e883a Test throttle changing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5433 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-10 22:43:55 +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 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
Michael Bayne d68aaec196 Run the right client and server tests.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5420 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-08 18:26:03 +00:00
Dave Hoover f05b9eb9ae Javadoc fixes plus svn keywords.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-01 17:35:59 +00:00
Jamie Doornbos f4111247d7 Make the bureau registry's client factory optional, must now be explicitly invoked using a new method
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-30 23:21:04 +00:00
Dave Hoover 657aafaedb And of course, if I were thinking this morning, I would've rerun the organize imports
thing before committing instead of just going "oh yeah, I've been having this stuff
sitting around uncommitted for a while waiting on it to be blessed" and missing
out on things that'd changed in the meantime.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5400 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-26 17:35:29 +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
Jamie Doornbos d6fbde6e0d Forgot header and props for added files
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 23:47:24 +00:00
Jamie Doornbos 4a03b20b1f Extension of the samskivert throttle class to allow updating the operation limit, plus a small manual test class
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-12 23:26:58 +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
Bruno Garcia c49f655e7b Suffix handling unit test... it passes so it must be bug free!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5324 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-15 21:50:22 +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 8a8b615f9d Clean up some warnings I'm getting in super-pedantic mode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-28 17:23:07 +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
Jamie Doornbos 45f0f9d8b7 Updated smoke test to kill some bureaus
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5239 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-18 00:09:38 +00:00
Jamie Doornbos 8ce8e69b59 Changed BureauRegistry to use Launcher and updated bureau tests
* Moved the thane-specific TestClientMain out into src/thane and renamed 
  BureauTestClient
* Removed server name and port from the registry init and from the Launcher/
  CommandGenerator parameters. These can be inserted by the caller
* Converted all the asc junk to compc/mxmlc the same as msoy does it
* Moved the test client main function into src/as land
* Added extdeps.suffix alternative approach since tests/build.xml does not
  get launched from nifty ooo-libs container
* Fixed bureau test targets
* Moved avmthane to overridable property and corrected out of date default
* Converted BureauRegistry code to deal with Launcher objects and added shim
  to preserve use of CommandGenerator
* Fixed narya build to remove thane-config.xml after building aslib


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-02 23:44:11 +00:00
Michael Bayne c2d22b1e24 Use injected dependencies, regened services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5206 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:43:34 +00:00
Jamie Doornbos 868737265b We don't need these file lists and groups anymore
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5187 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-14 00:25:05 +00:00
Michael Bayne 0128f6525a Modify PresentsClient and ClientResolver creation so that we can inject
dependencies into both. Moved the legacy statics into CrowdServer so that at
least Presents can be pure (we should probably eventually move them into
BangServer and PiracyServer and fix everything else). Added some useful manager
references to PlaceManager delegate (_omgr, _invmgr) that handle the majority
of their service needs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5170 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 20:23:49 +00:00
Michael Bayne bf77cb1520 Moved location services implementation into LocationManager so that
LocationProvider can be an interface like its brothers and sisters.

Modified the place registry to create PlaceManager instances using the injector
so that we can inject dependencies into managers. Also modified the custom
classloader functionality so that it can/will circumvent this process
entirely. It's not possible to inject using a custom classloader and one
certainly would not want to do so.

Unfortunately this means we can't inject some basic managers into PlaceManager
because it needs to work for games loaded into a sandboxed classloader, but the
big win is that in everything other than GameManager and PlaceManager, we can
inject to our heart's content.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 17:18:26 +00:00
Michael Bayne a6842ae5e1 Properly mark some singletons as such.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5156 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 19:14:10 +00:00
Michael Bayne 3aefc93838 Holy fruity beverage Batman! I'm taking the plunge and switching to Guice for
dependency resolution and management. Things are currently in a state of
transition, but the important patterns have been established and I'll aim to
sweep through all of Narya, Nenya and Vilya in the near future and do
everything properly.

Going through the other million-odd lines of code we have scattered across our
various projects that use these libraries is not something I plan to do, so
we'll be maintaining backward compatibility with the old static member method,
though I hope to strive toward eradication of that usage entirely in MSOY while
we still have a fighting chance.

Given that some of our projects will continue to use the static member method
in perpetuity, I'm not going to @Deprecate those fields because that would fill
their logs with so much spam that they'd have to turn off deprecation warnings
which would make life worse for them. So instead we'll settle for the big scary
comment warning people away from the old bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5153 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 17:44:48 +00:00
Jamie Doornbos 7ac8aa5583 More jiggering pokering workarounds for crapness of asc (files built with AscLibTask cannot be used to execute a VM, only to build a VM)... confusing, I know... ask Zell
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5142 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-30 01:10:29 +00:00
Jamie Doornbos 257c942745 Updates narya bureau test to use AscLibTask and AscTask
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5135 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-27 22:27:31 +00:00
Michael Bayne 919112cf88 Switch to new samskivert logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-27 19:25:38 +00:00
Jamie Doornbos 3940a13e32 Preparing narya abc for mavenification: renamed naryalib.abc to narya-abc.abc so artifactId does not conflict. Also fixed narya-dist to include bureau classes and swapped in new hard-wired avmthane for test client target.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5114 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-21 23:39:35 +00:00
Jamie Doornbos 15127aa5df Improvements to my test log parser that were just lying aroudn
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5113 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-21 23:36:18 +00:00
Par Winzell 5f32756b0a Use the new asc.jar here too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5094 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-15 16:57:22 +00:00
Jamie Doornbos fd49818c3c quick and dirty script to help evaluate problems with thane client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5084 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-12 23:32:14 +00:00
Jamie Doornbos d63fd40f74 Narya test targets (bureau fixes)
* Fixed misspelled "port" parameter
* Added check targets to prevent overwrite of executing file
* Tuned test parameters to try to capture logon failure


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5083 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-12 23:29:39 +00:00
Jamie Doornbos c2a7e52626 Updated the testslib target to use Main compiler, added the actual test client code, implemented the target to run the thane test client, tweaked the tester options to run thane and go nice and slow (one operation every 3 seconds and only one instance)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5074 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:57:22 +00:00
Jamie Doornbos d502e33c7f Added new paramter for registry tester to be able to override the ant target used to launch a bureau
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5073 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:51:57 +00:00
Par Winzell bf3a5599f2 I removed print(), use trace() instead.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:57:50 +00:00
Par Winzell 993ae240b3 ScriptCompiler croaks and dies on this, let's try Main. I think we're going to end up writing our own frontend for this compiler, these are all so broken. Witness the bizarre need to move the target file at the end here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5064 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:57:05 +00:00