Forum Discussion
Hi Scott,
I am not sure I got the actual case...
By definition, (most of) web communication is stateless and HTTP is based on the request-response design.
The above means that web client and web server are required for the HTTP session and it is client who sends requests to the server and server responds to the request. As communication is stateless, this means that no coordination is needed.
Your scenario assumes two pairs of clients and servers. First client requests route from the server and the second client requests vehicle's position.
Web servers (and your mocks mimic web servers while they are absent) should not (and, usually, cannot) monitor whether the route for some vehicle was provided in order to start/allow provide coordinates for this given vehicle. If required, this must be a functionality of some intermediate back-end layer and I am not sure that you must implement its functionality. (As you are imitating web servers and their task is to provide the client with the route and current coordinates.)
Did I miss something essential in your scenario? What actual coordination you assumed?
P.S. Something that seems to be interesting and might appear to be relevant: https://restfulapi.net/hateoas/
I'll try to clarify my scenario.
A vehicle's route is planned by a user to occur at a particular time and submitted. When that vehicle is enroute, it's location is uploaded. A client requests the planned route from one service and requests enroute locations from a second service.
The planned route service's mock modifies a template response with times that are a short time in the future. The enroute track service's mock needs to modify it's templated responses to be within the the window defined by the planned route service's mock. This is the coordination I'm looking for.
Scott
- AlexKaras6 years agoChampion Level 3
Hi,
OK... How these services are expected to coordinate in the real life?
> times that are a short time in the future.
Just curious, whether these services are expected to be used within the same time zone? What if the route starts in one time zone and end in another one?
Meanwhile, if both mocks are implemented within the same SoapUI project, why not to create a custom project property and use it for coordination?
- ScottUFR6 years agoOccasional Contributor
Coordination in real life is a matter of process. A vehicle doesn't report its current position until it is enroute sometime after its planned time of departure.
All times are UTC.
The mocks are developed in a single SoapUI project, but are deployed as .war files during testing. Is it possible to deploy the project as a .war file?
- AlexKaras6 years agoChampion Level 3
Hi,
> Is it possible to deploy the project as a .war file?
I believe that yes it is: https://www.soapui.org/soap-mocking/deploying-mock-services-as-war-files.html
> Coordination in real life is a matter of process. [...]
Sounds unreliable (what if the first service is out of order? Does this mean that the second service will not be contacted/will not provide information until the first one is back to service?), but this seems to be irrelevant...
Related Content
- 7 years ago