Recommended

Skip Navigation LinksHome / Articles / View Article

Ian Burt on performance issues with RIA services and a bit more

+ Add to SilverlightShow Favorites
2 comments   /   posted by Emil Stoychev on Nov 25, 2009
(9 votes)
Categories: White Papers

Building N-Tier business applications with technologies currently in a CTP version (facing WCF RIA Services, formerly .NET RIA Services) could be not the easiest job. One of our recent articles was on this topic (Building N-Tier business applications with .NET RIA Services – Part I) and Ian Burt joined the discussion expressing his thoughts on performance issues. That provoked us to have an interview with him to share his experience and position on that topic.

Introduction

Ian BurtMy name is Ian Alexander Burt I am a 45 year old Software engineer from Scotland that currently lives in Madrid, I have been in the software industry for 21 years and am currently running my own company. Nexus Investigación y Desarrollo is a Spanish based company with 5 employees. Nexus has specialized in AVL solutions, we have developed some ISV solutions and we also provide Project direction for Bespoke solutions, such is the case of IKHNAIE.

Ian, in your comment on our recent article on Building N-Tier business applications with .NET RIA Services you brought up performance issues with RIA Services that your team faced while working on a Silverlight application. Could you tell us more about the project you are working on, and how you isolated the problem?

We are developing a large AVL & Logistics platform "IKHNAIE", the application will be deployed in the 10 countries my customer has ongoing operations. And will replace a previous solution that has been running for the last 10 years. The business models have shifted a great way over these years and the current system was not scalable, so we needed a redesign from bottom up. This gave us a chance to reconsider platform and technologies. The current system is built in php on a Linux server and a Postgress Data base. We had decided to have a Silverlight front end and figured that the expertise of the development team had to be in C#, this opened the door to move the service layer to C# also with WCF, so we needed to decide the DB layer and we have opted for a flexible choice (MSSQL 2008, Oracle and Postgress). Having decided this we went around looking at Nhibernate and Entity Framework we decided on EF because we were looking in to .Net Ria Service and it made sense to stick to one single technology. We started off, and in the first month of development we had 4 controls that used the Ria Services including the login page, we decided that the login was best fitted with WCF and moved it; too our surprise the login performance was at least 6 times faster. We started looking at performance with the rest of forms and controls we realized that they were very slow we decided to leave them as was and continue new controls or forms in WCF the difference was in all cases’ at minimum 6 times faster (stopwatch in hand), however the development process was much more complex and took longer in WCF it was a better option. We have moved all the other controls to WCF excepting two that will be migrated in this sprint. We dedicated a one day spin of two developers to do a bench mark and the results where final WCF vs. .Net Ria Services WCF wins every time. Finally our solution makes intensive use of spatial data neither EF or L2S manage the Spatial Data Type so we have also had to move some functionality away from EF and do it the raw way.

Did you find any workaround or solution for the problem? How did you proceed?

No we did not find a work around, we figured that it was a CTP product and that it was also new technology and would need some time to mature, and we didn’t have the time and decided to go the WCF way. However we are looking out and waiting to see if a RTM come out so we can re do our testing and in development of new features of the application we give it good use.

We understand that providing a rich, user-friendly and intuitive user interface is a major challenge in this project. How did you decide to use Silverlight to achieve this interface, and did you manage to fully meet your goals? It is a general opinion that Silverlight, despite all its cool features, is not yet fully ready for commercial applications.

Silverlight is the perfect platform for what we need, we can build very rich UI and enhance usability with lots of the SL features, in mapping applications such as AVL the fact that the page does not need to repaint itself and can dynamically move where you can draw an move your objects freely on the map is the kind of UX we were looking for. As to this day we have been able to achieve almost everything we have set out to do. Some issues with printing and some other with keyboard control in full screen mode, but other than that we are happy. The good news is that it has been announce that these two issues will be solved in version 4 of Silverlight.

In terms of costs, do you think that using Silverlight for this project is a cost-efficient solution? How did it compare to other technologies you were evaluating? Will it save costs in the long run?

We compared some other options such as Flash with Flex and we came to an understanding that it was easier and cheaper to train on designer to use Blend and SL, than it was to train 7 developers to write Flex. This has save money so far and will continue doing so in months to come.

Which were the top three reasons that made management decide in favor of using Silverlight for this project?

They ask my company for a platform and architecture, I did my research and I proposed one solution. The cost, the integration with .Net languages and the Time to Market where the key factors.

Nexus

I understand that the business application you are working on is a very large one. Undoubtedly, in addition to the performance issues with using RIA Services you also came upon other problems. Could you tell us more about them, and how you managed to resolve them?

Managing hundreds of WCF services and the topology we have built over 20 Services and more than 300 methods and there is many more to be done, the solution was to have dynamic master service address broker that when you need a service in a new location it will get you the URI form a DB depending on availability. Our UI has several levels of custom made controls that heed to pass information between each other we have used a notify observer model to provide communication between controls. Also xap loading, the application is split out over a number of xap file so we have the needed to dynamically load them in the back ground so the on demand load does not impact performance, we have built a dynamic loader that seeks a context driven XAP load order from the DB depending on the task that the user may be doing, we anticipate his next need of UI and load the necessary modules. Finally we have needed to create a GAM Global Application Memory space where we handle all the loaded controls that can be saved to the Isolated Storage if necessary in the event of a network disconnection.

What are the technologies used in your project, and what challenges are associated with them?

VSTS 2008 SP1, Expression Suite 3, WCF, Workflow Framework, Entity Framework, Silverlight, Deep Earth, AgDataGrid, Windows 2008 R2, SQL Server 2008 (R2) may be for release 1, Reporting services, share-it reporting control.

What major improvements would have a crucial impact on the adoption of Silverlight for business applications?

I would say that .net Ria service if the performance comes up to needs would be the biggest, good integration with globalization and regional user settings.

Share


Comments

Comments RSS RSS
  • RE: Ian Burt on performance issues with RIA services and a bit more  

    posted by John on Dec 18, 2009 20:36

    We are running with WCF RIA 3.5 and it works wonderfully well, accept when we have a large number of related entities that we pull back. 

    Has anyone found/developed a prescriptive guide that would assist us in optimisation of WCF 3.5 until we switch over to 4?

    From all that we can tell, it appears the largest delay is not at the database, but rather in the creation of the Entity query. In one particular scenario, while debugging of the code, it appears to take 3 seconds after exiting the service call, to when the SQL is issued to the database. The SQL call within the database is in most cases under 100 milliseconds, so it appears like the framework is taking a large amount of time to prepare the statement. 

    Thoughts?

  • RE: Ian Burt on performance issues with RIA services and a bit more  

    posted by Jack on Jan 08, 2010 17:40
    We have an application developed on tradition .NET ado which is pulling and pushing large business data, we have performance issue now, should we reengineer with WCF and SL?

Add Comment

 
 

   
  
  
   
Please add 3 and 8 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)