-
Notifications
You must be signed in to change notification settings - Fork 0
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
Session transfer JSON format #1
Comments
I don't like your proposal. You are adding language specific terms and structure which might be ok, if you are transferring data within your application, but we have to generate the input in a different systems. To generate things like
will be a nightmare. |
Having said that … Can you imagine using a more generic JSON format @McWizard? If so, do you want to design it, or should I give it a shot? |
Well, the creation of the proposed format is the result of throwing my object-structure at xstream. That format is no more effort than 2 lines of code: XStream xstream = new XStream(new JettisonMappedXmlDriver()); If we define a new format from scratch, I'll have to write some kind of parser to read it which is totally possible but we'll have a writer on your side and a parser on mine. I'd only go that route if you really have problems creating the above format. |
How is It really smells to have this kind of implementation detail in the exchange. I have to write a parser anyway so there is nothing to gain on my side. And it would be a format that also is used by the webapp ... |
Oh if that's the only thing: How about something like this:
Would that be ok for you? |
And what I meant with generic is that if you plan to have another metric than Seats, let's say Number of Network-Ports, you can just add that to the rooms as features and to the sessions as preRequisites and you're set. That's why there's not a simple field called "Seats" in the interface... |
Ok, let's use the JSON as mentioned here |
For importing sessions to be optimized and to export the result the information needs to be transferred via JSON.
Proposal
This JSON format has been proposed by @McWizard
Background
Als Übersicht auch eine Konsolen-Ausgabe, damit man das JSON leichter versteht. Hier eine kleine Legende:
Die Session von Olga ist für 12 Uhr eingeplant und sie braucht einen Beamer. Das entspricht auch dem FixedDate (FD) von 12 Uhr. Daneben hat sie noch Wünsche (WD) angegeben (was bei FixedDate Blödsinn
ist). Die Wünsche waren entweder 10,11 oder 13 Uhr mit einer Strafe von 50 bei nichterfüllen. Die Kosten für diese Session waren 1320, was ziemlich viel ist, was aber klar ist, denn wenn man sich
anschaut wo sie ist, sieht man das sie im Overflow-Raum ist, also keinen eigenen Raum bekommen hat. (Waren halt auch nur 10 Interessenten da).
Zur Eingabe:
Man beachte so Dinge wie "FixedDate" und "WishDates", die sind Optional (sind aber in den Testdaten enthalten).
Jede Session kann angeben, wie schlimm die (nicht-)Erfüllung einzelner Kriterien ist:
Für Kriterien, die mit Zahlen beschrieben werden (sowas wie Sitze):
"unsatisfiedPenalty": 1000,
--> Das Kriterium gibt es in dem Raum gar nicht (haben wir aktuell nicht, da das einzige Kriterium "Seats" ist und jeder Raum das hat."notQuietsatisfiedPenalty": 20,
--> Wenn der Wunsch nicht ganz erfüllt werden kann, gibt es diese Strafe einmalig"differencePenaltyMod": 10,
--> Und dann noch für jeden Punkt Differenz zwischen Wunsch und Wirklichkeit diesen Wert (10 pro Seat)"positiveDifferencePenaltyMod": -1
--> Wird das Kriterium übererfüllt (also größerer Raum für kleinere Session) dann gibt es ein paar Bonuspunkte (1 pro Seat)Für Kriterien, die entweder da sind oder nicht (z.B. Beamer):
"penalty": 200
--> Kein BeamerDaneben gibt es bei jedem Uhrzeit-Wunsch noch ein penalty für dessen Nichterfüllung.
Und globale Penalties (am Ende der Eingabe zu finden):
"string": "NOT_MATCHING_FIXED_DATE",
--> Wenn das FixedDate nicht eingehalten werden kann"int": 10000
"string": "NO_ROOM_FOUND_AT_ALL",
--> Wenn eine Session keinen Raum bekommen hat"int": 10000
"string": "SAME_SPEAKER_TWICE_ON_A_DATE",
--> Wenn ein Speaker zweimal zur gleichen Uhrzeit auftreten müsste (Das ist natürlich schlimm, daher hohe Strafe!)"int": 1000000
--> Über die Höhe der Strafen müssen wir halt mal reden und so fragen klären wir:
Was ist schlimmer? 10 Plätze zu wenig im Saal oder keinen Beamer?
Geben wir den Leuten die Möglichkeit ihre Wunsch-Daten auch mit einer Stärke zu definieren? Also so was wie: Ich würde gerne um 8 vs Ich bin um 8 noch nicht da?
...
Zur Ausgabe:
Bei der Ausgabe wurden autmatisch Overflow-Räume hinzugefügt, weil es mehr Sessions als Räume waren.
Daneben gibt es die "OccuredPenalties" (entspricht dem "cost" von der Konsole). Ein kleiner Wert bedeutet, dass die Session sich dort wohl fühlt, große Werte deuten auf Unschönheiten (zu kleiner Raum, fehlender Beamer, nicht erfüllter Zeitwunsch) hin .
The text was updated successfully, but these errors were encountered: