Grasping the concept of Classes & Categories

Daniel Salama dsalama at user.net
Mon Jun 20 01:53:30 UTC 2005


David,

On Jun 17, 2005, at 4:32 PM, David Mitchell wrote:

> Hey Daniel,
>
> I haven't done a site yet with Seaside, but I've used Smalltalk for  
> public corporate web tier stuff before (insurance). I would rather  
> have several less powerful machines for each application than one  
> big machine. Of course, I had a paying sponsor who agreed with me  
> that hardware is cheap whereas failures and programmers are expensive.
>
> I'd prefer at least two machines per application. A failure in one  
> machine/image wouldn't threaten the running application from the  
> end-user perspective. Nor would it threaten other applications. I'd  
> put Apache on a separate machine too. Same for the backing store  
> (whether Magma -- hi Chris, GOODS, or a RDBMS). Making it so your  
> app can run on several machines makes it easier to add machines to  
> support load.

That makes 100% and that's how I would do it as well. However, given  
that I don't have a sponsor, I have to deliver first and then get a  
sponsor.

>
> Of course, you need enough memory to handle everything. 2GB might  
> be a lot or not enough, depending on what each one of those 10,000  
> or 500 records are doing. Looking at just the 10000. There is  
> probably an uneven distribution (different customers will have  
> different usage patterns). Maybe 60% of that traffic wants to enter  
> during your peak hour, so 6,000 per hour at say 1:00 P.M. local  
> time. If they timeout at 20 minutes...
>

That's an interesting issue. I would need to carefully monitor memory  
usage. Are there any docs that can help me incorporate some memory  
usage analysis of squeak on a per application basis?

> Anyway, I would expect that the CRM and Medical systems would have  
> very different usage characteristics and load patterns. The real  
> answer is to test and find out. Luckily Squeak has an Http client  
> whose guts you can script.

That's true. I didn't think about using Http client but I guess that  
would be a good way to design and implement some test scripting.

>
> --David
>

Thanks,
Daniel

>
>> Chris,
>>
>> That's a very interesting perspective. The thought crossed my  
>> mind,  but then I thought of another "issue" which is what  
>> prompted me to  ask the question to the list.
>>
>> Originally I thought I could simply just run an image for each of   
>> these specialized applications. For example, one could be a  
>> Customer  Relationship Management system, while the other is a  
>> Medical Billing  system. Both systems have different views of what  
>> a Customer is and  it would make sense to run them in separate  
>> images.
>>
>> However, given my limited resources for hardware (mainly), I  
>> wasn't  sure if I could, efficiently, run two Squeak images, each  
>> with  Seaside listening on different ports and both front-ended by  
>> Apache  on a single machine. I wasn't sure how two images could  
>> run on the  same machine in terms of performance, processes,  
>> memory, etc.  Assuming these would run on a dual-Xeon machine with  
>> 2GB RAM, would  that be feasible?
>>
>> To some degree, I guess the question will depend on the traffic  
>> load  on the machine, but I would guesstimate that, for example,  
>> the CRM  system would handle about 10000 contacts a day (by  
>> contact I mean  customer record inquiries, or logging call  
>> attempts, etc) and maybe  about 500 medical bill records per day.  
>> If anyone has some experience  in these industries, you can  
>> guesstimate some sort of traffic load.
>>
>> I don't k now if I'm being too vague or worrying too much about   
>> something that hasn't been materialized yet. I just like to plan  
>> ahead.
>>
>> Thanks,
>> Daniel
>>
>> On Jun 17, 2005, at 11:50 AM, Chris Muller wrote:
>>
>>
>>>> I have two applications that both need a class Customer.  
>>>> However, one
>>>> of the application requires that class Customer have a set of
>>>> attributes and methods very different from the second  
>>>> application who
>>>> uses the class Customer for a totally different industry.
>>>>
>>>>
>>>
>>> Hi Daniel, for me, the key to the answer to your question is the   
>>> phrase
>>> "totally different industry."  If this is true, it seems there   
>>> would be little
>>> chance that the Customers would need to be in the same running   
>>> image, nor would
>>> they need to be developed together.
>>>
>>> Therefore I wouldn't worry too much about trying to factor the  
>>> two  Customer
>>> classes into a single, grand Customer superclass, if it won't  
>>> ever be
>>> commingled in practice.  In fact, doing so could potentially   
>>> increase cost.
>>> For example, the two groups of developers may have their own  
>>> ideas  about what
>>> belongs in the generic superclass Customer.  So then you have   
>>> developers
>>> spending time reconciling code by two completely disparate  
>>> industries.
>>>
>>> Even if theres a remote chance of the two programs needing to co-  
>>> exist in an
>>> image, you can use refactoring-tools to meld the code at that   
>>> time.  But keep
>>> it simpler in the meantime.  Remember, if you can solve the  
>>> problem  of ultimate
>>> malleability of software, you no longer need to worry about up-  
>>> front planning
>>> of "ultimate" classes..  We still need a balance of both, but I   
>>> believe the
>>> future is in the former.
>>>
>>> That's my view, anyhow..
>>>
>>>  - Chris
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>




More information about the Squeak-dev mailing list