0

I have an architectural question related the Data Distribution Service (DDS). What are the downsides to using Objects imported from DDS directly inside your code for presentation to the user?

I'm working on a program that listens to a large amount of data from various sources and receives everything through DDS. What is the correct approach for handling the objects received via DDS? Or at least the pros and cons of each.

  1. Use them directly?

  2. Should I encapsulate and pass them through my code with accessors that wrap the fields of the DDS Object?

  3. Convert them to an equivalent business object (including corresponding enumerations) and pass my new object.

The second two options will allow the DDS Domain Object to change with minimal code changes, but is the up-front work of converting all of them worth the time it will take me? There is also some extra processing overhead in new object creation.

In the instances where I will be using JavaFX to display information, the third option is required to use bindings. For those particular instances, however, the objects will just be updated as new domain objects come in instead of recreated so the overhead for object creation is mitigated. That is not the case of all of the DDS data.

fabian
  • 80,457
  • 12
  • 86
  • 114
Dodd10x
  • 3,344
  • 1
  • 18
  • 27
  • I find when using DDS its better to spec early and try for the quick KO. – Jason V Aug 01 '17 at 17:50
  • A rather broad question. There are many things to consider. However you should probably use one of the latter approaches since they should be much easier to test/maintain. The second approach should be equivalent to the third one where code maintainance is concerned, if done properly. – fabian Aug 01 '17 at 18:37

0 Answers0