<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Application Architecture</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Application Architecture</description>
  <pubDate>Wed, 13 May 2026 22:40:57 -700</pubDate>
  <lastBuildDate>Mon, 01 Aug 2011 11:31:52 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2847</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Application Architecture : Thanks, Ting. That sounds like...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11334#11334</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 01-Aug-2011 at 11:31am<br /><br />Thanks, Ting. That sounds like a good solution.&nbsp;]]>
   </description>
   <pubDate>Mon, 01 Aug 2011 11:31:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11334#11334</guid>
  </item> 
  <item>
   <title>Application Architecture : The code you show seems to meet...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11315#11315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 27-Jul-2011 at 7:26pm<br /><br />The code you show seems to meet your needs.<div><br></div><div>I would put a lock inside NotifyClients to guard against multiple concurrent calls since it's not re-entrant. This is just in case you have multiple save requests pending. If that becomes common, then you'd want to look at placing the entitiesUpdatedInfo into a concurrent queue on one thread (in the EntityServerSaveInterceptor), and pulling it out of the queue in another thread (the while loop of the Subscribe method). This prevents blocking on the save which could cause timeouts with heavy traffic (your current use case wouldn't worry about this though).</div><div><br></div>]]>
   </description>
   <pubDate>Wed, 27 Jul 2011 19:26:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11315#11315</guid>
  </item> 
  <item>
   <title>Application Architecture : One of the downsides in the DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11311#11311</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 26-Jul-2011 at 8:58pm<br /><br />One of the downsides in the DevForce push is I have to keep the main method open, below is the code I have come up with, please feel free to critique and improve upon. <br><br><table width="99%"><tr><td class="BBquote"><br>public class EntityServerSaveManager : EntityServerSaveInterceptor<br>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected override bool ExecuteSave()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var em = EntityManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ok = base.ExecuteSave();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ok)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var entityTypes = new&#091;&#093; { typeof(Product), typeof(ProductSpecial) };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var entities = EntityManager<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FindEntities(EntityState.Added | EntityState.Deleted | EntityState.Modified)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .OfType&lt;Entity&gt;()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Where(t =&gt; entityTypes.Contains(t.GetType()))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ToList();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityUpdateService.NotifyClients(entities);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ok;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br></td></tr></table><br><br><table width="99%"><tr><td class="BBquote"><br>&nbsp;&nbsp;&nbsp; public class EntityUpdateService<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private static Guid _serviceKey;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private static INotificationManager _notificationManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private static POSEntities _entityManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private static bool _isInitialized;<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void Subscribe(Guid serviceKey,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INotificationManager notificationManager,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityManager entityManager)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _serviceKey = serviceKey;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _notificationManager = notificationManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _entityManager = new POSEntities(entityManager);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _isInitialized = true;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (_notificationManager.GetSubscribers(_serviceKey).Count &gt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Threading.Thread.Sleep(1000);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _isInitialized = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void NotifyClients(IEnumerable&lt;Entity&gt; entities)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!_isInitialized)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (entities.Count() == 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var cacheState = _entityManager.CacheStateManager.GetCacheState(entities);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var entitiesUpdatedInfo = new EntitiesUpdatedInfo<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CacheState = cacheState<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _notificationManager.Send(_serviceKey, entitiesUpdatedInfo);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br></td></tr></table><br><br>Is there a better way to do this than having to keep calling sleep in the original method?<br>]]>
   </description>
   <pubDate>Tue, 26 Jul 2011 20:58:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11311#11311</guid>
  </item> 
  <item>
   <title>Application Architecture : Hi Ting, You are pretty much spot...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11310#11310</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 26-Jul-2011 at 7:03pm<br /><br />Hi Ting, <br><br>You are pretty much spot on.<br><br>The backend is where the product maintenance (Price changes, etc) are done and for storing sales history<br><br>The hybrid architecture is what I have come up with so far. The Interface submits the changes to the Frontend Server ( BOS) and I'm using the EntityServerSaveInterceptor to push the changes to the tills. Right now I'm using NServiceBus to push the changed entities to the clients.<br><br>What is the best way to integrate DevForce Push service with the EntityServerSaveInterceptor? Would I setup my server method&nbsp; then access the static variables from the interceptor?&nbsp; I'm not sure of the best practices of using the push service outside of a standard server method.<br>]]>
   </description>
   <pubDate>Tue, 26 Jul 2011 19:03:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11310#11310</guid>
  </item> 
  <item>
   <title>Application Architecture : Hi Mark,I&amp;#039;m still trying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11309#11309</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 26-Jul-2011 at 6:35pm<br /><br />Hi Mark,<div><br></div><div>I'm still trying to educate myself on your diagram. As I understand it:</div><div><br></div><div>Till = Point of sale terminal (e.g. cash register)</div><div>Frontend Server = DevForce BOS</div><div>Backend = Purchase fulfillment system</div><div>Interface = Admin console and service that marshals purchases to the Backend?</div><div><br></div><div>With Option 1, we haven't specified how the Frontend Server will know which updated records to push to the Tills. You either need to tell it explicitly, or just notify it that something has changed at time X, and it will find everything that has has a modification timestamp after X.</div><div><br></div><div>There may be a hybrid architecture that makes sense. You have the Interface submit the changed entities to the Frontend Server as part of a typical save. In the EntityServerSaveInterceptor, you tell the DevForce Push service which entities have changed after the save is complete. The Push service then notifies all the Tills of the updates.</div><div><br></div>]]>
   </description>
   <pubDate>Tue, 26 Jul 2011 18:35:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11309#11309</guid>
  </item> 
  <item>
   <title>Application Architecture :     I am looking at designing...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11298#11298</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2847<br /><strong>Posted:</strong> 25-Jul-2011 at 8:39pm<br /><br /><p ="ms&#111;normal"="">I am looking at designing a Point of Sale system and I had afew questions regarding architecture. The below diagram is how I have envisioned it so far.<br></p><p ="ms&#111;normal"=""><span style="mso-no-proof:yes"><a href="http://img189.imageshack.us/img189/3523/diagrams.png" target="_blank">http://img189.imageshack.us/img189/3523/diagrams.png</a><br></span></p><p ="ms&#111;normal"="">I am planning on using DevForce with NServiceBus. In case ofoutages the tills absolutely have to have the latest products at all times. Ihave a couple options for how to implement this.</p><p ="ms&#111;normal"="">When the tills startup they will do a complete refresh ofthe Product and lookup tables.</p><p ="ms&#111;normal"="">Option 1:</p><p ="ms&#111;normal"="">The interface will be responsible for updating prices andproduct changes. Rather than having the tills poll for item updates, the FrontendServer (BOS) will then retrieve the updated items and push them (Either withNServiceBus or DevForce) to the tills. </p><p ="ms&#111;normal"="">Option 2:</p><p ="ms&#111;normal"="">Another option is having the interface push the productchanges to the Frontend Server, making it responsible for the actual updatesand then pushing the changes to the tills.</p><p ="ms&#111;normal"="">When an order has been completed the tills will send amessage to the Frontend Server which will push a message to the Interfacetelling it to export the order to the backend.</p><p ="ms&#111;normal"="">Does either of these seem like reasonable options? </p><p ="ms&#111;normal"="">As it stands right now the tills will not actually use DevForceto query, other than perhaps the startup code. </p><p ="ms&#111;normal"="">Any thoughts?</p><p ="ms&#111;normal"="">Thanks,</p><p ="ms&#111;normal"="">Mark</p><p ="ms&#111;normal"="">&nbsp;</p><span style="font-size:10px"><br /><br />Edited by smi-mark - 25-Jul-2011 at 8:40pm</span>]]>
   </description>
   <pubDate>Mon, 25 Jul 2011 20:39:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2847&amp;PID=11298#11298</guid>
  </item> 
 </channel>
</rss>