Commit graph

47 commits

Author SHA1 Message Date
Griatch
87d1254b2c Changed contrib/procpool's PROC_MODIFIED_OBJS list to sit in src.utils.idmapper.base as well as be a WeakValueDictionary instead of a normal list. This removes unnecessary reference counts to objects. 2014-05-14 20:07:59 +02:00
Griatch
9bfb829274 Implemented WeakSharedMemoryModel for Attributes. 2014-05-11 15:23:11 +02:00
Griatch
c5839eebba Forgot a fix. 2014-05-11 07:28:44 +02:00
Griatch
0c848eb9a2 Reverted to a standard dictionary in SharedMemoryBase; not having this does return the old 'going out of scope' from yesteryear. 2014-05-11 07:27:56 +02:00
Griatch
e11b242365 Continued with weakref and lazyloading fixes. 2014-05-11 01:05:59 +02:00
Griatch
63c099c22f Various fixes and debugging of weak-ref changes 2014-05-10 19:38:23 +02:00
Griatch
393a3e5e73 Added check to location setter that makes sure to stop a location-loop forming. This closes #454. 2014-02-15 21:05:23 +01:00
Griatch
f11f330e95 Moved db_player and db_sessid under metaclass wrappers. 2013-09-23 23:10:23 +02:00
Griatch
642ae2faf9 Fixed cache and metaclass irregularities as well as the location and contents caches. 2013-09-22 21:48:08 +02:00
Griatch
0a394929b7 Fixed an issue in idmapper metaclass wrapper, it caused text fields to be occationally be written with objects. 2013-09-22 19:56:51 +02:00
Griatch
4659ddbfc3 Changed object.msg() to relay directly to connected session rather than via the player.msg() method. 2013-09-22 11:39:24 +02:00
Griatch
dd27b4b77d More bugfixes. 2013-09-21 22:22:53 +02:00
Griatch
2ba16e155e Fixed a bug in amp that made reloading not work. 2013-09-21 22:00:46 +02:00
Griatch
2f5c895f76 Removed LiteAttributes, made Nicks use Attributes. Added category and strvalue fields to Attribute. Made Attributes accessible through an AttributeHandler, like most other advanced properties. 2013-08-24 21:23:43 +02:00
Griatch
37886adea1 Added signalhandler in test suite, still issues. 2013-07-13 15:39:16 +02:00
Griatch
7b0c96640c Reverting metaclass wrapper for db_key, will have to look into why it behaves strangely. 2013-07-12 23:58:22 +02:00
Griatch
73a5800fbf Fixed updates of the contentmanager. Not all command tests run yet. 2013-07-12 22:08:15 +02:00
Griatch
a4042920e0 Fixed the migrations to get to a baseline version you can log into. 2013-07-11 22:24:55 +02:00
Griatch
9e10a41e18 First version with all caches seemingly working ok. Started to remove the on-model wrappers that are not handled by the idmapper metaclass. 2013-07-11 15:59:03 +02:00
Griatch
033344ad2c Moved get_evennia_pids into src.utils.utils for more general access. 2013-07-10 11:06:38 +02:00
Griatch
a0a94df83d Removed extra caching for fields (this slowed things down over normal django field caching). Considering reworking Attribute storage in order to make use of those caches as well. 2013-06-06 12:45:39 +02:00
Griatch
7351aacba5 Fixed an issue with setting location. Still errors with creating new objects. 2013-06-05 18:47:41 +02:00
Griatch
fb3259be8c Activated propcache with new cache system. Still not functioning correctly, also the content cache needs to be handled. 2013-05-29 23:07:44 +02:00
Griatch
b6383ddab9 Moved attr_cache to new caching system, activated all attribute updating signals. 2013-05-29 18:47:51 +02:00
Griatch
8202dba596 Changed cache system to use Django's cache mechanism. Changed field caches to make use of Django signalling instead of custom caching calls (this should make the system consistent also when called from the webserver). Created a wrapper system for easily wrapping fields with a default wrapper (so as to not have to explicitly define the properties (such as objdb.key) which all just do the same thing - load from the field and make sure to call save(). 2013-05-29 16:16:28 +02:00
Griatch
deafb9c544 Added cache-cleaning to the idmapper base class. This works to sync most changes from the admin site-side, but not location changes (which leaves the content cache stale). Thinking of testing the django in-built cache framework instead, maybe using custom fields? 2013-05-25 10:20:26 +02:00
Griatch
0a39b8f65e Webserver move to Server is finished and everything seems to work normally. 2013-05-24 21:10:31 +02:00
Griatch
20e093aa26 Settings and server configs updated. The caches between server and website threads are still not properly addressed - a change in the admin interface does not immediately translate to a change in-game. 2013-05-23 23:42:55 +02:00
Griatch
76fa0059ea First preparations for moving webserver to Server process. 2013-05-22 18:18:50 +02:00
lagos
e12ad67ee4 Correctly flushes entire SharedMemoryModel class hierarchy. 2013-01-11 01:14:28 -08:00
Griatch
ffcf4b3c2f Added cache-resyncing to ProcPool. This makes sure to update all affected object caches
whenever the subprocess returns (this is potentially not good enough for long-running scripts,
will have to ponder that one). Made ProcPool work with MySQL (where it works much better). Tested and fixed many
small bugs.
2012-09-03 01:11:14 +02:00
Griatch
f5a889e40c Added new process-pool runner based on AMPoule (integrated into Evennia).
This allows e.g. utils.utils.run_async to offload long-running functions
to a completely different subprocess entirely, offering real parallelism.

Implementation is still experimental, notably not all objects can be
transferred safely across the wire; also there is no concept of
updating caches yet - so adding an object from the subprocess side
will not be known in the main thread yet (since caches cannot yet tell
the underlying database has changed).
2012-09-02 10:10:22 +02:00
Griatch
e82515f8cb Updated to a supported idmapper version. Added a method for calculating the cache usage of the idmapper, and tied it to the @system command. 2012-04-30 00:51:36 +02:00
Griatch
464aa8ca9e Added the ability to clear an object from the global cache. This is rarely
needed (and can be potentially dangerous if the object depends on certain
startup methods to run and/or holds temporary attributes on themselves -
these will all be lost due to a new instance being created. It is hoever
necessary when it comes to renaming Exits - since the Command on the exit
must then change name too, recaching the Exit will also update the command.
Resolves issue 223.
2012-04-15 21:46:43 +02:00
Griatch
fd857f5c86 Expanded the dummy runner, making it more realistically mimicking real Players by spreading out its access usage. 2012-02-22 12:44:51 +01:00
Griatch
b87f787c38 Added some info the idmapper header, detailing the evennia changes better. 2012-02-06 12:38:17 +01:00
Griatch
54c31468ad Removing the last remnants of the async saving debacle. Async saving causes a host of extra problems within Django - order gets messed up and deleting simply doesn't work - but the scariest issue is that it seems to do nasty things with database references - deleting changes dbrefs for objects dynamically ... O_o; Plus, the overhead of creating threads for every save makes the whole thing very slow. It's NOT worth the effort. 2011-11-05 23:08:25 +01:00
Griatch
791b380693 Tried with defer.execute for the async-save intead. Still issues with multiple objects. 2011-11-03 14:50:24 +01:00
Griatch
17951a05f5 Dev: Testing with asyncronous db saving. 2011-11-03 14:08:14 +01:00
Griatch
1995f61d46 Put up a warning about not using BaseObject.at_init() at this time (it's not called, as per issue 188). Also removed the deprecated at_cache() hook (it doesn't work anymore now that the caching system is much more efficient and only caches once). 2011-09-15 10:46:41 +02:00
Griatch
2b4e008d18 Scripts and Exits updated. Fixed some deep issues with Scripts that caused object-based scripts to not properly shut down in some situations, as well as spawn multiple instances of themselves. I think this should resolve all "at_repeat doubling" issues reported. Due to optimizations in the typeclass cache loader in a previous update, the Exit cmdsets were not properly loaded (they were loaded at cache time, which now doesn't happen as often). So Exits instead rely on the new "at_cmdset_get" hook called by the cmdhandler. It allows dynamic modification of cmdsets just before they are accessed. Resolves issue173 (I hope). Resolves issue180. Resolves issue 181. 2011-08-11 21:16:35 +00:00
Griatch
ddfd8120bb Made scripts and typeclassed objects remember db_typeclass_path at all times - a temporarily faulty typeclass will no longer mess up things forever after. Refined and optimized the way typeclasses are cached and loaded, minimizing db hits. The default result when trying to create an object or script with a typeclass that is faulty/not found is now to fail. The previous way, to create an entity anyway using defaults was hard to debug and caused confusion. Resolves issue 175. 2011-08-06 18:15:04 +00:00
Griatch
b8a13a2389 Migrate. Made Exits work differently, by use of commands directly instead of an exithandler assigning commands on-the-fly. This solution is a lot cleaner and also solves an issue where @reload would kill typeclasses in situations where an exit was painting to an object whose typeclass was reloaded (same issue occured if the exit typeclass itself was reloaded). As part of these fixes I cleaned up the merging of cmdsets to now merge in strict priority order, as one would expect them to do. Many small bug-fixes and cleanups all over. Resolves issue 164. Resolves issue 163. 2011-05-01 18:04:15 +00:00
Griatch
e965830735 Made the reload mechanism fully asynchronous. Work on improving cache operations. 2011-03-20 13:24:07 +00:00
Griatch
7fb6362dc4 Added optional support for database migrations with south. The game/migrate.py program is a simple wrapper that runs the suitable commands for setting up a database and updating it, respectively. 2010-10-31 18:21:23 +00:00
Griatch
3f703efc2d Made changes to idmapper that might help alleviate issue101 (more people need to run it to make sure). Moved around default command modules to be more logically named and distributed. 2010-10-31 08:10:02 +00:00
Griatch
f83c2bddf8 Trunk: Merged the Devel-branch (branches/griatch) into /trunk. This constitutes a major refactoring of Evennia. Development will now continue in trunk. See the wiki and the past posts to the mailing list for info. /Griatch 2010-08-29 18:46:58 +00:00