Results 1 to 5 of 5

Thread: Service Data Aggregation

  1. #1

    Default 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. #2

    Default

    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.

  3. #3

    Default 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.

  4. #4
    Join Date
    Nov 2004
    Location
    Hilversum - The Netherlands
    Posts
    1,054

    Default

    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 at 04:56 AM.

  5. #5

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •