<p>Jon, James,</p>
<p>Thanks for your thoughts and advice. I know Steve is familiar with GemStone but I&#39;m not sure whether he is aware of GLASS.<br>
No doubt he&#39;ll have further queries when he sees your comments.</p>
<p>Cheers,</p>
<p>Dirk</p>
<div class="gmail_quote">On 23/02/2012 10:07 AM, &quot;James Foster&quot; &lt;<a href="mailto:Smalltalk@jgfoster.net">Smalltalk@jgfoster.net</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Dirk,<br>
<br>
It is certainly true that having a relatively clean separation between the layers (infrastructure, domain, application, and UI) is a good design principle. And Steve is right that building a complex network of objects that cannot fit in memory is not very scalable.<br>

<br>
On the other hand, if you have a tool that allows you to act like you have a huge transactional object space that is shared by hundreds of concurrent sessions, where your &quot;stored procedures&quot; are written in Smalltalk, and Seaside support is built-in, then your prototype might not be so unrealistic. Have you heard of GemStone/S? Check out <a href="http://seaside.gemstone.com/" target="_blank">http://seaside.gemstone.com/</a>, and the various links from there, including my blog at <a href="http://programminggems.wordpress.com/" target="_blank">http://programminggems.wordpress.com/</a> and Dale&#39;s blog at <a href="http://gemstonesoup.wordpress.com/" target="_blank">http://gemstonesoup.wordpress.com/</a>.<br>

<br>
Feel free to ask more detailed questions...<br>
<br>
James<br>
<br>
<br>
On Feb 22, 2012, at 3:33 PM, dirk newbold wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I’m a relative newbie (4 years) to programming and seaside, who<br>
&gt; partnered up with some “old hands” (smalltalk/seaside is my first and<br>
&gt; only language).<br>
&gt;<br>
&gt; Initially we developed an Ecommerce (Istazaar) fashion platform for<br>
&gt; designers to maintain their collections.  We stagnated last year due<br>
&gt; to the time restraints on the “old hands” and I then began developing<br>
&gt; a web based Enterprise Software (Vivport) platform for<br>
&gt; document-management/knowledge-management/emails/tasks.<br>
&gt;<br>
&gt; We now have two ventures at relatively equal stages of development.<br>
&gt; I believe the Enterprise Software (Vivport) platform is the more<br>
&gt; innovative however, now that Steve (one of the “old hands”) has some<br>
&gt; time again he has been able to review its development (which<br>
&gt; unfortunately I built unsupervised) and has major concerns in relation<br>
&gt; to deploying this venture.<br>
&gt;<br>
&gt; Instead of building the database; then building middleware, then UI;<br>
&gt; I’ve basically just built a UI, Steve’s concerns with the outcomes of<br>
&gt; this development process are outlined in his email to me below.<br>
&gt;<br>
&gt; We were wondering if the smalltalk/seaside community has any views on<br>
&gt; Steve’s concerns below that may influence our decision on which<br>
&gt; venture to proceed with.<br>
&gt; The platform has been developed to freely change between the user’s<br>
&gt; personal account and their company(ies) account.  The personal<br>
&gt; accounts are free so we would be attempting to server many users.<br>
&gt;<br>
&gt; Any advice in relation to users/image, persistence, database, general<br>
&gt; deployment etc for this type of venture (essentially a beefed up<br>
&gt; gmail/cloud environment) would be greatly appreciated.<br>
&gt;<br>
&gt; Thanks for your time.<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Dirk<br>
&gt;<br>
&gt;<br>
&gt; ---------- Forwarded message ----------<br>
&gt; From: Steven Berryman &lt;<a href="mailto:Steven@berrymanelectrical.co.uk">Steven@berrymanelectrical.co.uk</a>&gt;<br>
&gt; Date: Sat, Feb 18, 2012 at 6:07 AM<br>
&gt; Subject: RE: Vivport V Istazaar<br>
&gt; To: dirk newbold &lt;<a href="mailto:dirkdirk@gmail.com">dirkdirk@gmail.com</a>&gt;<br>
&gt;<br>
&gt; Dirk,<br>
&gt;<br>
&gt; As mentioned I’m concerned with the approach you have taken with<br>
&gt; Vivport and in one way this technology can lead you into a false sense<br>
&gt; of how easy things are (trust me you couldn’t have done it in .NET or<br>
&gt; java without infrastructure). The difference with the ecommerce site<br>
&gt; is that there is little shared data and I knew that the only real<br>
&gt; issue was storing users but that would be a simple mapping issue to a<br>
&gt; table. Even the registered objects were designed to make storing in<br>
&gt; the database easier so objects didn’t directly hold onto a registered<br>
&gt; object. What you have built is a very complicated network of objects<br>
&gt; for the benefit of the UI which for a prototype is great but would<br>
&gt; never work in the real world. The type of project you are building<br>
&gt; with Vivport is infrastructure and in one way the last thing you<br>
&gt; should have done is the UI. One system I worked on had 3-4 months of<br>
&gt; designing the infrastructure before a line of code was written.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; The problem you have is that you have assumed that all objects would<br>
&gt; be in memory and are accessible via threads and this just isn’t<br>
&gt; possible. If I look at my local Microsoft exchange server it’s<br>
&gt; currently 50GB for 5 users and the machine only has 4GB of ram so not<br>
&gt; only do you need to deal with large amounts of data but you have not<br>
&gt; addressed any multi-threading issues. For example Smalltalk provides<br>
&gt; structures such as SharedQueue to deal with any shared data in the<br>
&gt; memory and I’m guessing you didn’t use these? When everything is in<br>
&gt; memory the world is very easy but for a system like yours you would<br>
&gt; need to start with the database and design the schema. Most searches<br>
&gt; would be done directly in sql (assuming you are using a relational<br>
&gt; database) so that way you reduce the amount of data going to the<br>
&gt; client. So when you open up Microsoft Outlook it will run a query on<br>
&gt; the database to get your inbox and the email headers so you don’t pull<br>
&gt; large amounts of data across the network. As you start to click on<br>
&gt; emails it will pull the data over as required.<br>
&gt;<br>
&gt; So here is an example to show multi-threading issues (I have not used<br>
&gt; your code but I’m sure you get the point)<br>
&gt;<br>
&gt; Lets’ assume you have a folder with 10 items<br>
&gt;<br>
&gt; Dirk - actions                                  Danny - actions<br>
&gt; folder items do: [ :item<br>
&gt; “goes through this loop twice”<br>
&gt;                                                     delete the last<br>
&gt; item in the folder<br>
&gt; “code falls over because the last element<br>
&gt; in the collection does not exist.” ]<br>
&gt;<br>
&gt; I’m sure you could try something like the above but you would need to<br>
&gt; put in a break point in the Dirk loop so you could then go in and to<br>
&gt; the removal from a different session. Now imagine the same thing with<br>
&gt; 5,000 users logged into your server all running threads across your<br>
&gt; code. Your code would have to be thread safe and this is not a simple<br>
&gt; task especially trying to do it on code not designed that way from the<br>
&gt; beginning. You could end up locking up all the other sessions if you<br>
&gt; don’t carefully design and keep your critical sections to a minimum.<br>
&gt;<br>
&gt; If you are using collections that are hashed they will fail in very<br>
&gt; strange ways if you have other threads removing or adding items as you<br>
&gt; are iterating through the collection. Basically in the ecommerce site<br>
&gt; we could sort of ignore the shared data issue as we shared very little<br>
&gt; data between sessions.<br>
&gt;<br>
&gt; Also you have added features that would be very expensive when using<br>
&gt; databases. For example the running man relies on the status of some<br>
&gt; piece of data and of course when everything is in the same memory<br>
&gt; space this is easy. In a database you would have to cross a<br>
&gt; transaction boundary and even the fastest database servers we have<br>
&gt; (costing 200k per server) you would be lucky for a single transaction<br>
&gt; to take between 1-10 milliseconds (costly when you scale up users and<br>
&gt; make too many database calls). This is why Microsoft exchange works<br>
&gt; the way it does as you can imagine how slow it would be if 5000 people<br>
&gt; logged into the server at the same time. So for most document<br>
&gt; management systems they would have a large database at the back end<br>
&gt; and all the searches would be done as stored procedures that could be<br>
&gt; based on some proprietary algorithm and none of this would be done in<br>
&gt; the language itself such as Smalltalk. Until you have a database<br>
&gt; schema designed you can’t even think about the UI.<br>
&gt;<br>
&gt; If you want to prove to yourself then try and create 100,000 users all<br>
&gt; with about 10MB of data and test to see if it works. See if you can<br>
&gt; log in a few sessions and send emails around.<br>
&gt;<br>
&gt; With the ecommerce site I could imagine how to add a database at the<br>
&gt; backend because it would be very simple. I would have no idea how you<br>
&gt; get this into a database even if you used an object database you would<br>
&gt; still need a defined object model. It’s also the reason why I liked<br>
&gt; the ecommerce site as it would be simple from the database end as it<br>
&gt; would only contain users, basic static data and designer’s data. Also<br>
&gt; I can see how we could have multiple servers to handler more traffic<br>
&gt; with the ecommerce site but would have no idea how we could do the<br>
&gt; same with your design.<br>
&gt;<br>
&gt; Hope this makes sense. Let’s catch up next week.<br>
&gt;<br>
&gt; Steve<br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div>