views:

37

answers:

1

I have a large system working on a set of data. My system is combined of several separated parts (like services) - the separation is based on a platform of sort. Throughout the system flow the set of data is altered and updated to a DB.

The platform I use allows communication between the different parts with XMLs. So, if one part needs to send some parameters to the other one, it can do so.

A question arises when some parts need to have that set of data the system is working on in its most updated state. It can receive it from other parts in the system in two ways:

  • Pass the entire set of data using the platform's XMLs (don't worry, the XMLs are persisted).
  • Pass only a reference to the data ID in the DB (remember?), and then query the data from it (assuming each part is responsible for updating the DB with modifications of the data).

Which way is better and why?
I guess there's no clear answer here, as it depends on the situation (the technology at hand, the system structure, etc), but I would like your answers nonetheless.

Thx.

A: 

I would prefer the DB ID and use the DB because you'll be working on updated online data, I think it's faster and you don't have data duplicity. Anyways I guess the "receiving" part of the system already needs access to the DB for it's own needs or to update the data processed.

laurent-rpnet