The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ssheth (1) [Avatar] Offline
I am designing a WebService which could be potentially used by multiple partners. Partners won't have access to the service until they sign a MOU.

The Business Entity exposed through this service has around 100 attributes. Different partners are interested in different (small) subsets of these attributes apart from the core identifying attributes like id, name, address etc. Also, the filtering criteria (Business Rules) for Business Entity varies from one partner to another. Applying Business Rules after retrieving 40,000 records is not a good idea. We don't want to hard code SQLs to retrieve data for each partner. We want the Rules Engine to determine the filtering criteria for partner specific query. Not sure whether we can use Oracle Rules Engine for the same of have to write our own simple rules engine.

Information retreived after calling this Web Service will be transformed to the format partners can undertand using ESB.
arnonrgo (62) [Avatar] Offline
Re: Please suggest pattern(s)
The details you provide are a little sketchy so I might be completely off

If you can divide the data partners are interested in into logical group you can brake this to multiple contract and use a different edge component (chapter 2) for each group that would connect to the same business logic internally. (if they are really distinct you might be looking at few services and not just one)

Additionally depending on the filtering you need you might be able to break this to several phases (Parallel pipelines pattern chapter 4) e.g. the first stop would be a search to retrieve candidate for the business rules based filtering (e.g. using something like SolR or ElasticSearch) , the second stop would be the rule engine (in addition to Oracle rules you can also take a look at other options like Drools) and the third stop formatting the result based on the partner's contract. if you'd go with this you'd probably also be using decoupled invocation (chapter 4) and request/reaction (chapter 5))

Regarding limiting access and discovery you'd probably need a service registry - your own or a product like sopera/amberpoint etc. (Service Registry pattern will appear in chapter 7 - not fully written yet)

In an enterprise solution you'd probably need some peripheral patterns for security, monitoring , location transparency etc, but they are not around the core-problem you describe)

Lastly 40,000 records with 100 attributes doesn't sound like much data - It seems like something you can keep in memory and if so it might be simpler to just build something to do the filtering (or use an in-memory solution like gigaspaces or gridgain that gives you query capabilities - again behind an edge component)