Commit Graph

426 Commits

Author SHA1 Message Date
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
Jamie Doornbos f9238c8732 Dashes not allowed inside comments
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:58:37 +00:00
Jamie Doornbos c626095393 First stab at test code to run a thane bureau - not yet runnable
* New directory tests/src/as with port of java test client
* New build target "abclib" to create a library of the test classes specified 
  in etc/asc_files.txt
* New target to compile TestClientMain.as against testslib.abc and another to 
  run it.

(This proposes the naming convention of *Main.as for "main" thane code and 
main-*.abc for the compiled code)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:40:53 +00:00
Jamie Doornbos 61b1f23303 Narya.abc work - refactored GenServiceTask import mechanism in order to generate
clean action script files with no unnecessary imports
* New class ImportSet to facilitate the operations being performed manually
  throughout the code. Also removes the need for rawimports
* Threaded ImportSet through all places where imports and rawimports were used
  and removed magic parameters to control import generation
* Added an ImportSet instance to ServiceListener, this was key to the action 
  script fixes
* Moved all the import tweaking and munging logic into the generate* methods
  and made specific to code being generated (removed overreaching stuff
  from ServiceMethod, this was part of the problem)
* Removed blanket imports from tmpl files
* Removed unused methods
* Fixed tabs from last commit
* Quick and dirty script to check for unused imports


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:44:36 +00:00
Jamie Doornbos 3d65f679e8 Fixed I/O in BureauRegistry and removed synchronization
* Keep an Invoker member
* Added internal Launcher class to run ProcessBuilder.start on the invoker 
  thread because it is blocking
* Removed synchronized from methods, all ooo-servers are single threaded, 
  hurray!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 18:27:45 +00:00
Jamie Doornbos e74035a05c Bureaucracy smoke test and resulting bug fixes
* Added RegistryTester smoke test which randomly creates and destroys agents 
  in batches
* Fixed bug where correct agent id was never making it to client
* Implemented Bureau.toString (+refactored summarize method)
* Fixed nasty bug due to my assumption that SafeSubscriber =~ Subscriber, they 
  are in fact completely different


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 17:55:40 +00:00
Jamie Doornbos f41233c5ac Bureaucracy review updates and hello world test
* Fleshed out client-side Agent class, made abstract
* Delegate the creation of the bureau director to subclasses of BureauClient
* Moved BureauDirector's BureauReceiver and Subscriber implementations to 
  anonymous classes that delegate to protected methods.
* Use SafeSubscriber
* Added new service method for notiyfing the server when the creation of an
  agent fails so that the registry is not perpetually waiting
* Made BureauCredentials more conformant
* Made BureauRegistry respond properly to client logging off
* Got rid of superfluous uses of safeToString
* Changed Launcher to CommandGenerator and now use ProcessBuilder and 
  copyMergedOutput
* Changed bureau process parameters to server name and port instead of URL


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 18:34:51 +00:00
Jamie Doornbos 5d02ac7306 Fix runjava which was out of date.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5024 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-25 00:20:44 +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