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

Protobuf Integration into Flutter Projects

GDG Montreal
May 25, 2024
21

Protobuf Integration into Flutter Projects

If your company uses Flutter in collaboration with teams using other programming environments, Protobuf is an incredibly useful tool for avoiding data schema mismatches in rapidly evolving software projects. This presentation will demonstrate how we leverage Protobuf to maintain consistency between our Flutter and cloud environments, along with examples of its utility in other scenarios.

GDG Montreal

May 25, 2024
Tweet

Transcript

  1. Agenda 1 2 3 4 5 What is Protobuf? Why

    is it useful? Using Protobuf in an example Flutter project. How we use Protobuf at Common Events. Come get involved! Questions
  2. Tool for defining structured data types… 1 …when datatypes are

    shared between multiple programming environments… What is Protobuf? When to use it? 2 …and you have control over those different environments. 3
  3. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory
  4. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory
  5. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory
  6. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory • Web Application • Written in HTML / JS • Shows less info than the pilot sees
  7. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory • Web Application • Written in HTML / JS • Shows less info than the pilot sees • Shared, structured data format • Shared, structured data format • Shared, structured data format
  8. • Windows / Linux Application • Written in .Net, C++,

    maybe Flutter • Running on a laptop • Shows lots of technical info, commands, etc • Written in C • Running on a microcontroller • Only a few MB of memory • Web Application • Written in HTML / JS • Shows less info than the pilot sees • Shared, structured data format • Shared, structured data format • Shared, structured data format • Telemetry • Measurement Instrument Status • Battery level • Error / diagnostic info • Etc
  9. Defining a common data structure. + Compiling .proto file to

    Dart & Python. Transmitting serialized data between Python and Dart. What have we seen? + + Generation of native objects in both languages. +
  10. There’s only 1 programming environment, and probably always will be.

    + You don’t have full control over each programming environment. Data definitions don’t change very often. You enjoy dealing with type errors / missing field errors in production… When you should NOT use Protobuf + + +
  11. $0