On Oct 7, 2010, at 1:09 AM, Friedrich Dominicus wrote: > Norbert Hartl <[hidden email]> writes: > >> On 06.10.2010, at 19:07, Jon Paynter wrote: >> >> >> ok im a little confused here. >> >> While everything Norbert said works great - whats stopping you from >> starting your development in gemstone and just using the Pharo image as a >> front end? >> >> >> Well, nothing :) What I wrote is just the complete process. After I started >> with gemstone I did exactly this. I had a local installation on my laptop and I >> just connected from pharo to the gemstone and developed there. It is working >> well, only the development tools are a bit older and there is some latency >> between keyboard actions and visual feedback but ok. >> If you are planning to work on a remote gemstone than you will immediately see >> that it does not work that well. > May I ask something here again. So I have my Gemstone running on the > same machine as the GemTools so I see the latency even while working in > "local" mode. It's not much but one "sees" it. I wonder if the delay you are seeing is due to GemTools doing a commit after every action (rather than network latency). I believe there is a menu option to turn that off (I don't have GemTools up right now to check). Of course, then you need to manually commit or else you could lose your work. James > So you are not even > having a kind of "development" gemstone, but really am just working in > the Pharo image? > > Regards > Friedrich > > -- > Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim > Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus |
James Foster <[hidden email]> writes:
> I wonder if the delay you are seeing is due to GemTools doing a commit > after every action (rather than network latency). I believe there is a > menu option to turn that off (I don't have GemTools up right now to > check). Of course, then you need to manually commit or else you could > lose your work. Maybe it's because the gemstone library is quite large? I figures out that the Gemstone/Seaside combination is set to autocommit. I'd think that most of the Gemstone stuff still may fit into memory but I'm not that much into all the libarries for asking Gemstone about it. It's not really a disturbing thing it's just that one recognices it. Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus |
In reply to this post by James Foster-8
On Thu, Oct 7, 2010 at 6:40 AM, James Foster <[hidden email]> wrote:
It is still fairly flow even with the auto commit off.
|
On Thu, Oct 7, 2010 at 9:19 AM, Sean Allen <[hidden email]> wrote:
/flow/slow/
|
In reply to this post by Bart Veenstra
Am 07.10.2010 um 12:05 schrieb Bart Veenstra: > I agree that it adds extra security, but the length is quite long (36 > byte string). Do you also use these UID as key in a dictionary with > every instance, even from different classes. for lookup? > No. I just use #detect: to find the object in the collection. I have no performance optimizations for this so far, since a) I have only few data b) The direct access with an URL is not the normal case and c) it will search for that article only once on the very first access (not like for example in Rails where *every* access needs to fetch the object with the ID from the database) If I will have to optimize performance, I would try to use GemStone indexes first, and then probably your mentioned lookup dictionary, or even a different "caching" strategy, where I would store the "100 most probable" objects in a separate "fast lookup collection". Greetings, Andreas > 2010/10/7 Brodbeck Andreas <[hidden email]>: >> >> Am 04.10.2010 um 22:08 schrieb Bart Veenstra: >> >>> I know, but I need to access my object graph by URL. >>> >>> for instance: >>> >>> sandmin?path=sandmin/questioncategories/questioncategory_general/ >>> question_Leeftijd >>> >>> I use this to traverse to the object and have it displayed. I like >>> human readable url's. Good for search engines to. Using JQuery >>> address >>> I even change the url in my ajax application: >>> >>> >>> http://files.extractivity.com/questionmanager/sandmin#/sandmin/ >>> questioncategories/questioncategory_general/question_Leeftijd/ >>> questionComponents >>> >>> The values after path and # are references to unique id's in my >>> object >>> model >>> Sandmin -> questioncategorylist -> General Question -> Question >>> Leeftijd >>> (age) >>> >>> But for some things, I would like to have generated id's. What is >>> the >>> best way to achieve this? >> >> I had a similar need in an application, where I send out emails to >> users >> with a link back to the application. The link will contain an ID of >> a piece >> of content which will then be displayed. I am using instances of >> UUID (id := >> UUID new.) to generate a unique ID which identifies the object to >> display. I >> like the Uuid approach better than an increasing integer counter, >> because it >> adds extra "security", since it is much harder to guess existing IDs. >> >> Greetings, Andreas >> >> |
In reply to this post by FDominicus
On 10/06/2010 10:09 PM, Friedrich Dominicus wrote:
> Norbert Hartl<[hidden email]> writes: > >> On 06.10.2010, at 19:07, Jon Paynter wrote: >> >> >> ok im a little confused here. >> >> While everything Norbert said works great - whats stopping you from >> starting your development in gemstone and just using the Pharo image as a >> front end? >> >> >> Well, nothing :) What I wrote is just the complete process. After I started >> with gemstone I did exactly this. I had a local installation on my laptop and I >> just connected from pharo to the gemstone and developed there. It is working >> well, only the development tools are a bit older and there is some latency >> between keyboard actions and visual feedback but ok. >> If you are planning to work on a remote gemstone than you will immediately see >> that it does not work that well. > May I ask something here again. So I have my Gemstone running on the > same machine as the GemTools so I see the latency even while working in > "local" mode. It's not much but one "sees" it. So you are not even > having a kind of "development" gemstone, but really am just working in > the Pharo image? > > Regards > Friedrich > The latency is there because of the way that GemTools works. For GemTools I took OmniBrowser and split it down the middle. The morphic client is running in the Pharo image and displays the windows. The OmniBrowser model is running in the GemStone vm. I have arranged for one set of proxy objects on the GemStone side to represent the Morphic Model resident in Pharo and another set of proxy objects in the Pharo vm to represent the OmniBrowser model resident in GemStone. When you click on a menu item (Morphic), the message is sent across the wire from the Pharo-side proxy to the GemStone OmniBrowser model. Work gets done (in GemStone) and if there is a change to the window state, OmniBrowser triggers #changed: messages which result in #update: messages being sent across the wire from the GemStone-side Morphic proxy to the Morphic Model running in Pharo. The Morphic model sends messages requesting state from the OmniBrowser proxy and those messages get sent across the wire to get things like lists of classes, methods, and source code ... In a nutshell, OmniBrowser/Morhpic is very chatty when it comes to these update messages (i.e., the button panels that show up in the browsers is redrawn for every button that is in the panel and that can add up to a lot of round trips across the wire). Soooo, if you want the fastest response times possible, then develop in Pharo natively where the chattiness doesn't slow down response times:) I have done some things that attempted to minimize the round trips for OmniBrowser, but I haven't been able to get a big enough gain, yet. I think that ultimately a performant solution can be found, but I just haven't had the time to focus on that ... Doing development in Pharo has advantages above and beyond speed, so speeding up GemTools hasn't been at the top of my list.... Dale |
In reply to this post by dassi
I am going for the persistent counter option. I understands that
System provides several counters. Should all my classes use the same counter index? Of should I provide a counter for each class. IMHO it doesn't really matter.. 2010/10/7 Brodbeck Andreas <[hidden email]>: > > Am 07.10.2010 um 12:05 schrieb Bart Veenstra: > >> I agree that it adds extra security, but the length is quite long (36 >> byte string). Do you also use these UID as key in a dictionary with >> every instance, even from different classes. for lookup? >> > > No. I just use #detect: to find the object in the collection. I have no > performance optimizations for this so far, since a) I have only few data b) > The direct access with an URL is not the normal case and c) it will search > for that article only once on the very first access (not like for example in > Rails where *every* access needs to fetch the object with the ID from the > database) > > If I will have to optimize performance, I would try to use GemStone indexes > first, and then probably your mentioned lookup dictionary, or even a > different "caching" strategy, where I would store the "100 most probable" > objects in a separate "fast lookup collection". > > Greetings, Andreas > > >> 2010/10/7 Brodbeck Andreas <[hidden email]>: >>> >>> Am 04.10.2010 um 22:08 schrieb Bart Veenstra: >>> >>>> I know, but I need to access my object graph by URL. >>>> >>>> for instance: >>>> >>>> >>>> sandmin?path=sandmin/questioncategories/questioncategory_general/question_Leeftijd >>>> >>>> I use this to traverse to the object and have it displayed. I like >>>> human readable url's. Good for search engines to. Using JQuery address >>>> I even change the url in my ajax application: >>>> >>>> >>>> >>>> http://files.extractivity.com/questionmanager/sandmin#/sandmin/questioncategories/questioncategory_general/question_Leeftijd/questionComponents >>>> >>>> The values after path and # are references to unique id's in my object >>>> model >>>> Sandmin -> questioncategorylist -> General Question -> Question Leeftijd >>>> (age) >>>> >>>> But for some things, I would like to have generated id's. What is the >>>> best way to achieve this? >>> >>> I had a similar need in an application, where I send out emails to users >>> with a link back to the application. The link will contain an ID of a >>> piece >>> of content which will then be displayed. I am using instances of UUID (id >>> := >>> UUID new.) to generate a unique ID which identifies the object to >>> display. I >>> like the Uuid approach better than an increasing integer counter, because >>> it >>> adds extra "security", since it is much harder to guess existing IDs. >>> >>> Greetings, Andreas >>> >>> > > |
On 10/07/2010 10:42 AM, Bart Veenstra wrote:
> I am going for the persistent counter option. I understands that > System provides several counters. Should all my classes use the same > counter index? Of should I provide a counter for each class. IMHO it > doesn't really matter.. I would say that if it doesn't matter use the smae counter ... you have 64 bits so it will be a while before you run out of bits:) There are limited number of counters, so it's best to be frugal. Dale |
In reply to this post by NorbertHartl
OK, I'm thoroughly frustrated.... how *do* I load MockGemStone? I've tried just about every incantation of Gofer I can think of (and Gofer project) but nothing can find it.
--chris
On Wed, Oct 6, 2010 at 3:34 AM, Norbert Hartl <[hidden email]> wrote:
|
On 15.10.2010, at 03:17, Chris Curtis wrote: OK, I'm thoroughly frustrated.... how *do* I load MockGemStone? I've tried just about every incantation of Gofer I can think of (and Gofer project) but nothing can find it.That is not your fault :) Gofer is one of the tools that are rather new. They work good but there hasn't been a complete shift towards Gofer (and it probably never will). While there are new tools to load sources they all use monticello which is the package management underneath. Most of the packages you will find in pharo/squeak/gemstone world will be somehow loadable by monticello. In order to load MockGemStone just do the following: - Point your browser to http://seaside.gemstone.com/ss/MockGemStone.html - Copy the snippet in the Registration section to the clipboard. - Open a monticello browser - Press the "+Repository" button followed by the option "HTTP" - Replace the content shown with the content of the clipboard. Then "Accept" - If you press "open" on the monticello browser while your new repository is highlighted you will see MockGemStone in the left pane. - Select MockGemstone then you got the versions on the right side. Usually you select the top most entry and then you press load hope this helps, Norbert
|
Worked great, thanks.
Of course, I then couldn't resist poking around in Gofer a little, and I figured out that this incantation will work (though I have no idea how 'optimal' it is): Gofer new gemsource: 'MockGemStone' ; package: 'MockGemStone' ; load. --chris On Fri, Oct 15, 2010 at 3:46 AM, Norbert Hartl <[hidden email]> wrote:
|
On 15.10.2010, at 17:17, Chris Curtis wrote: Worked great, thanks.I think it is pretty optimal :) I could have give this as well but then I'm also not that familiar with Gofer. Norbert
|
In reply to this post by Ramon Leon-5
I'm a little late on this, but I thought it was worth mentioning a potential gotcha if you're *not* using something ActiveRecord-ish (that is, you're using regular GS-persisted objects): you can't make temporary changes to the objects. For example, you can't:
(a) load a persisted UserProfile object, (b) bind the accessors to form fields, (c) allow the user to make changes, and then (d) assume navigating away from the page will discard the changes.
The GemStone port of Seaside commits with every page render, so you can't actually do a rollback. To support this behavior, you'd have to create a (non-persistent) DTO from the persistent object, and then on a user-specified "save' action map the changes from the DTO back to the persistent domain object. Or at least, that's one solution.
As a (related) side note, is anyone aware of any work being done with CQRS in the Smalltalk world? --chris On Thu, Sep 30, 2010 at 6:48 PM, Ramon Leon <[hidden email]> wrote:
|
On 15.10.2010, at 18:19, Chris Curtis wrote: I'm a little late on this, but I thought it was worth mentioning a potential gotcha if you're *not* using something ActiveRecord-ish (that is, you're using regular GS-persisted objects): you can't make temporary changes to the objects. For example, you can't:I don't know what CQRS. I do all my stuff using magritte. Magritte is meta model description that has a lot of benefits. One is that if you generate a web component from an object the component gets a memento of that object as the model. All changes are written to the memento. If you later call commit on the memento it writes its values back to the object. If you don't commit nothing has changed. Norbert
|
On Fri, Oct 15, 2010 at 12:29 PM, Norbert Hartl <[hidden email]> wrote:
Ah, that's very cool. That just bumped "learn Magritte" to the top of my list. :)
CQRS is Command-Query Responsibility Segregation. It's a design pattern that essentially isolates the domain objects from clients behind Command and Query abstractions (which are then handled by separate services). There are a lot of really interesting architectures and properties that it enables, though some of them are somewhat less-important when all your objects can be live everywhere all the time. ;-) Anyway, here's a very comprehensive summary: http://www.udidahan.com/2009/12/09/clarified-cqrs/
Off to learn Magritte, finally.... --chris |
Free forum by Nabble | Edit this page |