Adding a REST API with Corvusoft's restbed

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 15

  • @UtahCppProgrammers
    @UtahCppProgrammers  2 роки тому

    Source code: github.com/LegalizeAdulthood/comicsdb-restbed

  • @JeffyOLOLO
    @JeffyOLOLO 2 роки тому

    Thank you for this review and comments!
    I have started a small home project and am using restbed for it. I faced the same problems as you, you answered many of my questions.

  • @debduttahalder1375
    @debduttahalder1375 Рік тому

    Is there a recipe example available for restbed that can be used for Yocto projects?

    • @UtahCppProgrammers
      @UtahCppProgrammers  Рік тому

      Are you referring to the embedded linux distro? www.yoctoproject.org/
      It's just linux, so normal linux development practices would apply.

  • @prajwaldas9555
    @prajwaldas9555 2 роки тому

    That was an amazing session! Is there a link to the source code of the comicsdb project?

  • @aymardeoolatounde
    @aymardeoolatounde Рік тому

    @UtahCppProgrammers I use VsCode and when I have thie error Could NOT find restbed (missing: RESTBED_LIB RESTBED_INCLUDE)

    • @UtahCppProgrammers
      @UtahCppProgrammers  Рік тому

      Windows or Linux? On Linux there was an issue with case sensitivity of the filenames. Make sure you have the latest version of the code from github and are running CMake with the vcpkg toolchain options as described in "Using vcpkg with CMake": vcpkg.io/en/getting-started.html

  • @von_nobody
    @von_nobody 2 роки тому

    Your code look like it have data race, only using `mutex` on modifying operations is not enough as concurrent request could access same data without lock. Probably better solution would have `std::atomic` and each request simply get "snapshot" of whole database on begging.

    • @UtahCppProgrammers
      @UtahCppProgrammers  2 роки тому

      You're right that reads have to be blocked while the data structure is being modified, but all reads could take place concurrently. Concurrency is hard :)

  • @wsulimankhail
    @wsulimankhail 2 роки тому

    getting the bellow error:
    -- The C compiler identification is GNU 11.2.0
    -- The CXX compiler identification is GNU 11.2.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at CMakeLists.txt:5 (find_package):
    By not providing "Findrestbed.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "restbed", but
    CMake did not find one.
    Could not find a package configuration file provided by "restbed" with any
    of the following names:
    restbedConfig.cmake
    restbed-config.cmake
    Add the installation prefix of "restbed" to CMAKE_PREFIX_PATH or set
    "restbed_DIR" to a directory containing one of the above files. If
    "restbed" provides a separate development package or SDK, be sure it has
    been installed.

    • @UtahCppProgrammers
      @UtahCppProgrammers  2 роки тому

      Are you getting this error from my project on github or on your own?

    • @eltonvivot1545
      @eltonvivot1545 Рік тому

      ​@@UtahCppProgrammers Hello. Im having the same problem. I cloned the git repo and executed the following commands:
      - mkdir build
      - cd build/
      - vcpkg integrate install
      - vcpkg install
      - cmake .. "-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake" (i got the error here)
      Any suggestions?

    • @UtahCppProgrammers
      @UtahCppProgrammers  Рік тому

      @@eltonvivot1545 Try renaming cmake/FindRestbed.cmake to cmake/Findrestbed.cmake. Windows file system is by default case insensitive. I'll update my repo.