|
||
|
|||||||
| Modification Suggestions This is where you can suggest a modifcation to RunUO! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#26 (permalink) | |
|
Forum Expert
|
Quote:
If you look back in the thread i explained that this system is possible so no one can say it's not possible =) But need's alot of work.. It's stable on theoritical way's ..So I used theories to suggest it's stable or not.By the progaming dialog and the scales used in c++ & visualbasic this must be stable.. |
|
|
|
|
|
|
#27 (permalink) | |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
Quote:
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
|
#28 (permalink) |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
I agree with ArteGordon...I don't think the mods you are trying to accomplish would need to be so massive. You might give his ideas a try and see if you can do some tests.
(What I got from his ideas): Have the Ser method check the current object being 'saved' against the last save information for that item. If it's changed (or if it doesn't exist), it would save that object. (By object, I mean anything that is saved, like a 'Name' or 'ItemID', etc. (What *my* suggestion is): My suggestion (as I told you on MSN Alis ) is to not check all 'objects', but instead simply add a variable that is NOT saved. This variable would be a DateTime. This DateTime would be 'updated' when anything is changed on the Item/Mobile. The Ser method then checks this variable and compares it to the last save DateTime. If the variable is newer (meaning the item/mobile was changed since the last save), the item/mobile is saved. I know this is more information that would be saved, but *I* believe that this would be a lot easier to implement. But still, if you know what you are wanting to do, just give me a list and I'll get started ![]() |
|
|
|
|
|
#29 (permalink) |
|
Forum Expert
|
Arte ; your correct on not modifyin all the scripts I found out what i need to modify (mobile ; items) these are the basic thing's but in other way what your talking about will slow down the machine mine is diffrent further today i will explain what Im doing.
Save Core 1.0beta will be released by next week =) hope that i will have the support then =) |
|
|
|
|
|
#30 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
you cant set the "static" or "unchanged" flag for every item.
how could you possibly do that?? editing all the setters in the whole system? not just the core, but every single item/mobile files?? |
|
|
|
|
|
#31 (permalink) | |
|
Forum Expert
|
Quote:
YOu don't have to edit evry single object (mobile/item) all the items link to one script all item's link to one script which offers two domain scripts but not all the scripts =) |
|
|
|
|
|
|
#32 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
I'll be interested to see what you come up with. good luck.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#33 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
I am sorry but as far as I know it is impossible to do it just by modifying Item class
You can do it in Item class for only Item properties but almost any item has its own properties too. You cant control those properties with Item class.. besides, you might not be able to do it even for some Item properties where some child items do not call Base methods in overriding methods.. (same for mobiles) |
|
|
|
|
|
#34 (permalink) | |
|
Forum Expert
|
Quote:
In object technolgy allmost evry class is generated from a base or abstract class whenever a new inherits or ( extend) this base class it will inherit their difiend method's and properties and if it likes it will overwrite base class method's and add a new properties also. In some language the overwriting(overloading) a method has some mechanisim that either replace the base method or just reply method request by it's new overloaded method this concept is called "virtual method".When ever base method is typed as virtual and the extended class overload's this method then their is no chance to call base method as you said; but if is not typed as virtual then you can call base method by casting extended method to base method.Then you will be able to call base method even. Therefore the description of method can be called from the child object .If the method is not overloaded by extended class then you can allway's call the base method. Our goal is going to be define a property bool ChangeFlag and define three method -"Void SetChanged()", -"Void UnsetChanged()", -"Bool IsChanged()"; In base class like (class Mobile) and never care in the child classes about this stuff.Then we are going tp atack the code sniplet where the action's is conducted;like ([move command) We will call the object SetChanged() method that is going set ChagedFlag property to true.This action will be also intercept in new creation time of item.İtem must be set as changed. We will also ; atack the archive process which is taking object from universe container and serilize them to write archive file.At that point we will intercept a logic that will check the object with IsChanged () method to differantiate if it is changed or not since recent archive. If it is changed it will going to be serillized and written to archive then call UnsetChanged() method to reset ChangeFlag to false. There for no child class will be involved with this flag .This will save the script writer's even know about such a mechanisim is exist. |
|
|
|
|
|
|
#35 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
I was guessing that you were trying something like that, but the question is how are you going to handle the modifications to other properties that might be changed in a class?
If any serialized property changes then in your scheme, wouldnt that require that you set your 'changed' flag? The example that you give would handle the case of changed location, but you would have to be able to extend this to all other serialized properties for it to work.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. " For questions, information, and support for XmlSpawner and its addons, visit the XmlSpawner Support Forum |
|
|
|
|
|
#37 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
actually, you could focus on your other idea, runtime-save so that save time doesnt matter anymore..
there is already a code snippet for it in the core, you can think about what could be the side effects of doing everyting totally in a different thread.. some hints: -you cant modify a collection (ex: hashtable) while some iterator is working on it. the behaviour of World.RemoveItem should be changed a little.. -same problem with World.AddItem (this is more problematic, you might need another temporary hashtable) -so you need to write a another customized hashtable class which has internally two hashtable(normal & temp) -modify World.FindMobile, World.FindItem, Items (it should return customized hashtable), Mobiles (same with Items: there should be another customized hashtable for it) -you need to modifiy Add, Remove methods for customized hashtables: see hint 1,2 look into core for more info.. p.m me if you need help with anything.. |
|
|
|
|
|
#38 (permalink) | ||
|
Forum Expert
|
Quote:
Therefore it is not neccasary to deal with every indivual properties of any item.We will difrenciet the object's subjet to be archived and need not to be archived. Quote:
|
||
|
|
|
|
|
#39 (permalink) |
|
Administrator
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
|
The largest problem with this method is the huge amount of script modifications required... that the problem for any major save change, which is why saves are very unlikely to change in any new RunUO releases.
Otherwise it's a good idea.
__________________
Zippy, Razor Creator and RunUO Core Developer The RunUO Software Team "Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal." ~The Cryptonomicon |
|
|
|
|
|
#41 (permalink) | ||
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
Alis, isn't this one of your ideas ?
![]() Quote:
Quote:
|
||
|
|
|
|
|
#42 (permalink) | |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
Quote:
![]() *I* believe a save modification that will make the times better would be good AND relatively 'easy' to implement. For what she's trying to do, it sounds like it might take a few mods, but if she (we) can pull it off, all the better for the community, and maybe the Devs can take a look after it's completed, do some stress tests and see about putting the changes in. I believe, what she is trying to do is a 'simple' bool value that is updated when the item (mobile) is changed. The variable is easy, of course, but figuring out a way to update that variable whenever ANYTHING is changed on that item is going to be the hard part. A big chunk of these things could be taken care of with a change to the InvalidateProperties method, but people tend to leave that one out with their custom scripts. I havn't delved into the Core enough to know if there is a lower level call that is always called when something is changed, but there might be? Would just need to throw the update call in that method as well. |
|
|
|
|
|
|
#43 (permalink) | |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
I didnt say it is impossible, it was:
Quote:
there is not such a method that is called for every single change.. my suggestion for him to work on runtime-save which is better than this and it seems much more "possible" with much less work.. |
|
|
|
|
|
|
#44 (permalink) | ||
|
Forum Expert
|
Quote:
Im aware the major change(modification) is not practical and cannot be implemented.Therefore im seeking solution with simple approach.That will not cost too much. What im thinking to intercept the base class of mobile,item's,and guild etc.. which will be effective for all derived class.(Of course regeneration of server.exe needed) Also intercept the point where change request is started, like as ; listener object of server that client event generation will allway's need to be pass through; therefore the atacked point's will be limited to a few object modification. If we look at the archive site it will request object from universe container and after getting object it will serilize and output; at that point we will insert a very short logic that after obtaining object it will going to ask the object if it is changed or not.If it is not changed simply it will skip this object and will request the next object from the universe container.The change diffrence will be output to different file.The archive will behave to full backup within certain interval just skipping testing object change; in the recovery phase we are not going to do anything except after loading rescent full backup and load the diffrence files consequtively.This might not be costly. Quote:
I asume archive is iterativly getting objects from universe container using an Iterator therefore whenever he get a reffrence of an object and serilize an output to archive file and will ask next object from the universe container.Therefore after obtaining object from universe container even it is changed will not be disturb our mission.Assume that we freeze the system and made archive then unfreeze the system again and let the object be changed it is going to be same scenerio with our case. Asume that the archive will be completed only for this object and start with next object. Im aware there will be some inconsistent case will be occured for those objects be archived and unarchived, the snapshot of the system at that moment will not reflect the real case.When we restore system from full archive and increments we will not achive the recent state of object that will be archived early and changed again till incremental archive is completed.But according to me this will rarely happend because we are talking about system crash and restoring.Also this can be acceptible because the object early archived has very limited possibility of occur.Even it happens it will loose the very recent change. If we consider the current archive ; this scenerio cost more dramatically since you are going to loose last 30 min change in crash case(that needs to be restored, current user has a chance to complain about lost modifications on their objects). For this reason I dont agree to use a secondary hashtable or so.What I am telling the archive can be started in background with in another thread(having lower priority) can run similtanusly and freezing is not necceserry.There is nothing to change but removing freezing process and just start archive in scheduled interval (in other word's nothing is needed to be changed but the operation flow going to be modifed). |
||
|
|
|
|
|
#47 (permalink) |
|
Master of the Internet
|
It would be interesting to see how such a system would perform when over 2000 inactive accounts become deleted when an admin cleans up the shard. Yes, we have had that many inactive accounts cleaned from Demise.
__________________
Paranoia is what happens when you finally have all of the facts. |
|
|
|