-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fleet-ms
and Lat/Long CSV capabilities to be more dynamic
#42
Comments
Having a new 'route' data type (and possibly a new microservice to manage it) seems to make sense. I'd imagine defining that data type as a list of lat/long pairs (the endpoints of which should fall within the bounding boxes of a port), plus an ID and/or name. There's going to be a relationship between the 'voyage' data type and the 'route'(s). We should think about what that's going to be, particularly if the simulation becomes perpetual. Here are some ideas:
For ease of creating / defining routes, rather than requiring routes to have a bunch of lat/long coordinates, we could include some concept of time ('steps' or 'days') that the route represents. Then the routes microservice could create the internal representation of those routes by interpolating between coordinates in order to create the required number of steps. This would simplify the data, but add complexity to the code, so I'm not sure if this is a good idea or not yet. |
I would like @jbcodeforce to chime in here as well, since he will have the original context as to how far this may or may not diverge from the original brainstorming session (and what downstream scenario documentation we would need to update). I think it makes sense (your bullet point 1 above) to have a data model which supports Ships taking Voyages and Voyages going along a Route. This ends up creating a 1:N relationship for Ships to Voyages (but only 1:1 at any given point in time) and an 1:N relationship for Routes being traveled by many Voyages. This would require the creation of a new Routes MS with CRUD capabilities and the inclusion of Route information into the Voyages data model (which shouldn't complicate things too much). We can then perpetually simulate the travel status of each individual Voyage along a Route, based upon the series of Lat/Long pairs stored in a given Route instance. This updated simulation would make the most sense to be contained in the existing Voyage MS (evolving into a voyage movement simulator), with the Reefer Simulator functionality existing outside of that and providing the exception/anomaly simulation to generate errors. Does this make sense? Are we thinking the same thing? |
What you @osowski say above about the data model Ships --> Voyages --> Routes makes sense to me. However, I have some doubts:
|
Definitely agree on point number 2 above @jesusmah , but clarifying your point number 1 should help. Routes are a separate data domain and would be handle by a separate Actor in the overall application. Ship Captains would need to work with Port Authorities and use their knowledge of international shipping lanes to register the route that their ship will travel for a specific voyage. By providing a Route MS serving up static routes (via lat/long lists), we are separating the ownership of the domain of route management from the other Actors in the system, while still providing them a way to interact with that set of necessary data. The Route MS could very easily evolve into using AI & Analytics to refine the lat/long pair lists - but that is when we start to veer away from the KISS principle for the time being. We could definitely introduce additional eventing into the system based on Weather Service updates, with the Voyage microservice checking back in for the next N bearings and if there is an affect on weather etc. But that is going way beyond what we need here.... So keeping it as simple as possible, yet still staying true to our separation of concerns, bounded contexts, and domain models, a Routes MS serving up static route lat/long pairs (with basic CRUD APIs) allows us to integrate Voyages to simulate the real-world example of the coordination of Actors across domains. When I mention CRUD APIs, this would allow us to create new routes via POST actions (starting simple with Point A to Point B, then scaling up to N points) instead of just a static CSV file or DB call. This would go more inline with ibm-cloud-architecture/refarch-kc#56 to remove the pre-canned data and encourage all demo / system-priming data to be inserted via REST APIs. |
@osowski @jesusmah For the sake of keeping things simple, I propose that I start off by extending either the voyages or fleets microservice to add the Routes functionality (I think it probably makes sense more in voyages?). It could be split out into a separate microservice later if we decided that was better (eg. if we did decide we wanted to make routes more dynamic). |
@djones6 I agree with your proposal. Based off of the Summary of microservice scopes, it makes sense to extend Voyages with the new Routes functionality and data model updates initially. Once this has been implemented, the |
I understand the thinking to have all hardcoded data removed and thus not having the static csvs. However, my intial feeling is that the movement of ships should be kept reasonably simple as it's kind of a given, in a shipping scenario, that there would be a fleet of ships moving. As another idea is that we could source a few historical shipping routes for a small fleet of ships in one specific area (e.g North Atlantic) and then use this to populate the initial routes? Mostly ships keep to the same shipping lane routes, these are quite well defined. We can then pick the corresponding ports (just a few at first) and these can be the ones we initially start with. This doesn't limit the ability to feed in new and more complex routes in the future but does give a mechanism for quickly starting up a realistic demo that could quickly highlight some of the other services that are more demonstrative of the eventing benefits we are trying to show. |
@djones6 yes, it does make sense to me as well to use the Voyage microservice to begin with the Routes functionality extension. |
I'm late in the discussion sorry. |
Initially the CSV coordinate files under
fleet-ms/src/main/resources
were supposed to allow ships to navigate a somewhat realistic path across the water, as a straight line between two ports was not usually possible.The CSV pattern used should be updated to either pull this information from an external source, import a new CSV file for pairs of Ports, or create a new microservice for route management.
The text was updated successfully, but these errors were encountered: