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

Jun2022 [Video]: Build a massively scalable C++ remote compiler cloud by Damien Buhl

Jun2022 [Video]: Build a massively scalable C++ remote compiler cloud by Damien Buhl

Recording: https://www.youtube.com/watch?v=Sj1ymo_POPc
Meetup: https://www.meetup.com/de-DE/microsoft-azure-zurich-user-group/events/286206018/

Abstract:
Damien will talk about the journey implementing a massively scalable web application for tipi.build, in a mixed environment with many cloud vendors, REST APIs and cloud integration in Azure. Contents are C++ web frameworks, REST server autogeneration, template metaprogramming and the learnings of building and running a rock solid cloud application with C++ and containers swarms.

Bio:

Damien (aka daminetreg), co-founder and CEO from tipi.build is an enthusiast C++ developer. He is Opensource entrepreneur, CppCon Speaker, GameMaker.fr community founder, Qt for Android contributor and Boost.Fusion maintainer since 2014

Links:

https://tipi.build
https://www.linkedin.com/company/tipi-technologies
https://github.com/tipi-build/
https://twitter.com/TipiBuild

Tweet

More Decks by Azure Zurich User Group

Other Decks in Technology

Transcript

  1. 1 tipi.build @ Azure Zürich User Group Building a massively

    scalable C++ remote compiler cloud www.tipi.build Damien Buhl [email protected] +41 (0) 78 984 08 13 Azure Zürich User Group 21.06.2021
  2. 2 tipi.build @ Azure Zürich User Group Our Founders Damien

    Buhl CEO & CTO Yannic Staudt COO & Business Development
  3. Agenda 3 tipi.build @ Azure Zürich User Group • Why

    C++ for Webapps ? • tipi.build software architecture • JWT • REST • OpenAPI • ORM Our Adventures building a massively scalable C++ remote compiler cloud
  4. 12 tipi.build @ Azure Zürich User Group Carbon footprint Enabling

    environmentally friendly software PHP, 77% Lua, 8% Java, 5% Ruby, 5% Python, 3% Typescript / Node.js, 1% Others, 1% 186M Of all internet requests by seconds served by non-native technologies globally 3 1.32bn CO2 tons Yearly Global Emissions by Internet 1 47’000 CO2 tons Yearly Emissions addressable 2 with C++ 1 The Shift Project, Lean ICT, March 2019 2 Cisco Annual Internet Report 2020 + HTTP Archive, State of The Web 11.2020 3 W3Techs, server-side programming languages distribution, top 10 Millions websites, 11.2020
  5. 13 tipi.build @ Azure Zürich User Group Carbon footprint Case

    study on a typical web application To serve 43 000 web requests / seconds with common cloud hardware : C++ State of the art (e.g. PHP, Python, TS, Ruby) 1’840 kgCO2e / year 12’880 kgCO2e / year Dell R440 Xeon Gold 1480 kWh Energy Demand / year Dell estimated product carbon footprint & single query TechEmpower Web Framework Benchmark (May 2020)
  6. First part of our journey : Microservices vs Monoliths 16

    tipi.build @ Azure Zürich User Group
  7. Microservices vs Monoliths 17 tipi.build @ Azure Zürich User Group

    - Vertical scalability only - Availability issues + Simplicity + Everything in the same memory space Monoliths
  8. Microservices vs Monoliths 18 tipi.build @ Azure Zürich User Group

    - Lot of Marshalling code between services - Shared state data races ~ Prone to Conway’s Law + Horizontal scalability + High Availability + Degraded operation mode Microservices
  9. C++ 30 tipi.build @ Azure Zürich User Group Technology stack

    Oat++ Oatpp-starter at https://github.com/tipi-build/oatpp-starter
  10. 34 needs you ! https://tipi.build/ Register & Learn More tipi.build

    @ Azure Zürich User Group We dogfood but…
  11. REST : Intro 37 tipi.build @ Azure Zürich User Group

    • Accessing resources using URIs • Resources encapsulate entities • Resources are manipulated • CRUD • through hypertext representations • transferred in messages • Strong decoupling of client and server “anarchic scalability” & “low-entry barrier” REST Representational state transfer
  12. RESTful webservices 38 tipi.build @ Azure Zürich User Group §

    A base URI § HTTP methods e.g. GET, POST, PUT, DELETE § media type that defines state transition data elements e.g. application/json; charset=utf-8 § URI segments to identify resources
  13. REST Server 40 tipi.build @ Azure Zürich User Group Oat++

    RESTful Webservice Data Transfer Object
  14. To learn more about OpenAPI Clients with C++20 Watch our

    CppCon2021 talk Our Adventures With REST API in C++ : Making it Easy 43 tipi.build @ Azure Zürich User Group
  15. To serialize JSON like the cool kids with C++20 Watch

    our CppCon2021 talk Our Adventures With REST API in C++ : Making it Easy https://github.com/tipi-build/openapipp/ 58 tipi.build @ Azure Zürich User Group
  16. JSONB advantages 60 tipi.build @ Azure Zürich User Group §

    Postgres JSONB performance § Faster than mongodb § Same speed as columns § Simplicity § Who needs data migration when you have std::optional ?
  17. 67 tipi.build @ Azure Zürich User Group $> tipi build

    . -t macos –j 128 addr2line addr2line addr2line addr2line addr2line addr2line addr2line addr2line addr2line