Hi Moosers. I am doing little experiments to export/serialize big graph of objects using ImageSegment. I though that MooseModel was a good candidate. And I even remember Simon's wishes for copying them. But I have a couple of questions:
1) Which is the bigger autogenerated MooseModel I can get to test? For the moment I am evaluating "MooseModel installDefaultModels". and then I export "MooseModel root". Is there a bigger one I can use? how ? 2) How is the root or any other MooseModel normally exported? Which methods? which technology ? Can you give me an example of the standard way to export/serialize/copy a MooseModel ? The only thing I saw is MooseModel class >> export: aModel to: aStream I just open a file and send it as Stream? 3) Suppose that I copy/export somehow a MooseModel (suppose the root) to a file. I take another Moose image, I load the file, objects are alive again and I replace MooseModel rootModel with the new object. How do I know if the copy/export worked correctly ? If I do it in the same image, I can have both, but how can I compare them to be sure everything was done ok ? method #= has no sense as it will use Object with is #==. So...any idea to know if the MooseModel I export and load again with ImageSegment is really working or not? I want to test exporting and loading these MooseModel with different technologies but I need a way to know if the resulted object is correct or not. Ahhh please, cc' me in the mail as I am not sure I receive emails from this list. Thanks for any hints. Mariano _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 25 mai 2010, at 14:06, Mariano Martinez Peck wrote: > Hi Moosers. I am doing little experiments to export/serialize big graph of objects using ImageSegment. I though that MooseModel was a good candidate. And I even remember Simon's wishes for copying them. But I have a couple of questions: > > 1) Which is the bigger autogenerated MooseModel I can get to test? For the moment I am evaluating "MooseModel installDefaultModels". and then I export "MooseModel root". Is there a bigger one I can use? how ? Take a look at the MooseScripts class, class-side. There are a number of methods to create moose models from the image itself. In order of importance: Network << Moose << Pharo With network, you won't have any problem. With a model of Moose itself, it's fast enough to do lots of test yet you can still improve things. Then a Pharo model is certainly a good scalability test. > > 2) How is the root or any other MooseModel normally exported? Which methods? which technology ? Can you give me an example of the standard way to export/serialize/copy a MooseModel ? The only thing I saw is MooseModel class >> export: aModel to: aStream > I just open a file and send it as Stream? Depends... - File persistency is done in the MSE format and using Fame to serialize entities in MSE. Just take a look at MooseModel>>exportToMSEStream: - To clone a model, just use MooseModelCopier>>copyModel: (this was a simple experiment to make practical copies of large MooseModels. Or rather to show that simple copy did not scale well on large MooseModel right now). > > 3) Suppose that I copy/export somehow a MooseModel (suppose the root) to a file. I take another Moose image, I load the file, objects are alive again and I replace MooseModel rootModel with the new object. How do I know if the copy/export worked correctly ? If I do it in the same image, I can have both, but how can I compare them to be sure everything was done ok ? method #= has no sense as it will use Object with is #==. So...any idea to know if the MooseModel I export and load again with ImageSegment is really working or not? I would change the tests setup to export/import the test model and run tests on it (that's what I did to test the MooseModelCopier). Only problem is that tests use some small models, so maybe some things will be hidden. This is start though. > > > I want to test exporting and loading these MooseModel with different technologies but I need a way to know if the resulted object is correct or not. > > Ahhh please, cc' me in the mail as I am not sure I receive emails from this list. > > Thanks for any hints. > > Mariano > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Mariano,
For some reason your mail appeared as blocked for the mailing list. I undid the setting now. Did you get the previous email of Simon? Cheers, Doru On 25 May 2010, at 14:35, Simon Denier wrote: > > On 25 mai 2010, at 14:06, Mariano Martinez Peck wrote: > >> Hi Moosers. I am doing little experiments to export/serialize big >> graph of objects using ImageSegment. I though that MooseModel was a >> good candidate. And I even remember Simon's wishes for copying >> them. But I have a couple of questions: >> >> 1) Which is the bigger autogenerated MooseModel I can get to test? >> For the moment I am evaluating "MooseModel installDefaultModels". >> and then I export "MooseModel root". Is there a bigger one I can >> use? how ? > > Take a look at the MooseScripts class, class-side. There are a > number of methods to create moose models from the image itself. In > order of importance: Network << Moose << Pharo > With network, you won't have any problem. With a model of Moose > itself, it's fast enough to do lots of test yet you can still > improve things. Then a Pharo model is certainly a good scalability > test. > > >> >> 2) How is the root or any other MooseModel normally exported? >> Which methods? which technology ? Can you give me an example of the >> standard way to export/serialize/copy a MooseModel ? The only >> thing I saw is MooseModel class >> export: aModel to: aStream >> I just open a file and send it as Stream? > > Depends... > > - File persistency is done in the MSE format and using Fame to > serialize entities in MSE. > Just take a look at MooseModel>>exportToMSEStream: > > - To clone a model, just use MooseModelCopier>>copyModel: (this was > a simple experiment to make practical copies of large MooseModels. > Or rather to show that simple copy did not scale well on large > MooseModel right now). > > >> >> 3) Suppose that I copy/export somehow a MooseModel (suppose the >> root) to a file. I take another Moose image, I load the file, >> objects are alive again and I replace MooseModel rootModel with the >> new object. How do I know if the copy/export worked correctly ? >> If I do it in the same image, I can have both, but how can I >> compare them to be sure everything was done ok ? method #= has no >> sense as it will use Object with is #==. So...any idea to know if >> the MooseModel I export and load again with ImageSegment is really >> working or not? > > > I would change the tests setup to export/import the test model and > run tests on it (that's what I did to test the MooseModelCopier). > Only problem is that tests use some small models, so maybe some > things will be hidden. This is start though. > > >> >> >> I want to test exporting and loading these MooseModel with >> different technologies but I need a way to know if the resulted >> object is correct or not. >> >> Ahhh please, cc' me in the mail as I am not sure I receive emails >> from this list. >> >> Thanks for any hints. >> >> Mariano >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > Simon > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Being happy is a matter of choice." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On Tue, May 25, 2010 at 2:38 PM, Tudor Girba <[hidden email]> wrote: Hi Mariano, Weird...Moose doesn't like me :( Did you get the previous email of Simon? Yes, but I guess because he put me in cc. Thanks Mariano Cheers, _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi,
> Hi Mariano, > > For some reason your mail appeared as blocked for the mailing list. > I undid the setting now. > > Weird...Moose doesn't like me :( Let's not jump to conclusions :). This probably happened because the mail address rejected the mails from this mailing list or something like that. Although this is strange because it's gmail. > Did you get the previous email of Simon? > > > Yes, but I guess because he put me in cc. He did not add you in cc, and neither did I. So, it works now :). Cheers, Doru > Thanks > > Mariano > > Cheers, > Doru > > > > On 25 May 2010, at 14:35, Simon Denier wrote: > > > On 25 mai 2010, at 14:06, Mariano Martinez Peck wrote: > > Hi Moosers. I am doing little experiments to export/serialize big > graph of objects using ImageSegment. I though that MooseModel was a > good candidate. And I even remember Simon's wishes for copying them. > But I have a couple of questions: > > 1) Which is the bigger autogenerated MooseModel I can get to test? > For the moment I am evaluating "MooseModel installDefaultModels". > and then I export "MooseModel root". Is there a bigger one I can > use? how ? > > Take a look at the MooseScripts class, class-side. There are a > number of methods to create moose models from the image itself. In > order of importance: Network << Moose << Pharo > With network, you won't have any problem. With a model of Moose > itself, it's fast enough to do lots of test yet you can still > improve things. Then a Pharo model is certainly a good scalability > test. > > > > 2) How is the root or any other MooseModel normally exported? Which > methods? which technology ? Can you give me an example of the > standard way to export/serialize/copy a MooseModel ? The only thing > I saw is MooseModel class >> export: aModel to: aStream > I just open a file and send it as Stream? > > Depends... > > - File persistency is done in the MSE format and using Fame to > serialize entities in MSE. > Just take a look at MooseModel>>exportToMSEStream: > > - To clone a model, just use MooseModelCopier>>copyModel: (this was > a simple experiment to make practical copies of large MooseModels. > Or rather to show that simple copy did not scale well on large > MooseModel right now). > > > > 3) Suppose that I copy/export somehow a MooseModel (suppose the > root) to a file. I take another Moose image, I load the file, > objects are alive again and I replace MooseModel rootModel with the > new object. How do I know if the copy/export worked correctly ? > If I do it in the same image, I can have both, but how can I compare > them to be sure everything was done ok ? method #= has no sense as > it will use Object with is #==. So...any idea to know if the > MooseModel I export and load again with ImageSegment is really > working or not? > > > I would change the tests setup to export/import the test model and > run tests on it (that's what I did to test the MooseModelCopier). > Only problem is that tests use some small models, so maybe some > things will be hidden. This is start though. > > > > > I want to test exporting and loading these MooseModel with different > technologies but I need a way to know if the resulted object is > correct or not. > > Ahhh please, cc' me in the mail as I am not sure I receive emails > from this list. > > Thanks for any hints. > > Mariano > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > Simon > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "Being happy is a matter of choice." > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Not knowing how to do something is not an argument for how it cannot be done." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Mariano Martinez Peck
> 1) Which is the bigger autogenerated MooseModel I can get to test? For the moment I am evaluating "MooseModel installDefaultModels". and then I export "MooseModel root". Is there a bigger one I can use? how ?
You can load a large model, like Swing or Linux. > 3) Suppose that I copy/export somehow a MooseModel (suppose the root) to a file. I take another Moose image, I load the file, objects are alive again and I replace MooseModel rootModel with the new object. How do I know if the copy/export worked correctly ? If I do it in the same image, I can have both, but how can I compare them to be sure everything was done ok ? method #= has no sense as it will use Object with is #==. So...any idea to know if the MooseModel I export and load again with ImageSegment is really working or not? One idea is to generate a view, export then import your model, regenerate the view. If the two views are not identical, then you may have spotted some problem. Cheers, Alexandre _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba
On 25 mai 2010, at 14:43, Tudor Girba wrote:
I did put Mariano in CC, it just does not appear in the ml. But if you did receive the one of Doru, you should have two copies of my mail :) -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Simon Denier-3
I answer above.
On Tue, May 25, 2010 at 2:35 PM, Simon Denier <[hidden email]> wrote:
This was very helpful. Thanks
Here I have a couple of questions. MooseModelCopier new timedCopyModel: MooseModel root -> 123 MooseModelCopier new timedCopyModel: MooseModel root first -> 3076 I don't understand how copying the root can be less than that copying an element of the root. Shouldn't copy the whole graph in case I want to copy the root? I was doing all my benchmarks with the root but in the method timedCopyModel: I saw the example in comment: self new timedCopyModel: MooseModel root second Another question, you said "Or rather to show that simple copy did not scale well on large MooseModel right now" Which is the simple copy you meant? Just aMooseModel copy ? deepCopy? clone ? I want to compare for example the time with that simple way and with your copier.
Where did you do that? I didn't find tests for MooseModelCopier? Where can I change the export/import setup? I guess there is a TestResource somewhere. Maybe in MooseModelTestResource ? or in subclasses? Thanks for all the help Mariano Only problem is that tests use some small models, so maybe some things will be hidden. This is start though. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 31 mai 2010, at 15:26, Mariano Martinez Peck wrote: I answer above. I will try to answer all of the above in two single statements to clarify: 1) MooseModelCopier is the "simple" copy. It copies elements by traversing all of them, while using a custom traversal strategy to avoid traversing the whole graph. So it's a reasonable implementation of deepCopy. 2) It was written very quickly to do an experiment and show that even this simple (but not so naive) strategy did not work for large models. So it was meant to copy a standard model with packages, classes... That's why you got nothing when running on MooseModel root, because it knows nothing about the recursive structure of root and copies nothing. As far as I know, nobody uses this class for standard Moose operations right now.
What I did (again, it was an experiment, so quick and dirty): Take resource classes like LANPackageTestResource, FAMIXNavigationPluginTestsResource setUp | oldModel | model := MooseModel new. self importModel. oldModel := model. model := MooseModelCopier new copyModel: model. Transcript show: model == oldModel Then tests are run on a model copy and should be all green (we don't compare the copy and the original though) -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |