Commit Graph

  • 74bccd4223 Clean up occupant info creation and whatnot. Now we have a nice calldown method bodyWillEnter() where the PlaceManager can do whatever they want when the body enters, before or after the occupant info creation process. Michael Bayne 2008-12-05 22:01:25 +00:00
  • c793aff440 Unused import nixage. Michael Bayne 2008-12-05 03:08:57 +00:00
  • 12da80af98 Fix NameUpdater name. Michael Bayne 2008-12-05 01:39:12 +00:00
  • 6ece773295 NameUpdater not NameUpdate. Michael Bayne 2008-12-05 01:38:40 +00:00
  • 0942566fc3 Added a handy update for changing an occupant's name. Michael Bayne 2008-12-05 01:31:30 +00:00
  • c116f93a7b Fiddlesticks. Let's unify these update methods and do away entirely with the old dangerous way of updating. We will now use only the timeless way. Michael Bayne 2008-12-05 00:51:37 +00:00
  • 62f393db95 Hold the phone. I already wrote this code. Sheesh. Michael Bayne 2008-12-04 23:29:42 +00:00
  • 420333df51 Made it easier to update occupant info the correct way in hopes of discouraging people from updating it the wrong way. Michael Bayne 2008-12-04 23:28:50 +00:00
  • 46a5bbd0cc Don't cache our nodes query. We always want the latest and the freshest. Michael Bayne 2008-12-02 21:58:50 +00:00
  • 34ae8910d7 Widen & break one thing out so I can avoid copy & paste when I format a very similar message in the yohoho reboot manager. Dave Hoover 2008-11-27 00:30:48 +00:00
  • 14307d7292 Break out communicator creation into an overridable method temporarily. Michael Bayne 2008-11-26 23:57:17 +00:00
  • adf11c5381 Fixed index out of bounds exception. This was causing msoy aux reporters to never complete if the report type was not registered on the game server (e.g. servlet ony) Jamie Doornbos 2008-11-24 23:01:16 +00:00
  • a5b8aad082 Prevent a divide by zero that we're seeing occasionally on startup. Mike Thomas 2008-11-21 00:22:51 +00:00
  • e649880f90 Allow a message to be passed to happy testing dumpStack() Ray Greenwell 2008-11-20 19:48:47 +00:00
  • 7b9c0501a6 Added no-args generateReport() to generate default report. There is a registerReporter() that doesn't take a type, so this seemed like the way to go, rather than changing msoy to pass in DEFAULT_TYPE. Ray Greenwell 2008-11-19 21:15:39 +00:00
  • 457c8a59d6 Allow reporters to be registered for different report types and the type to be specified at report generation time. Michael Bayne 2008-11-19 19:53:46 +00:00
  • 9a67119557 Added type to generateReport(). Michael Bayne 2008-11-19 19:43:36 +00:00
  • 13c9f01b6e Go go invisible unicode characters. Par Winzell 2008-11-19 17:24:01 +00:00
  • 5d769cbf5f So, Flash CS4's internal compiler chokes on public class that implements an interface, when it's followed by faux-inner-classes after the main package declaration. This is the only workaround I can think of; pray god Adobe fixes their stuff soon and we can revert this irritating patch. Par Winzell 2008-11-19 15:14:29 +00:00
  • 8c1faeb2a3 Robustification of bureau launching * Track the exception that occurred, if any, when launching the bureau in each agent * Guarantee agent object is always destroyed. This was probably also a memory leak. * Destroy the agent object immediately if the launcher raised an exception rather than waiting for timeout Jamie Doornbos 2008-11-19 00:42:46 +00:00
  • 034284e103 Tuple.create -> Tuple.newTuple. Michael Bayne 2008-11-18 21:15:43 +00:00
  • 34fd5fda85 Test our streamable tuple changes. Michael Bayne 2008-11-18 21:15:32 +00:00
  • 1a6e705f81 Made "ant tests" compile and run the tests not just compile them. Michael Bayne 2008-11-18 21:14:56 +00:00
  • 792a5142cd Fortunately, Narya can magically set final fields behind the scenes, but we need to first construct an instance with nulls. Also added newTuple(). Opted not to make newStreamableTuple() as that would make more sense in a Tuples class, but this method can only be accessed by calling StreamableTuple.newTuple which seems to me to already tell the whole story. Michael Bayne 2008-11-18 21:13:45 +00:00
  • d14937991a Allow those using message bundles to get all the keys that start with a particular prefix, just like they can get all the translations that match a prefix. Mike Thomas 2008-11-18 19:25:19 +00:00
  • 201ab6adc7 Turn off the debug report for now. Michael Bayne 2008-11-17 20:36:26 +00:00
  • 37c14fe414 Depot now exports google-collect.jar for us. Michael Bayne 2008-11-17 18:47:59 +00:00
  • 0de7d59bdb Have narya depend on depot which depends on samskivert. Michael Bayne 2008-11-17 18:46:23 +00:00
  • d76d1678cf Find Depot in its new home. Michael Bayne 2008-11-16 07:46:11 +00:00
  • 40e9394817 Fix use of raw type. Michael Bayne 2008-11-14 03:12:33 +00:00
  • 79f5a17600 Oops, stray debug line got left in Jamie Doornbos 2008-11-14 01:51:28 +00:00
  • 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 Jamie Doornbos 2008-11-14 01:49:58 +00:00
  • e1afaccd23 Cleanup some unused stuff & mark some overrides. Dave Hoover 2008-11-12 18:46:06 +00:00
  • 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. Michael Bayne 2008-11-12 00:55:05 +00:00
  • 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. Michael Bayne 2008-11-12 00:54:37 +00:00
  • ca2dc8dc4a Don't start our writer thread until we know our socket is connected and ready to send data. Michael Bayne 2008-11-12 00:32:54 +00:00
  • c62cf6ba6f Don't start our tick interval until we've successfully logged on. There's no utility in sending pings before we're authenticated. Michael Bayne 2008-11-12 00:30:35 +00:00
  • a0a235e32a Import Transport if used in invocation method. Andrzej Kapolka 2008-11-11 20:38:08 +00:00
  • c16731c8d1 Let's enforce that client reference copying with the structure of ObserverOps. Michael Bayne 2008-11-11 19:09:42 +00:00
  • 0f8c7d8f4c Get the trace for that pesky NPE in Client.Reader.receiveMessage Jamie Doornbos 2008-11-11 18:53:48 +00:00
  • f4544ff76e Include current connection and handler count in our conmgr stats. Michael Bayne 2008-11-11 18:47:58 +00:00
  • 2014f8c906 Prevent calling observers with a null client Jamie Doornbos 2008-11-11 18:43:29 +00:00
  • 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. Michael Bayne 2008-11-11 01:52:29 +00:00
  • 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. Michael Bayne 2008-11-11 01:04:08 +00:00
  • 641967564c A bit of tidying. Move the shutdown related methods below all the methods dealing with normal operation. Michael Bayne 2008-11-11 00:54:59 +00:00
  • 22762a5aa9 Added a count of how many socket events we see (sockets reporting ACCEPTable or READable), tidied up some other bits. Michael Bayne 2008-11-11 00:31:31 +00:00
  • 96ae821e58 ArrayUtil.removeFirstIf(), removeLastIf(), removeAllIf() predicate-based removal functions Tom Conkling 2008-11-11 00:22:26 +00:00
  • 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. Michael Bayne 2008-11-11 00:21:15 +00:00
  • 065e5918e7 Comment clarification. Only the PresentsInvoker coordinates with the PresentsDObjectMgr to achieve a coordinated shutdown. Michael Bayne 2008-11-11 00:14:48 +00:00
  • f71613e3d6 We go to all the trouble of implementing ShutdownManager.Shutdowner, let's go ahead and actually register ourselves with the ShutdownManager. Michael Bayne 2008-11-11 00:13:39 +00:00
  • 64115155ec Shut down our flusher when we're cleaned up. Michael Bayne 2008-11-08 03:35:02 +00:00
  • fd74fa955f Don't append a null if we're clearing out a local attribute that's not set. Michael Bayne 2008-11-08 03:21:12 +00:00
  • 27f6675acf We're having issues with the ServerCommunicator. Let's roll back to the blocking version while we investigate. Michael Bayne 2008-11-08 02:42:21 +00:00
  • 9e1510c37d Some useful logging. Michael Bayne 2008-11-08 02:34:19 +00:00
  • 3be495e23b Added a note indicating that only references to streamable classes can be streamed. Andrzej Kapolka 2008-11-08 02:17:20 +00:00
  • 28c7609df8 Allow streaming Class references. Andrzej Kapolka 2008-11-08 01:57:42 +00:00
  • 4b9477ca91 RunQueue related updatery. Michael Bayne 2008-11-08 00:07:35 +00:00
  • a5a8272900 Cancel the shutdowner at the end of didShutdown in case shutting down emptied the room and caused it to schedule. Charlie Groves 2008-11-07 22:44:25 +00:00
  • deb8d90e07 Fail fast on fuckup. Michael Bayne 2008-11-07 19:18:02 +00:00
  • 4ab8689ea9 Allow additional identifying arguments to be passed to the PersistingUnit for use when logging failure. Michael Bayne 2008-11-07 19:12:45 +00:00
  • 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. Michael Bayne 2008-11-07 18:46:36 +00:00
  • 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. Jamie Doornbos 2008-11-07 18:40:14 +00:00
  • 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. Michael Bayne 2008-11-07 03:14:46 +00:00
  • eeb87f0721 Some new-style logging. Michael Bayne 2008-11-07 01:50:58 +00:00
  • 93d36c045f Small tidying. Michael Bayne 2008-11-07 01:44:21 +00:00
  • 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. Michael Bayne 2008-11-07 01:33:23 +00:00
  • 38e352443f Nixed more debug logging. Michael Bayne 2008-11-07 01:27:12 +00:00
  • c81f970590 Nixed debug logging. Michael Bayne 2008-11-07 01:26:59 +00:00
  • c4909a5a5c We need to start our connect() process on the conmgr thread and we also need to properly handle a connecting connection becoming idle. Michael Bayne 2008-11-07 01:21:02 +00:00
  • 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. Michael Bayne 2008-11-07 00:27:07 +00:00
  • b81ccde75b ClientFactory -> SessionFactory, etc. Michael Bayne 2008-11-06 18:24:44 +00:00
  • c69630b7e0 PresentsClient -> PresentsSession (Jamie's suggestion) and associated changes on down the client. Michael Bayne 2008-11-06 18:04:42 +00:00
  • a9f7175d2f Removed unused import. Ray Greenwell 2008-11-05 23:13:08 +00:00
  • 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. Ray Greenwell 2008-11-05 23:11:49 +00:00
  • 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. Par Winzell 2008-11-05 17:17:41 +00:00
  • 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. Par Winzell 2008-11-05 00:21:17 +00:00
  • 2a6940363d Rollback r5502. Ray Greenwell 2008-11-04 21:42:18 +00:00
  • b9245e9be8 In keeping with Adobe's convention, Set and Map's forEach() function takes an optional 'thisObject' param Tom Conkling 2008-11-04 20:21:26 +00:00
  • f17e0efd07 The throttle update cannot be applied in a Runnable, or we get a race condition against the frames coming in from network. The actual _throttle is only ever access from the network thread, so only _pendingThrottles needs extra care. Par Winzell 2008-11-04 19:55:06 +00:00
  • 4bc5627d82 Let's have Set implement forEach, like Map does. Par Winzell 2008-11-04 18:21:29 +00:00
  • 14755a6cea Fixed fundamental flaw with throttling code. Changed the client to adjust its message rate when it actually sends the throttle updated message. Otherwise the client starts sending at the new rate before the server knows about it. Keep the messages per second in the message. Jamie Doornbos 2008-11-04 08:37:13 +00:00
  • ed002196b0 Missed a line from the previous change. Added comment for new ArrayUtil method Jamie Doornbos 2008-11-04 08:33:05 +00:00
  • 4633684fb6 Copied code from java implementation of Throttle.reinit(). After testing, I found this method was leaving older values in the middle of younger values Jamie Doornbos 2008-11-04 06:41:00 +00:00
  • be8597a5c1 Headless building for happy Mac development. Ray Greenwell 2008-11-04 01:40:45 +00:00
  • 7a3f264d43 Minor changes to previous fix. Log runnable, event or message that is being posted to the inactive queue. Remove instanceof check since the invoker will always be of the expected type Jamie Doornbos 2008-11-03 23:14:47 +00:00
  • e843684637 Fix typo. Michael Bayne 2008-11-03 23:01:45 +00:00
  • f60713de17 Between the time that we're shutdown and the time that we finally exit, do not accept new connections or read incoming messages from any of our extant connections. Do send outgoing messages to those connections, but nothing else. Michael Bayne 2008-11-03 23:00:07 +00:00
  • e97d19476b Be less harsh and just log a warning in case some shutdown methods rely on posted events or messages being silently ignored (invoker still throws however, because it was throwing before) Jamie Doornbos 2008-11-03 22:49:25 +00:00
  • 82d4f36c1a Fixes for shutdown sequence, including prevention of a race condition * Throw an exception if any events, runnables or messages are posted after shutdown. These were previosuly being silently ignored. We really should know about them. * Don't exit the connection manager thread until the object manager thread exits. This fixes a race condition where the wakeup time of the conmgr thread would determine if it shutdown before or after the object manager, meaning it would sometimes ignore messages around shutdown time. * Add a shutdown constraint to make the client manager shutdown before the invoker/event/conmgr threads. This gives a single point in the shutdown sequence that applications can use as a constraint (TODO: shutdown groups?) * Emit a log message for each shutdown method call. This could be very useful in production. Jamie Doornbos 2008-11-03 22:20:16 +00:00
  • 0cb3330de7 Refix for long running clients (r5483). I must have introduced this at the last minute when switching my original -32768 to use Short.MIN_VALUE instead, forgetting to remove the negation Jamie Doornbos 2008-11-03 19:26:57 +00:00
  • 055ae0cc98 Allow bureau clients to report fatal errors if something goes wrong, like oh I don't know... maybe a disconnection perhaps Jamie Doornbos 2008-11-01 00:31:53 +00:00
  • dc99a123ad Helps if we actually call the function that's able to be overridden. Mike Thomas 2008-10-31 21:46:47 +00:00
  • 0906ccdca5 Things work better when you set values and whatnot Charlie Groves 2008-10-31 20:31:51 +00:00
  • 15c66260ea Take ChangeListeners in SafeSubscriber's constructor that will start listening to the subscribed object when it becomes available and will stop listening when we unsubscribe. Charlie Groves 2008-10-31 18:33:59 +00:00
  • a3e74276f5 Implement these listeners in helper classes rather than in ourselves where they become undesirably part of our public interface. Michael Bayne 2008-10-31 17:33:26 +00:00
  • 7d4a594929 Truth in method naming. Michael Bayne 2008-10-30 22:31:15 +00:00
  • ed0718674e Fixed bug with long running clients. The results for invocation requests with ids exceeding Short.MAX_VALUE could not be processed due to the id being deserialized as a short but stored in the map with an integer key. Jamie Doornbos 2008-10-30 17:15:42 +00:00
  • f511469901 Purge the use of the getChatName() hack. Mike Thomas 2008-10-29 22:26:56 +00:00
  • 815f7b5b44 Allow the output stream to be overridden just like the input stream on the config registry. Mike Thomas 2008-10-28 22:47:13 +00:00
  • 677e06b193 Let's have a nice toString(). Michael Bayne 2008-10-28 22:16:38 +00:00