Tag: cppreflection

Binary Object Serialization with Data Structure Traversal & Reconstruction in Cpp – Chris Ryan – CppCon 2022

  • Lobby
  • Tag Archives: cppreflection

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

Binary Object Serialization with Data Structure Traversal & Reconstruction in C++ - Chris Ryan - CppCon 2022
https://github.com/CppCon/CppCon2022

This talk will describe a minimally intrusive technique to add serialization to a set of classes, traversing hierarchical and non-hierarchical data, persisting in a binary format and dynamic reconstruction

When storing, it can deduce the data types using Template Argument Deduction (TAD) and safely protects against recursive reentrancy.
When loading, it uses a reflection type technique for dynamic object creation using an automatic serializable type registration mechanism.

Reflection as a language feature will be unavailable until at least C++26. This serialization technique can dynamically recreate a persisted complex data structure/structure network. This is a platform agnostic technique.

Not everybody is yet able to migrate to C++20, so this is using a C++14 compliant SFINAE/std::enable_if<> mechanism. We will also explore optimizations and what it takes to convert this technique to use C++20 concepts.

The serialized data can be persisted to a disk file, shared memory for IPC or using network streams for live remote data sharing like HPC or gaming.

This is not trying to sell you on the use of the library but rather sharing metacppcon.digital-medium.co.uk/tag/programming/">programming techniques you can add to your toolbox.
---

Chris Ryan

Chris Ryan was classically trained in both software and hardware engineering. He is well experienced in Modern C++ on extremely large/complex problem spaces and Classic ‘C’ on Embedded/Firmware devices (large & small). Chris has no interest in C#/.,Net, Java, js or any web-ish tech.
---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , ,

A Faster Serialization Library Based on Compile-time Reflection and C++ 20 – Yu Qi – CppCon 2022

  • Lobby
  • Tag Archives: cppreflection

https://cppcon.org/
---

A Faster Serialization Library Based on Compile-time Reflection and C++ 20 - Yu Qi - CppCon 2022
https://github.com/CppCon/CppCon2022

A serialization library based on compile-time reflection and C++20 is much more easier to use than protobuf and msgpack, no DSL definition, no macros and no invasive because of c++ 20.

The library is 3x faster than msgpack and protobuf, even hundreds times faster in some special scene, how to do it?

1. How to reflect an object with c++20;
2. Design a parsing faster data formats utilize static reflection;
3. Do special optimization for trivial copyable objects according to static reflection;
4. Compile time type hash make binary data size smaller and deserialization more safe;
5. std::optional can help to keep backward compatibility;

The talk will cover above points.
---

Yu Qi

Yu is a C++ programmer with 15 years experience who lives in Hangzhou, Zhejiang province, China. He loves modern C++ and has founded an open source community ( http://www.purecpp.cn/ ) to promote modern C++ in China. His focus is distributed systems and he is the author of rest_rpc, an RPC library implemented in C++14. Yu's github is https://github.com/qicosmos . Yu wrote a Chinese language book about C++11 in 2015: http://item.jd.com/11701870.html The title translates as "C++11 In Depth."
---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #serialization

Filed under: UncategorizedTagged with: , , , , , ,