Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Question about server side datasource

    I am currently evaluating SmartClient for use in our hosted application and have a few questions about the server side data source with regards to sorting, paging, filtering, etc.

    When implementing the server side data source, does the entire data set remain in memory, and as the user pages the appropriate page is returned from the static data source?

    The same question also applies to filtering and sorting, does the data source re query the database every time or just apply the sort/filter to an in-memory version of the data?

    How does group by work in this case? Or is this NA since grouping is done within the grid on the client itself?

    These questions may have obvious answers, but I want to add functionality to the grid to allow users to draw charts with group by fields and also to derive aggregates for group by fields in the grid. The charts and aggregates would need to change as the user filters the data, and if I am using server side pagination then I will need to calculate these on the server side. The charting functionality of the grid allows for charting, but it assumes that the each row of the data represents a separate series.

    Thanks!

    #2
    If you mean our built-in SQLDataSource, HibernateDataSource or JPADataSource, all of these do dynamic queries. We do not cache data on the app server.

    However there is extensive, advanced caching on the client side. See the ResultSet docs for details.

    The grouping operation (specifically the "Group By" built-in context menu) is done entirely client-side. In order to do, all data must already be present in the client.

    Comment


      #3
      Usage depends on your needs but I have used Spring caching on my service API where needed.

      http://static.springsource.org/sprin...tml/cache.html

      I haven't used it with SQLDataSource and other built-in datasources but you could possibly subclass it, declare is as a Spring bean, and use serverConstructor="spring:dsBeanName" in your ds.xml DataSource tag.

      I would only explore this option when making an expensive API call that returns static or mostly static data where you can employ cache refresh / eviction strategies.

      Comment

      Working...
      X