Code Monkey home page Code Monkey logo

dbg-census-cpp's Issues

Support multi-config installations

The build step is already uploading the installation into a directory. To support multi-config generators, we must place the different configuration target definitions side-by-side along with their respective binaries.

  • Need to decide on a naming scheme to ensure that release and debug variants are distinct
  • Alternatively (or in addition), we must place built binaries in subdirectories according to their build type

Create examples

We should add some usage examples to showcase the library API and verify that its interfaces are convenient.

Add intermediate OBJECT libraries for unit testing

Unit-testing internal components such as HttpClientAdapter currently requires re-compiling and -linking the underlying source files to resolve the symbols.

While this project is small enough for compile times to not matter too much, it is still cleaner to do so through virtual targets for extensibility and reliability.

Refactor URL generator to support compile time evaluation

The URL generator is meant for development convenience/safety but has limited utility at runtime. As such, we should make sure that as little actual code is executed as possible.

Wonder if the interface could be reworked to be fully consteval-able.

Test ixWebSocket https client

Since we are already building ixWebSocket locally, it makes sense to use its HTTPS client along with the WebSocket one. If it proves incomvenient, no harm done. But it's always nice to get rid of some dependencies.

Implement dbg_census::urlgen::UrlBuilder

A basic builder for standard DBG Census URLs. This works with and returns plain C++ strings.

No assumptions about available query commands, endpoints, or collections are made to keep this compatible with third-party API mirrors such as Sanctuary.Census.

Make Url generator header-only

This project is not complex enough to warrant 4+ different libraries for its functionality, especially if client code decides to consume them as shared libraries.

Separating the REST and WebSocket clients is sensible as these two components could be used independently, but the URL generator should be redesigned to not require a hard library in the end; it is very basic anyway.

This also gives us more room to go to town with compile-time polymorphism and constexpr. Due to the dynamic nature of the query system we are unlikely to get complete compile-time evaluation, but it is an avenue worth exploring.

Reduce CI load

The current CI system stores both the build and install artifacts on every push, resulting in unneeded persistent storage usage.

Some ways to address this:

  • Only retain build artifacts for 24 hours
  • Only retain install artifacts for 7 days

Selectively export symbols

This library is currently designed to be built statically only. Once utility libraries have been converted to header-only (see #5), it would be nice to have shared library support as well.

Move Url generator into REST component

While this is an optional component that does not require any linking, there is no reason to model it as a separate install component or target. A different header is sufficient here.

Integrate vcpkg via submodule

The reliance on the global VCPKG_INSTALLATION_ROOT environment variable requires users to make changes to the CMake presets (or add their own user preset) just to be able to build the solution.

vcpkg recommends using a git submodule, which should alleviate this issue.

Add payload validation hooks

The current client is designed to be agnostic to the JSON parser used. However, we may still want to further validate received responses as part of the retry check.

Add install targets

This project is meant to be consumed via CMake, so a simple export set and config file should do nicely. Since we have no transitive dependencies, no intermediate targets file should be required.

Add subscription helper / generator

The ESS client currently takes raw JSON payloads for subscriptions. This should be expanded to generate them from scratch using the known event names and arguments.

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.