Announcement Announcement Module
Collapse
No announcement yet.
Service Data Aggregation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Service Data Aggregation

    Hello,

    I am looking for some suggestions on aggregating data from multiple services. Currently, I have multiple Spring based services that each have some type of stock data (pricing, sector/industry, earnings and revenues). In many cases I need to aggregate data based on a query request that could span multiple services (e.g. price > X and eps > Y). There could be a number of clients, so I don't want to aggregate at in the client layer which is something I have done in the past with some ugly looking code. If you have any ideas or have done something similiar and ran into some gotchas, I would appreciate any advice.

    Thanks.

  • #2
    Just create a couple of layers of DAO. Usually, one each per service, then an aggregation layer to aggregate the data from each service's DAO into a reasonable interface for your application. It seems like a little more work but maintenance will be easier. Plus, your DI setup will be less complex.

    Comment


    • #3
      Object querying and filtering

      I like the approach, but what about how to handle a particular query. For example, say I have a query like price > 25 and eps > 1.0. Now say I have one service that returns the data for price and one that returns the data for eps. Say the data is an object of a different class for each (e.g. Price class and an Earnings class). What is the best way to handle queries when needing to aggregate data across objects based on a search criteria. Should I use something like JoSql or JXpath. Does anyone have any other ideas?

      Thanks.

      Comment


      • #4
        If you have the chance to do it in the database, it would go for this solution. The database has a powerful query language, and executing it in the database prevents unnecessary retrieval of data.

        [second rule of optimization]
        you don't need to optimize what is not executed
        Last edited by Alarmnummer; Nov 2nd, 2007, 05:56 AM.

        Comment


        • #5
          I don't have any control at the database level. The services I mentioned and potentially other services are owned by different teams. So I have to go through all these services to collect the data.

          Comment

          Working...
          X