Giter Site home page Giter Site logo

msg4r's Introduction

msg4r

Introduction

message serialize/deserialize for '4 remote control', both for wiring protocol and file storage.

  • There're already so many serialize/deserialize libraries and frameworks out there, i.e. Google protobuf. However, these libraries and frameworks is not intended for connect with simple embedded devices, which has resource constraints. We need tools for Rapid Construction of simple protocols.

  • Most libraries for deserialization/parsing is implemented in stateless, synchronized style IO mode, which means bad scalability for large number of concurrent connections when no coroutine support; besides, there're no coroutine support in the legacy C++ environments. We need tools for simplifying of creating stateful, asynchronized style deserializers/parsers.

Architecture

The Parser is implemented in stateful and stackless coroutine style.

Install

This project requires C++11, Boost and CMake to build.

  1. Boost 1.75.0 or upper,
  2. CMake 3.10.3 or upper,

Windows

Minimium supported MSVC version is Visual Studio 2015.

Windows 2003/XP

  1. Build boost. Download and decompress boost package. i.e. to C:\boost_1_80_0 Build 32-bit:
C:\> cd boost_1_80_0
C:\boost_1_80_0> b2 install --prefix=C:\usr32 --build-dir=C:\usr32\build-boost --build-type=complete toolset=msvc stage link=static define=BOOST_USE_WINAPI_VERSION=0x0501 define=_WIN32_WINNT=0x0501 define=_CRT_SECURE_NO_WARNINGS=1 address-model=32 architecture=x86

Build 64-bit:

C:\> cd boost_1_80_0
C:\boost_1_80_0> b2 install --prefix=C:\usr64 --build-dir=C:\usr64\build-boost --build-type=complete toolset=msvc stage link=static define=BOOST_USE_WINAPI_VERSION=0x0502 define=_WIN32_WINNT=0x0502 define=_CRT_SECURE_NO_WARNINGS=1 address-model=64 architecture=x86
  1. Build this project.

clone this project to msg4r;

C:\github\apuex> git clone https://github.com/apuex/msg4r
C:\github\apuex> cd msg4r 
C:\github\apuex\msg4r> mkdir dist-win64
C:\github\apuex\msg4r> cd dist-win64
C:\github\apuex\msg4r\dist-win64> cmake -G "NMake Makefiles" ^
-DCMAKE_C_FLAGS="/DWINVER=0x0502 /D_WIN32_WINNT=0x0502 -DBOOST_USE_WINAPI_VERSION=0x0502" ^
-DCMAKE_CXX_FLAGS="/DWINVER=0x0502 /EHsc /D_WIN32_WINNT=0x0502 -DBOOST_USE_WINAPI_VERSION=0x0502" ^
-DCMAKE_C_FLAGS_RELEASE="/O2 /DNDEBUG" ^
-DCMAKE_CXX_FLAGS_RELEASE="/O2 /DNDEBUG" ^
-DCMAKE_EXE_LINKER_FLAGS="/machine:amd64 /subsystem:console,5.02 /version:5.02 /RELEASE" ^
-DCMAKE_SHARED_LINKER_FLAGS="/machine:amd64 /subsystem:console,5.02 /version:5.02 /RELEASE" ^
-DCMAKE_MODULE_LINKER_FLAGS="/machine:amd64 /subsystem:console,5.02" ^
-DCMAKE_STATIC_LINKER_FLAGS="/machine:amd64 /subsystem:console,5.02" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL ^
-DCMAKE_INSTALL_PREFIX=C:/usr64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DENABLE_TESTS=ON ^
-DENABLE_VALGRIND=OFF ^
..
C:\github\apuex\msg4r\dist-win64> nmake
  1. Test this project.
C:\github\apuex\msg4r\dist-win64> nmake test

Usage

Contribution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.