World®’16
PreCon Ed:ReactiveLogic
ValHuber,ConsultingEngineer,CA
D03X101LV
DEVOPS
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
APIsareatthecenteroftheAppEconomy,providingconnectivityforomni-channelbusiness,
includingWeb/mobileapps,partnersandon-premises/partnersystemintegration.Butinthe
past,they’vebeenquiteachoretobuild.Inthissession,youwillbuildanddeployEnterprise-
classAPIs,completewithsemanticsforlogicandsecurity.You’lllearnaboutReactiveLogicand
howtoenforcesecuritydowntotherowandcolumnlevel.You’lllearnhowtotestyourAPI,
bothwithCALiveAPICreatorandindustrystandardapproacheslikeCurl.Nopre-knowledgeof
RESTfulAPIsisrequired.Infact,thisisagreatsessiontolearnexactlywhatAPIsareallabout.
ValHuber
CATechnologiesConsultingEngineer
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
WHYAPIS
WHAT’STHEPROBLEM
OURAPPROACH
WHEREAREWENOW
TODO:CHECKCREDITLOGICFORNORTHWIND
1
2
3
4
5
SUMMARY6
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
APIServers…EnablingtheAppEconomyWiththeAgility toCompete
Web
Mobile
Partners
WebHooks
DBsAPI
Server
OmniChannelBusiness
Shippers,Suppliers
1Integration
3
2
Logic
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
APIServers– WayMoreThanRestEnterprise-classAPIs…NotToys
Logic
Integration
DataAndhere’swheretherealworkis
NestedDocumentsPaginationOptimisticLockingAPI
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
APIServers…EnablingtheAppEconomyConventionalApproachProvides…Stubs?!!
Web
Mobile
Partners
WebHooks
DBsAPI
Server
OmniChannelBusiness
Shippers,Suppliers
1Integration
3
2
LogicRaml,SwaggerStubsRestify Schema(?)
YourCodeGoes..Where?
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
APIServerAgilityfortheAppEconomy
Web
Mobile
Partners
WebHooks
DBsAPI
Server
OmniChannelBusiness
Shippers,Suppliers
1Integration
3
2
Logic
APILogic- Automated
IntegrationLogicClientLogic§ Read/Write§ Display§ MobileAppServices
ReactiveLogic§ Multi-TableDerivationsandValidations§ Row/ColumnSecurity§ Extensible– JavaScript,Libraries§ AutomaticObjectModel
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhereAreWeNow
1. StartLAC3/Start.bat
2. StartChrome– clickbookmark
Alreadyinstalled(JDK,unzip)– togetstarted…
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Developers
BusinessUsers
ExistingDatabase
NewDatabase
Create/Customize
API
ReactiveLogic&Security
CustomClientDev
CreateDBServer
DBCoding Parallelized
DevelopmentActivities
Iterate
Bottom-Up
Top-Down
Code-First
Northwind
HowThreewaystostart;stayparallel;iterate
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Whycan’twejustmakethisexecutable?AsanAPI?
ReusedOver…ü AddOrderü DeleteOrderü PayOrderü Un-payOrderü MoveOrderü AddItemü DeleteItemü ReselectProductü ChangeQuantityü Combinations
Hundreds oflinesofcode
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ReactiveLogic:ExecutableCocktailNapkin
ExecutableCocktailNapkin
ReusedOver…ü AddOrderü DeleteOrderü PayOrderü Un-payOrderü MoveOrderü AddItemü DeleteItemü ReselectProductü ChangeQuantityü Combinations
ReusedOver…ü AndAllEndpoints
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhatisReactiveLogicSpreadsheet-likeExpressionsforMulti-Table ValidationsandComputations
1. YouProvideSpreadsheet-likeExpressionsforDBtables,columns
2. APIServerReacts toChanges,automating§ Invocation§ Chaining/Ordering§ SQL(withOptimizations)
Simple…ADozenRules
Aggregate(up)
Copy(down)
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ReactiveLogic
EnableInstantBusinessRelationshipsAPIsShareLogic.Automatically.
APILogicPoint/Click
AutomaticallyInvokedforallAPS
Agility:40XMoreConcise*
Maintenance:automaticallyordered
*BasedonCA’sinternaltestingandcustomerinterviews.
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LAC:EnterpriseAgilityfortheAppEconomyKeyServices,foraDramaticReductioninEffort
0
20
40
60
80
100
APILogic BusinessLogic
YourEffort
Conventional LAC
Functionality
Logic
APILogicAbstractionLayer
Restify SchemaStubs
Conventional
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Let’sExamineaTypical,SmallProblemExecutableSpecification
Agilityü 40Xmoreconcisethancode*
Qualityü AutomaticInvocation
Maintenanceü AutomaticOrdering
Transparency
Vs…200LinesofCode
*BasedonCA’sinternaltestingandcustomerinterviews.
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LabObjectives
§ CreateAPIfromExistingDatabase(Northwind:norules)
§ CreateReactiveLogic
FollowalongwiththeInstructor
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ReactiveisEffectiveonSmallProblems..
CathedralTermites
UseRules
WhataboutEnterprise-scaleComplexity?
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
AllocatePayment
§ Allocateaproviderpayments.amounttodesignatedrecipientOrders,
§ creatingallocationPaymentpurchase_order_allocation objects(aProvider/RecipientJunction)foreachsuchallocation.
§ Adjustorder,customerbalances
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Allocation:Solution6Rules
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
PriceRollup
1. WhenComponentPriceChanges…
2. UpdateKitPrices,and...
3. ContainingKits
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
PriceRollup:Solution4Rules
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SystemsIntegration
Web
Mobile
Partners
WebHooks
DBsAPI
Server
OmniChannelBusiness
Shippers,Suppliers
1Integration
3
2
Logic
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Integration,Extensibility
AutomaticObjectModel
Discovery– CodeCompletion
Resources– point/clickmapping
andtransformation
Extensibility– LoadableLibraries
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
TransparencyRequirement
AndLogicTraceability
26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Security,WithReactiveLogicComplementingAPISecurity:Fine-GrainedDataSecurity(Row,Column)
Authentication Authorization
27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
AgilityN-FoldFasterAPI-EnabledBackend
AgileIteration
MaintainingQuality
Slow,Complex5BusinessRules–200LinesofCode
IterationslowedbyDependencies
QualityisManual
ReactiveLogic40XMoreConcise*,YetScalestoComplexity
IteratewithAutomaticOrdering
QualityThroughAutomaticInvocation
AppEconomy:APIs,withAgilityBusinessLogicisamajorcomponentofAPIs
*BasedonCA’sinternaltestingandcustomerinterviews.
28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessions
SESSION# TITLE DATE/TIME
DO3T14TV DomainLogicRequiresDomain-SpecificCode 11/16/2016at10:00am
DO3T17TV IntegrationStrategies 11/17/2016at03:00am
DO3T15TV Myth:LowCodeisaToy 11/17/2016at03:45pm
Innovation,EmpoweringAgilityfortheAppEconomy
http://www.ca.com/us/trials.html
30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thankyou.
Stayconnectedatcommunities.ca.com