Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Our road to microservices

Our road to microservices

Explore the choices and constraints that brought Neosperience to adopt a microservices architecture. Deep dive into our experience in building a B2B2C cloud with cutting edge technologies from a monolithic to a full microservice, 95% serverless architecture.

Aletheia

March 12, 2019
Tweet

More Decks by Aletheia

Other Decks in Technology

Transcript

  1. Safe Harbor Statement Certain information set forth in this presentation

    contains “forward-looking information”, including “future oriented financial information” and “financial outlook”, under applicable securities laws (collectively referred to herein as forward-looking statements). Except for statements of historical fact, information contained herein constitutes forward-looking statements and includes, but is not limited to, the (i) projected financial performance of the Company; (ii) completion of, and the use of proceeds from, the sale of the shares being offered hereunder; (iii) the expected development of the Company’s business, projects and joint ventures; (iv) execution of the Company’s vision and growth strategy, including with respect to future M&A activity and global growth; (v) sources and availability of third-party financing for the Company’s projects; (vi) completion of the Company’s projects that are currently underway, in development or otherwise under consideration; (vi) renewal of the Company’s current customer, supplier and other material agreements; and (vii) future liquidity, working capital, and capital requirements. Forward-looking statements are provided to allow potential investors the opportunity to understand management’s beliefs and opinions in respect of the future so that they may use such beliefs and opinions as one factor in evaluating an investment. These statements are not guarantees of future performance and undue reliance should not be placed on them. Such forward-looking statements necessarily involve known and unknown risks and uncertainties, which may cause actual performance and financial results in future periods to differ materially from any projections of future performance or result expressed or implied by such forward-looking statements. Although forward-looking statements contained in this presentation are based upon what management of the Company believes are reasonable assumptions, there can be no assurance that forward-looking statements will prove to be accurate, as actual results and future events could differ materially from those anticipated in such statements. The Company undertakes no obligation to update forward-looking statements if circumstances or management’s estimates or opinions should change except as required by applicable securities laws. The reader is cautioned not to place undue reliance on forward-looking statements.
  2. Luca Bianchi Who am I? Chief Technology Officer @ Neosperience

    Board Director Member @ WizKey Stuff that makes me happy: • Discussing about Software Architectures • Talking about Serverless • Developing on Blockchain technologies • Implementing Neural Networks github.com/aletheia @bianchiluca https://it.linkedin.com/in/lucabianchipavia
  3. Neosperience Cloud allows to create personalized, relevant experiences that strengthen

    
 the relationship with the customer across touchpoints: web, app, platforms, point of sale How Neosperience Cloud delivers digital experience innovation The first digital experience platform to establish empathic relationships with customers that takes into account their uniqueness. A set of application modules condensing multi-disciplinary skills: data scientists, designers, software architects, cognitive, behavioral and social psychologists, to unleash your brand’s potential. Increase customer engagement • Tailor storytelling and call-to-action • Grow the value of the customer • Suggest the most suitable products and services • Accelerate on-boarding and increase conversions • Generate recurring revenues, evolving loyalty into membership • Send personalized notifications • Delight the customer with gamification • Make digital experiences come alive in extended reality • Nudge advocacy 01 Understand Listen to customers
 across channels 02 Engage Deliver relevant
 experiences at scale 03 Grow Transform prospects
 into customers for life
  4. Best-in-class Customers 5 Consumer Products, Retail & Distribution, Communications &

    Media Financial Services, Travel & Transportation, Government Automotive, Health, Industry & Services Fashion, Luxury & Beauty
  5. Neosperience ( 2008 — 2012 ) The age of the

    monolith • Multi-region deploy of SpringMVC / Java on Apache Tomcat / JBoss • Shared RDS database managed by Hibernate • Autoscaling group for EC2 instances, Elastic IP Pros ✓ Everything within a single package ✓ Simple CI workflow ✓ Easy services coordination Cons - Lifecycle: one change in code requires a full release of Neosperience - Scalability / Costs: planning autoscale for different usages is not easy - Everything is a REST endpoint
  6. Neosperience ( 2012 — 2015 ) Separation of concerns •

    Spring Boot/Cloud on Java Stack • Docker image for each service within NGINX • DynamoDB used as façade towards clients • RDS managed through Spring Data • Coordination service (Module Manager) Pros ✓ Smaller services, same technology for everything ✓ Immutable deployments: from CI to Docker registry ✓ Easy services coordination Cons - Still paying for idle (database, instances) - Manual provisioning of resources (through Beanstalk) - Everything is a REST endpoint
  7. Neosperience ( 2015 — now ) Here comes Serverless •

    Triggers to Lambda functions • Each service defines its own persistence • Communication is handled through Kinesis • Immutable deployments Pros ✓ Many small packages ✓ Extremely fast release cycles (smaller changes) ✓ No servers to manage (woot-woot) ✓ Scalability at its best / Cost reduction ✓ There is no difference between dev/stage/ production Cons - Required a shift in team perspective towards software development (there is no one size fits all architecture) - Expensive when utilization close to 100% - No support for dedicated hardware
  8. Cloud resources are a commodity, provisioned through Cloudformation Infrastructure as

    Code CloudFormation stack for every service — every resource is created within service boundaries 
 (Lambda functions, Gateway endpoints, S3 buckets, Kinesis streams, etc.). Infrastructure is versioned within code repository — a change could impact not only code but also resources. CloudFormation handles updates / rollback through changesets. Access to AWS resources — handled through IAM Roles assigned to functions Project lifecycle management — handled through Serverless Framework and SAM Functional tests — run in a dedicated AWS account managed by our CI system: resources are created from scratch, filled with data, then dismissed after tests
  9. New paradigms of service coordination arise from data flowing into

    our system Data driven services • Data is produced by clients and sent through managed services to Neosperience Cloud • Received data triggers computation • Functions act in term of data-in / data-out • Smaller components only needs to know their inputs and outputs • Complex systems can be tested at any point • There is not only one workflow
  10. Some key points we had to address while moving to

    Serverless and microservices. The questions we faced How micro is a microservice? Decompose your system into domain specific computing units using Domain Driven Development (DDD) Do we want to reinvent the wheel? AWS provides a variety of managed services that can ease out software development, reducing time to market of orders of magnitude. Every time we had to implement a new functionality we asked ourselves whether there was an AWS service for that. How to deal with the outside world? Neosperience is a B2B2C ISV vendor. Our product can be used SaaS by companies or integrated through API. We need to rely on web standards REST and OAuth2 How about vendor lock-in? Serverless does not lock you in. Data does. Moving from Lambda to other is easy compared to moving from Dynamo or other managed service, of course. Faster release cycles is a wise choice over data lock-in. Let debate to philosophers. We, as engineers, have to make things work.
  11. Adopting microservices can really make our life as ISV better,

    with a number of benefits The results Business Domain Support ✓17 different business domains ✓5-10 microservices each domain ✓a dozen of support services (monitoring, maintenance, OAuth2, Organization, multi-tenancy, etc.) Serverless ✓100% Serverless except for ML model training Lambda Functions ✓200+ functions AWS Resources ✓400+ AWS resources ✓managed through a 15+ CloudFormation stacks Time to market ✓improved from months to weeks ✓business features released every sprint ✓technical features released multiple times a week Costs ✓reduced by an order of magnitude Team ✓developers provision cloud resources ✓innovation in encouraged, failure impact is bounded ✓shifted from running after business requirements to waiting for business requirements Happiness Dev Team has full control on delivery Business Team has feature delivery
  12. “in the past were bigger companies that outcompeted smaller companies

    now are faster companies 
 to outcompete slower companies” — Marc Benioff