22
Public DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

Embed Size (px)

Citation preview

Page 1: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

Public

DEV300  – Architecture  Guidelines  for  MicroservicesBased  on  SAP  HANA  Cloud  Platform

Page 2: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 2Public

Speakers

Las Vegas,   Oct  19  -­ 23

� Matthias  Steiner @steinermatt

Barcelona,   Nov  10  -­ 12

� Peter  Peshev @peter_peshev

Page 3: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 3Public

Disclaimer

This  presentation   outlines  our  general   product  direction  and  should  not  be  relied  on  in  making  a  purchase  decision.  This  presentation   is  not  subject  to  your  license  agreement   or  any  other  agreement  with  SAP.  SAP  has  no  obligation   to  pursue  any  course  of  business  outlined   in  this  presentation   or  to  develop  or  release  any  functionality  mentioned   in  this  presentation.  This  presentation  and  SAP's  strategy  and  possible  future  developments   are  subject  to  change  and  may  be  changed   by  SAP  at  any  time  for  any  reason  without  notice.  This  document   is  provided  without  a  warranty  of  any  kind,  either  express  or  implied,  including  but  not  limited  to,  the  implied  warranties  of  merchantability,  fitness  for  a  particular  purpose,  or  non-­infringement.   SAP  assumes  no  responsibility  for  errors  or  omissions  in  this  document,   except  if  such  damages  were  caused  by  SAP  intentionally  or  grossly  negligent.

Page 4: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 4Public

Disclaimer  II

”Not your grandfather’s SAP…”

Page 5: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 5Public

Disclaimer  II

”…but your Granny’s!”

§ Code  Base:  Enterprise  Granny(HCP  Sample  – ‘Best  practices’   using  Java  Open-­Source)

§ Refactored   to  Contact  Srv  &&  Contact  Client

§ Note:  One  code-­line   for  the  both   traditional  HCP  and   the  upcoming   Cloud  Foundry  stack via  Spring  Cloud  Connectors   *

*   except  Multitenancy

Page 6: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 6Public

Wants  &&  needs

Quick  results  (shorter  time  to  market)

Lower  capital  expenses

Grow  marketshare

Easy  to  use  apps

Care  free  (no  hazzle)

On-­demand

Easy  to  learn/master

Lower  operational  overhead

1st class  tooling

“desirable” “feasable” “viable”

Page 7: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 7Public

New  rules!

restricted  access è open  access

proprietary  tools open  source

model-­driven APIs

walled  garden open  community

non-­binding  roadmaps open  communication

one-­stop  shop freedom  of  choice

waterfall agile

regular  shipments   continuous delivery  

Page 8: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 8Public

A  match  made  in  heaven

Page 9: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 9Public

Characteristics [http://martinfowler.com/articles/microservices.html]

§ Componentization   via  Services

§ Vertical  cut  (full-­stack)  based   on  biz  domain  vs traditional  (silo-­ed)  functional   teams

§ Granularity/size  of  micro-­services

§ DevOps (products/services   not  projects),  ownership   over  the  full  life-­cycle

§ Smart  endpoints   (APIs/services)   vs complex  ESB

§ Decentralized   Governance   -­ “SOA  done   right  ?!?”

§ Decentralized   Data  Management  

§ Infrastructure  automation

§ Design   for  failure

§ Evolutionary   designMartin   Fowler@martinfowler

Page 10: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 10Public

The  12-­factor  app   [http://12factor.net/]

I. Codebase-­ One  codebase  tracked  in  revision  control,  many  deploys

II. Dependencies-­ Explicitly  declare  and  isolate  dependencies

III. Config-­ Store  config in  environment

IV. Backing   Services-­ Treat  backing  services  as  attached  resources

V. Build,  release,  run-­ Strictly  separate  build  and  run  stages

VI. Processes-­ Execute  the  app  as  one  or  more  stateless  processes

VII. Port  binding-­ Export  services  via  port  binding

VIII. Concurrency-­ Scale  out  via  the  process  model

IX. Disposability-­ Maximize  robustness  with  fast  startup  and  graceful  shutdown

X. Dev/prod  parity-­ Keep  development,  staging,  and  production  as  similar  as  possible

XI. Logs-­ Treat  logs  as  event  streams

XII. Admin  processes-­ Run  admin/management  tasks  as  one-­off  processes

Page 11: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 11Public

Exemplary:  Architecture  Blueprint

Cross-cutting concerns (X

CC

)

REST Façade (JAX-RS)

Business Logic Layer (Services)

Data Access

Connectivity Persistence

Presentation Layer

Domain Model

DTO

JavaBeans

HTTP  Client

Apache  CXF  (+  Olingo)AOP-­

Filters,Interceptors,

Spring  Framework

1. Service  layer2. Data  access  +3. Domain  model4. API  layer5. DI  container  6. Everything  else

1. Operations

Page 12: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 12Public

Source  Code  – The  single  point  of  truth

Page 13: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 13Public

DevOps

development + operations

Page 14: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 14Public

Questions  &&  answers

Page 15: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 15Public

Contact  your  SAP  Account  Executive

Get  Started  with  SAP  HANA  Cloud  Platform

Find  out  more  about  HANA  Cloud  Platform:  

hcp.sap.com

Start  using  SAPHANA  Cloud  Platform  Developer  Edition:  

hcp.sap.com/developers

Try  a  partner  application  powered  by  SAP  HANA:  www.sapappcenter.com

Page 16: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 16Public

SAP  TechEd  Virtual  Hands-­on  Workshops  and  SAP  TechEd  OnlineContinue  your  SAP  TechEd  education  after  the  event!

SAP  TechEd  Online� Access  replays  of  keynotes,  Demo  Jam,  SAP  TechEd  live  interviews,  select  lecture  sessions,  and  more!

� Hands-­on  replays  

http://sapteched.com/online

SAP  TechEd   Virtual  Hands-­on   Workshops� Access  hands-­on  workshops  post-­event� Starting  January  2016  � Complementary  with  your  SAP  TechEd  registration

http://saptechedhandson.sap.com

Page 17: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 17Public

Further  Information

Related   SAP  TechEd   sessions:DEV100            Overview  of  SAP’s  Development  Platform   for  SAP  HANA  and  SAP  CloudDEV101 Extending  SAP  Business  Suite  and  SAP  S/4HANA  with  SAP  HANA  Cloud  PlatformDEV102            SAP  HANA  Cloud  Platform:  A  Guided  TourDEV107            Cloud  Foundry  and  SAP  HANA  Cloud  Platform:  A  Natural  EvolutionDEV108            Extending  SAP  Cloud  for  Customer  with  SAP  HANA  Cloud  PlatformDEV109            Extending  Cloud  Solutions  from  SAP  Using  SAP  HANA  Cloud  PlatformDEV165            (Hands-­on) Develop  end-­to-­end  scenarios  for  cloud  and  hybrid  and  on-­premise  deploymentsITM26854      How   to  Manage  the  Lifecycle  of Your  SAP  HANA  Cloud  Platform  ApplicationsTEC801 Road  Map  Q&A:  SAP  HANA  Cloud  Platform

SAP  Public  Webhttp://hcp.sap.com  http://scn.sap.com/community/developer-­center/cloud-­platformSAP  Education   and  Certification   Opportunitieshttps://open.sap.com/course/hanacloud1https://open.sap.com/course/hanacloud2Watch   SAP  TechEd   Onlinewww.sapteched.com/online

Page 18: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

18© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved.

FeedbackPlease  complete  your  session  evaluation  forDEV300.

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 18Public

Page 19: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 19Public

Thank  you

Contact  information:

Matthias  SteinerCloud  Platform  Evangelist  | SAP  Mentor  AlumnusSAP  HANA  Cloud  Platform

http://twitter.com/steinermatt

http://scn.sap.com/people/steinermatt/

http://about.me/steinermatt

Page 20: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 20Public

©  2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved.

No  part  of  this  publication  may  be  reproduced  or  transmitted  in  any  form  or  for  any  purpose  without  the  express  permission  of SAP  SE  or  an  SAP  affiliate  company.

SAP  and  other  SAP  products  and  services  mentioned  herein  as  well  as  their  respective  logos  are  trademarks  or  registered  trademarks  of  SAP  SE  (or  an  SAP  affiliate  company)  in  Germany  and  other  countries.  Please  see  http://global12.sap.com/corporate-­en/legal/copyright/index.epx for  additional  trademark  information  and  notices.

Some  software  products  marketed  by  SAP  SE  and  its  distributors  contain  proprietary  software  components  of  other  software  vendors.

National  product  specifications  may  vary.

These  materials  are  provided  by  SAP  SE  or  an  SAP  affiliate  company  for  informational  purposes  only,  without  representation  or warranty  of  any  kind,  and  SAP  SE  or  its  affiliated  companies  shall  not  be  liable  for  errors  or  omissions  with   respect  to  the  materials.  The  only  warranties  for  SAP  SE  or  SAP  affiliate  company  products  and  services  are  those  that  are  set  forth  in  the  express  warranty  statements  accompanying  such  products  and  services,  if  any.  Nothing  herein  should  be  construed  as  constituting  an  additional  warranty.  

In  particular,  SAP  SE  or  its  affiliated  companies  have  no  obligation  to  pursue  any  course  of  business  outlined  in  this  document  or  any  related  presentation,  or  to  develop  or  release  any  functionality  mentioned  therein.  This  document,  or  any  related  presentation,  and  SAP  SE’s  or  its  affiliated  companies’  strategy  and  possible  future  developments,  products,  and/or  platform  directions  and  functionality  are  all  subject  to  change  and  may  be  changed  by  SAP  SE  or  its  affiliated  companies  at  any  time  for  any  reason  without  notice.  The  information  in  this  document  is  not  a  commitment,  promise,  or  legal  obligation  to  deliver  any material,  code,  or  functionality.  All   forward-­looking  statements  are  subject  to  various  risks  and  uncertainties  that  could  cause  actual  results   to  differ  materially   from  expectations.  Readers  are  cautioned  not  to  place  undue  reliance  on  these  forward-­looking  statements,  which  speak  only  as  of  their  dates,  and  they  should  not  be  relied  upon  in  making  purchasing  decisions.

Page 21: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 21Public

Example:  Program  Coding

SQL   CE-­Built  In  FunctionSELECT  on  column  table   out  =  SELECT  A,  B,  C  from  "COLUMN_TABLE" out  =  CE_COLUMN_TABLE("COLUMN_TABLE",  [A,  B,  C])

SELECT  on  attribute  view   out  =  SELECT  A,  B,  C  from  "ATTRIBUTE_VIEW" out  =  CE_JOIN_VIEW("ATTRIBUTE_VIEW",  [A,  B,  C])

SELECT  on  olap  view out  =  SELECT  A,  B,  C,  SUM(D)  from  "ANALYTIC_VIEW"  GROUP  BY  A,  B,  C

out  =  CE_OLAP_VIEW("ANALYTIC_VIEW",  [A,  B,  C]);

WHERE   HAVING   out  =  SELECT  A,  B,  C,  SUM(D)  from  "ANALYTIC_VIEW"  WHERE  B  =  'value'  AND  C  =  'value'

col_tab=  CE_COLUMN_TABLE("COLUMN_TABLE");  out  =  CE_PROJECTION(col_tab,  [A,  B,  C],  '  "B"  =  ''value''  AND  "C"  =  ''value''  ');

GROUP  BY out  =  SELECT  A,  B,  C,  SUM(D)  FROM"COLUMN_TABLE"  GROUP  BY  A,  B,  C

col_tab=  CE_COLUMN_TABLE("COLUMN_TABLE");  out  =  CE_AGGREGATION(  (col_tab,  SUM(D),  [A,  B,  C]);

INNER  JOIN   out  =  SELECT  A,  B,  Y,  SUM(D)  from  "COLTAB1"  INNER  JOIN  "COLTAB2"  WHERE  "COLTAB1"."KEY1"  =  "COLTAB2"."KEY1"  AND  "COLTAB1"."KEY2"  =  "COLTAB2"."KEY2"

out  =  CE_JOIN("COLTAB1","COLTAB2",  [KEY1,  KEY2],  [A,  B,  Y,  D])

LEFT  OUTER  JOIN   out  =  SELECT  A,  B,  Y,  SUM(D)  from  "COLTAB1"  LEFT  OUTER  JOIN  "COLTAB2"  WHERE  "COLTAB1"."KEY1"  =  "COLTAB2"."KEY1"  AND  "COLTAB1"."KEY2"  =  "COLTAB2"."KEY2"

out  =  CE_LEFT_OUTER_JOIN("COLTAB1","COLTAB2",  [KEY1,  KEY2],  [A,  B,  Y,  D])

SQL  Expressions out  =  SELECT  A,  B,  C,  SUBSTRING(D,2,5)  FROM  "COLUMN_TABLE"

proj_tab  =  CE_COLUMN_TABLE("COLUMN_TABLE");  out  =  CE_PROJECTION(  :proj_tab,  ["A",  "B",  "C",  CE_CALC('midstr("D",2,5)',  string)  ]);

UNION  ALL   col_tab1  =  SELECT  A,  B,  C,  D  FROM  "COLUMN_TABLE1";  col_tab2  =  SELECT  A,  B,  C,  D  FROM  "COLUMN_TABLE2";  out  =  SELECT  *  FROM  :col_tab1  UNION  ALL  SELECT  *  FROM  :col_tab2;

col_tab1  =  CE_COLUMN_TABLE("COLUMN_TABLE1",[A,B,C,D]);  col_tab2  =  CE_COLUMN_TABLE("COLUMN_TABLE2",[A,B,C,D]);  out  =  CE_UNION_ALL(:col_tab1,:col_tab2);

Page 22: DEV300 – Architecture Guidelines for Microservices Based on SAP HANA Cloud Platform

© 2015  SAP  SE  or  an  SAP  affiliate  company.  All  rights  reserved. 22Public

Example:  Program  Coding

bp_addresses  =  select  a."PartnerId",  a."PartnerRole",  a."EmailAddress",  a."CompanyName",

a."AddressId",  b."City",  b."PostalCode",  b."Street"from  "SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::businessPartner"  as  a  inner  join  "SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::addresses"  as  b

on  a."AddressId"  =  b."AddressId"  where  a."PartnerRole"  =  :partnerrole;

lt_bp  =  CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::businessPartner",  ["PartnerId",  "PartnerRole",  "EmailAddress",  "CompanyName",  "AddressId"  ]);

lt_bp_proj  =  CE_PROJECTION(:lt_bp,  ["PartnerId",  "PartnerRole",  "EmailAddress"  ,  "CompanyName",  "AddressId"  ],  '"PartnerRole"  =  :partnerrole'  );

lt_address  =  CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::addresses",  ["AddressId",  "City",  "PostalCode",  "Street"]);

bp_addresses  =  CE_JOIN(:lt_bp_proj,  :lt_address,  ["AddressId"],  ["PartnerId",  "PartnerRole",  "EmailAddress",  "CompanyName",  "AddressId",  "City",  "PostalCode",  "Street"]);

SQL

CE

Functions