Upload
nljug
View
123
Download
0
Embed Size (px)
Citation preview
Real-time user interfaces Omdat het dingen makkelijker bleek te maken
Allard Buijze – [email protected]
JFall 2014
Allard Buijze
CTO van Trifork Amsterdam
Organsatoren van GOTO & QCON
Gelooft sterk in DDD en CQRS
Ontwikkelaar en initiatiefnemer van Axon Framework
Java Framework voor schaalbaarheid en performance
www.axonframework.org
http://www.anwb.nl/bestanden/content/gallery/anwb/etalages-en-productheaders/wegenwacht/wegenwacht.jpg
http://www.avex.nl/sites/avex.be/files/img_2774_0.jpg
Voertuiggegevens
Ledenbestand
Geo data
Contractgegevens
Rechthebbendheid
Inkoopsysteem
Facturering
Real-time?
WebSockets
?
WebSockets Stomp
Headers
Payload
SockJS
!
!
Stuur Events naar UI
Initiële state duurt te lang
! !
Stuur Events naar UI Kopie van model op server
Dubbele logica, in twee talen onderhoud
!
Kopie van model op server Stuur model naar UI na wijziging
Groot model. Zonde van dataverkeer.
! Δ
Kopie van model op server Stuur delta naar client
{
"op": "add",
"path": "/biscuits/1",
"value": {"name": "Ginger Nut"}
}
{
"op": "remove",
"path": "/biscuits“
}
Json Patch (RFC 6902)
+ = add
remove
Json Patch
Δ = add
remove
Json Patch
>>> SUBSCRIBE id:sub-4 destination:/query/cases/26b3013d-e847-4ac9-894f-85e6c51969a1
<<< MESSAGE destination:/query/cases/26b3013d-e847-4ac9-894f-85e6c51969a1 action:patch message-id:1-148 content-type:application/json;charset=UTF-8 query-result-type:update subscription:sub-4 type:value content-length:65 [{"op":"replace","path":"/voertuig/kmstandMelding","value":null}]
S1
Verzenden initiële data
Hulpverleningsplan MetaData Melder Voertuig
>>> SUBSCRIBE id:sub-4 destination:/query/cases/26b3013d-e847-4ac9-894f-85e6c51969a1
<<< MESSAGE destination:/query/cases/26b3013d-e847-4ac9-894f-85e6c51969a1 action:extend message-id:1-145 content-type:application/json;charset=UTF-8 query-result-type:initial subscription:sub-4 type:value send-only-to:1 content-length:737 {"samenvatting":{"label":{"labelId":"Opel Assistance"}, "caseNummer":"14103100570", "externReferentienummer":null,"klantRegisseurUsername":"p280323","voertuig":{"kenteken":"90SNSV","merk":"opel","type":"ASTRA"},"polishouder":null,"telefoonnummer":"+31612345678","meldergegevens":{"naam":"Pechögel","aanhef":"Dhr."},"contractName":null,"schadeDatum":"2014-10-31T08:30:33.997Z","meldingsDatum":"2014-10-31T08:30:34.082Z","storingsOmschrijving":null,"status":"INTAKE","redenAfsluiten":null,"voertuiglocatieDescription":null,"voertuiglocatieDescriptionSecondary":null,"pechlocatieDescription":null,"pechlocatieDescriptionSecondary":null,"productName":null,"spinLink":"https://spin.anwb.nl/ibu/hvd/Paginas/opel_assistance.aspx"}}
!
√
>>> SEND command-id:commandc31819f2-aafc-444c-ec37-771322ce7970 reply-to:/query/command-reply/cliente9687c33-7143-4d09-eb09-d6cd9203b6fd destination:/command/intake.voertuig.UpdateVoertuigGegevens content-length:553 {"caseId":"26b3013d-e847-4ac9-894f-85e6c51969a1","voertuig":{"kenteken":"90SNSV","merk":"opel","type":"ASTRA","kleur":"6","registratieLand":"NL","brandstof":"1","brandstof2":null,"chassisNummer":"W0L0AHL486513","meldCode":"5756","voertuigsoort":"1","kmstandMelding":null,"dealerOnderhouden":true,"kmstandLaatsteBeurt":25000,"datumLaatsteBeurt":"2014-10-09","automaat":null,"fourByFour":null,"lengte":425,"hoogte":146,"breedte":176,"gewicht":1130,"datumEersteToelating":"2006-03-16","datumVervalAPK":"2014-10-29","isWamVerzekerd":false,"aanhanger":null}}
<<< MESSAGE command-id:commandc31819f2-aafc-444c-ec37-771322ce7970 destination:/query/command-reply/cliente9687c33-7143-4d09-eb09-d6cd9203b6fd message-id:1-153 content-type:application/json;charset=UTF-8 subscription:sub-2 type:success send-only-to:1 content-length:0
topic
topic
topic
http://www.staples.com/Staples-Easy-Button/product_606396
Vragen?
Ook werken aan real-time systemen?
Trifork zoekt enthousiaste ontwikkelaars en architecten
Stuur een mailtje naar [email protected]
of spreek Allard aan tijdens JFall