Is smartclient suitable? - extjs

How does the waiting time for SmartClient scale across thousands of users editing grids?
I have received warnings before that ExtJS would not be suitable.

SmartClient has a single grid component that does both horizontal and vertical incremental rendering, so it handles a very very large number of both rows (several million) and columns (several hundred) without degradation in performance.
All of the grid features supported by SmartClient - inline editing, grouping, filtering, dynamic frozen columns, sorting, reordering fields, drag and drop .. (too long to list) are supported by this single, high data volume grid component.
A number of users have run into scalability issues with the Ext grid component and discussed it here on the SmartClient forums:
http://forums.smartclient.com/showthread.php?t=2678
As far as scalability of the server, in reality the grid component contributes hugely to server-side scalability. Consider the adaptive filtering mechanism of the SmartClient grid:
http://www.smartclient.com/index.jsp#adaptiveFilter
This feature and the related "Adaptive Sort" feature cut down on 60-90% of the most expensive types of server hits (that is, those that access and filter/sort a large dataset).
SmartClient pervasively takes this approach of intelligently re-using data in order to avoid expensive server-side operations. A good overview is available in the ResultSet class documentation; the ResultSet is used as a cache management object by all components that work with datasets in SmartClient:
http://www.smartclient.com/docs/9.0/a/b/c/go.html#class..ResultSet

The number of users editing grids is not really relevant -- that's more of a question of how your application is designed to support load. If you are asking about performance relative to the grid component itself, the most relevant questions are about the grid's capabilities and how much data it can handle, not how many users will be using it over time.
I'm not familiar with SmartClient, but in the case of Ext, the grid performs very well for small to medium sized grid data (very approximately, up to ~50 rows per page, up to ~10 columns of data). Obviously this all depends on a lot of variables, but it is true that Ext's grid rendering time increases in direct proportion to the amount of data rendered at one time. This is because it uses a fairly heavy DOM under the covers, the trade-off being the rich feature set out of the box and the flexibility that is provided for creating customized nested row layouts. It does support paging to mitigate performance issues, and there is also a very popular extension that provides on-demand row loading (virtual scrolling) that enables higher-performance loading of large data sets. There's also an example of a lighter-weight and simpler version of buffered loading in the Ext examples that shows excellent performance with a lot of data.
Also, depending on your needs, there is a new lightweight ListView component in 3.0. It does not support all of the GridView's features, but if you primarily need a display-only grid, it might be a great alternative.
All of this is not to say that SmartClient is not good -- I have no idea. I just want anyone looking at this thread to have an informed decision on the Ext side of the equation since it sounds like you have received one-sided opinions on it.

thank you for your answer. I have been under the impression that the average-Joe entering a website with Ext would be discouraged when he was faced with a long loading time which was also increased if there were many people using the site.
This was the reason why I thought that SmartClient would be better but I haven't found any comparison between them. Maybe I was to hasty in disregarding ExtJS.
I will hope to get in contact with someone that has had experience from SmartClient to assist in developing my future site.
Thank you
Jez

Related

Does ATK4 have caching support?

I've gone through the documentation on ATK4, trying to find a reference point how to handle caching - partial or full page.
Seems like there is no entry on the matter. Strange from a framework that is built for scalability. Is there a way to cache DB queries, pages, views, etc?
Thanks for your question. (I'm the author of ATK4).
In my opinion, scalability and caching are two different topics and can be addressed separately. Framework approaches scalability by optimising queries and minimising load for each request and also designing approach where multiple nodes can be used to seamlessly scale your application horizontally. There is also an option to add reverse proxy to cache pages before they even hit the web server.
Agile Toolkit has support for two types of caching:
View-level caching
As you read documentation on object render trees - framework initialise and render recursively, so if you add "caching" support to a Page level, you will be able to intercept and retrieve it's contents from cache. You can also cache views.
Here is a controller which can be used to implement caching for you:
https://github.com/agile55/viewcache
Model level caching
Sometimes you would want to cache your model data, so instead of retrieving data from the slow database, you can quickly fetch the data from a faster source. Agile Toolkit has support for multiple model data sources, where a cache would be queried first and refreshed if it didn't contain the data. Here you can find more information or ask further questions:
http://book.agiletoolkit.org/model/core.html#using-caching
http://forum.agiletoolkit.org/t/is-setcache-implemented/62
Other Ideas
Given the object-oriented nature of ATK4, you can probably come up with a new ways to cache data. If you have any interesting ideas, our c

High performance pivot grid for pre-aggregated data

I have been tasked with coming up with a high performance front-end for a live ActivePivot back-end. I already have a client-side service layer that provides a continuous stream (IObservable<T>) of pre-aggregated, pre-formatted data, as well as metadata detailing the dimensions and what-not in the report. My requirements can be summarized as:
Dynamically set up row and column headers based on metadata in the stream.
Dynamically pass live data through to the appropriate row/column of the control.
Highlight changes to data. eg. increased values may highlight temporarily in green, decreased values in red.
Intercept user actions on row/column headers (ie. drill-downs) so that I can instigate a change in the underlying MDX query.
Intercept user actions (probably double-click) on data values so that I can instigate a drill-through query (the results of which would be displayed in a separate data grid).
All the third party components appear to be geared around slicing and dicing disconnected (or rarely updated) data sets. They sacrifice performance to achieve a higher degree of flexibility that I simply don't need, and performance is paramount for my scenario.
Does anyone know of a WPF control that is performance-focussed and geared more towards the viewing of pre-aggregated, pre-formatted data?
PivotTable-like frontends that allow slice and dice data exploration are in general associated with OLAP technology. Some of those frontends target one specific server, using a proprietary data model, and some others implement the standard: MDX queries over XMLA transport.
But when OLAP technology was designed 20 years ago, doing it in real-time seemed unthinkable. One consequence is that the XMLA standard has no support for updates in a cell set. Actually it practically forbids it because of the static representation of cell sets and cell set axis.
ActivePivot can push real-time updates into an OLAP result set and it exposes a (proprietary) streaming API to subscribe to those updates. The ActivePivot Live frontend was in the first place written to leverage those real-time updates, presenting them in familiar pivot table controls. But in 2013 ActivePivot is still the only OLAP server with real-time support. That explains why there isn't yet a standard to subscribe to OLAP real-time updates. And that also means that as of 2013 and outside of ActivePivot Live you will not find a toolkit (WPF or not) that has done the whole job of enriching its pivot table controls with real-time updates. The libraries we know of have actually transposed the static data representation of XMLA in their pivot table designs, making it cumbersome or impossible to update the cells (think of the Microsoft Excel Pivot Table for instance).
Under the constraint of a particular technology like WPF, I would select a general purpose UI toolkit, that makes it easy to arrange and compose tables. From there that's a D.I.Y. job.
Just in case anyone was wondering, I ended up writing my own WPF PivotGrid control specifically designed for high performance. It handles tens of millions of cells with hundreds of thousands of updates per second. Why anyone would want that much data in a single grid I don't know, but there you go.
It handles all the requirements I lay out in my question, and more. Can't share any more than this, however, as it's proprietary.

ExtJS 3.* chart uses too much memory

I am using Ext JS line chart with over 5000+ data. It uses too much memory especially on IE. How can I fix this leak or why it causes?
Both displaying 5k+ data points and processing it on client side are bad design decisions and should be avoided. Nobody can possibly comprehend this much data in one chart; that should be 10-12 points max or it becomes meaningless white noise. Client side processing in JavaScript is expensive, especially in older IEs; not only that, but you're also wasting time and resources transferring the data that is not going to be used.
The best solution is to modify your server side method to filter or aggregate data and provide UI access to these features.
Actually I have same Question , I do agree its not worth loading that much data but there are cases where I need to show drilling data in my ExtJs window.
Whose image is displayed below :
Here the points may go upto 15k data. Actually user wants to see the variations here rather than actual data. But he may need mouse over / zoom .
I achieved this with HTML5 plugin and adding this as an iframe.
Any words to achieve in ExtJs or how to go for this.

Fetching a large block of data using NHibernate

I have some 3 million rows of data to show on data grid using C#.
Currently using NHibernate to fetch data from database sqlserver 2005.
NHibernate takes lots of time to get data. Is there any way to retrieve data from data from database efficiently using NHibernate.
---Edit----
As the application has huge data to operate upon, loading all rows is just a worst case scenario. In a normal use user will load 10k rows. No of displaying rows can be minimised by using paging but as some rows are dependent on others I need to load all data while initializing the app.
NHibernate gets slow even with 1000 rows. Any suggestions to improve the performance.
Thanks.
You could use Stateless Session to get the data.
http://ayende.com/blog/4137/nhibernate-perf-tricks
http://darioquintana.com.ar/blogging/2007/10/08/statelesssession-nhibernate-without-first-level-cache/
But first ask your self do you really need to display millions of rows. What value does that give to your user? Can they easily locate the data they want?
Also, DataGrid itself will take a large amount of memory (regardless whether you are using Windows Forms, WPF, ASP.NET...). Memory to store the data itself, plus the memory to store additional DataGrid column / cell metadata.
Consider having only a subset of data instead. You could either allow the user to filter thru the data and/or add paging. Filter and paging can be translated to HQL / Criteria / Linq / QueryOver queries and eventually to SQL queries.
My recommendation here is not to use an ORM to fetch this size of data but then my second point is why would you want to fetch 3 Million rows of data and show it in a grid?
No user can possibly want to scroll through 3 Million lines of a table.
You could use a paged data system to request only the page you are viewing at any one time. Or you could filter the data for a smaller subset that the user is interested in.
If you have 3 Million records maybe the data needed is an analysis of those records.
I would take a look at some of these resources:
http://msdn.microsoft.com/en-us/magazine/cc164022.aspx
http://weblogs.asp.net/rajbk/archive/2010/05/08/asp-net-mvc-paging-sorting-filtering-using-the-mvccontrib-grid-and-pager.aspx
As the application grows in complexity and the data on which they thrive upon becomes complex, the generality of such OR mapping engines may lead to various performance and scalability bottleneck. Applications cannot scale linearly with the increasing transactional requirements. Caching is one technique which can enhance the performance of the NHibernate app. Infect NHibernate provides a basic, not-so-sophisticated in-process L1 cache out of box. However, it doesn’t provide features that a caching solution must have to have a notable impact on the application performance. So its better to use a 2nd level cache, it may help you to increase the performance of your Nhibernate App. There are many third party NHibernate 2nd Level cache are provider are available there but I'll recommend you to use NCache. Here is a good read about it,
http://www.alachisoft.com/ncache/nhibernate-l2cache-index.html

3rd Party Silverlight Grid Control

We are going through a process of selecting a 3rd party suite of controls for Silverlight 4.0. We're mostly interested in a feature-rich grid control. I'm surprised to find that most of the products out there focus on client side paging, filtering, sorting, and grouping. But if the dataset is large enough to benefit from these functions isn't also too big to bring to the client in one call? And doesn't this make most of the advertised fancy grid features useless? In my opinion 200 rows of data is ideal upper limit on how much I'd request from the server in one request. Yet the sites for Telerik, DevExpress, ComponentOne, Xceed, and others all have fancy demos that bring 10,000+ rows of data to the client and show off the ability to page, filter, group, and sort it. Who brings 10,000+ rows of data to the client? What if you have 1,000s of concurrent users? What if that data is volatile? What use-case does this really address?
Can you share your experiences with any of these control suites and whether you've implemented paging? Also whether you are using RIA?
Thanks.
You don't need a third party Grid control to achieve server side paging. You can use the grid control and ObjectDataSource provided by silverlight toolkit http://silverlight.codeplex.com/
http://borrell.parivedasolutions.com/2008/01/objectdatasource-linq-paging-sorting.html
I agree with you, it can be crazy for a client to want to view their entire years worth of data all at the same time, but sometimes the client (and product managers) don't see things the same way you do and insist upon doing stupid things....
In any case, just because the demo is paging through 1 million records that doesn't mean they are bringing them all to the client. You also have to consider the scenario where you have 200 rows worth of data but you can only show 10 rows at a time due to the data templates you are using (you may only fit 10 rows to a page) - you can still retrieve all 200 rows because it is simply your presentation that is using up the physical room. You can also implement paging and retrieve the next page worth of data when it is requested (which will introduce a small delay, but could be well worth it). Possibly the best way to deal with this is to not give the user the ability to retrieve squillions of records at once - if you give them that feature they will use it and then they will also complain about its performance.
As for fast client side sorting/grouping/filtering, that is a real world necessity. It is common for our users to fetch many thousands of records from the server, then use the filters (which i have extended) to view a handful of records at a time, operate on those records, then modify the filters to view a different bunch. It is important to have these functions working fast because it makes a huge difference to the user experience. I trialled several different component sets earlier this year and found there was a vast difference in the performance between them when it came to these functions, so choose wisely :)
I'd like to see a control suite that boast working with concurrency issues on order fullfullment and also uses queues or stacks in order to solve data conflicts. I see too often that this grids and list controls are really nice, pretty, and show you all the data, but they don't solve basic concurreny problems when you have more than one person working on the same set of data. If it automates the locking of a row of one user from another, prevents duplication of work, and automatically logs error messages, then I can see purchasing the control suite.
You don't need to load all your data at once you can specify a maximum load in the xaml of your ObjectDataSource. This will load your data in blocks of the specified size.
Take a look at the 2 RIA services videos here:
https://www.silverlight.net/getstarted/riaservices/
There are segments on paging which may also be useful to you.
note(some of the assembly references and syntax have changed slightly since these videos were made but the core function is still the same)

Resources