PolyProcessInterface / ppi

2 stars 2 forks source link

Rework scenario #63

Closed n-peugnet closed 4 years ago

n-peugnet commented 4 years ago

I completely changed how the scenario works, but for good reasons. I added Jackson to be able to directly parse JSON files into a Scenario object. This makes it a lot easier to work with. Jackson is also able, via a maven plugin, to generate a json-schema for this class wich is cool.

Now a Message is an Event as every other event in Ppi. This way I could add a generic function for all events: Infrastructure.processEvent(Event e). This function can be used by every infrastructure which eases the adapter development (part of #51).

Also with this function and the Event interface we can have a Queue<Event> for mpi, so that there is only one thread that can run serialThreadRun()

n-peugnet commented 4 years ago

We could even parse the scenario File in Ppi and the call Runner.run with a Senario object instead of a file. But this could come as a later refactoring.

n-peugnet commented 4 years ago

Okay trop cool du coup je merge ça direct