This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
A Service is a group of components to get a particular job done.
A new Service is an aggregate of two other Services with a few additional components but needs the messages from the other Services sorted by, say, a date.
One could sort XML files but wondered if there was a pattern that was more event driven.
What do you mean by "the messages from the other Services"? The incoming SOAP requests? The outgoing SOAP responses? Something else? What is this "date" you'd like to sort on?
Well, the aggregate Service would send a request to each of the other Services and get replies. Imagine there's a date on the replies denoting expiry dates of a product and the Service needs to sort on dates expiring early to use those first. [ August 04, 2004: Message edited by: Helen Thomas ]
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Ok. Sure. The new service can do that, convert the "records" it gets back into a common object representation, sort them, and do something with the one which expires first.
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
Without the Service having to specifically sort is there a way of making sure that replies fitting specific criteria like early expiry dates preceed later ones. It would be useful to have some middle Service layer doing this rather than re-inventing the wheel each time. The two Services sending replies don't know anything about each other. [ August 04, 2004: Message edited by: Helen Thomas ]
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
Thinking about it the latter is probably overkill.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Originally posted by Helen Thomas: Without the Service having to specifically sort is there a way of making sure that replies fitting specific criteria like early expiry dates preceed later ones. It would be useful to have some middle Service layer doing this rather than re-inventing the wheel each time.
You can't escape sorting the messages somewhere. Whether it's your new aggregating web service or a broker through which your aggregating web service invokes the back-end web services, someone somewhere has to figure out which of the currently available messages has the earliest expiry date. I strongly suggest starting out by putting the sorting stuff into the aggregating web service.
Helen Thomas
Ranch Hand
Joined: Jan 13, 2004
Posts: 1759
posted
0
Thanks Lasse that was helpful.
Amazon lets one build Web Services from their site. I'll take a peek and see what how they approach any similar problem.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.