Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #32

Merged
merged 98 commits into from
Feb 4, 2024
Merged

Dev #32

merged 98 commits into from
Feb 4, 2024

Conversation

Oipo
Copy link
Collaborator

@Oipo Oipo commented Feb 2, 2024

New Features / Significant Changes

  • Implement almost entire Etcd v2 API (user auth, roles, permissions)
  • Expand redis API implementation (strlen, multi, discard, exec, info)
  • Reduce memory usage for events significantly (>50%)
  • Reduce memory usage for services
  • Introduce non-atomic shared_ptr
  • Support requesting dependencies of the same type multiple times but with different properties (e.g. two IHttpConnection's to different addresses)
  • Support custom HTTP route matchers
    • Introduce an Ichor RegexRouteMatcher that supports capture groups for parsing e.g. /users/{id}?{queryParam1}={valueParam1}
  • Implement Small Buffer Optimization in Ichor::Any
  • Support converting Ichor::Any type and values to string for logging contents of Properties
  • Add Raspberry Pi model specific optimization flags
  • Add benchmark numbers on Raspberry Pi Model 4B
  • Add _FORTIFY_SOURCE=3 and other security related flags on non-windows builds when using hardening
  • Improve various compile/link modes, e.g. using libcpp instead of libstdc++ or creating a statically linked musl-aarch64-mimalloc build.
  • Support services having a priority lower than the default dependency priority, effectively enabling some control over which services get initialized first.
  • Have coroutines use the same priority for events as the services that create them

Third-party Libraries

  • Fork and update Mimalloc to 2.1.2
    • Forked because of this issue.
    • Allows using mimalloc with ASAN as well as on the combination of musl, aarch64
    • Use mimalloc's secure mode when hardening is turned on, even for release builds.
  • Update spdlog to v1.13.0
  • Update fmt to 10.2.1
  • Update Catch to 3.5.2
  • Update sole to 1.0.5
  • Update glaze to 2.0.6
  • Introduce CTRE 3.8.1
  • Introduce ankerl's unordered_dense 4.40, replacing std::unordered_map and abseil::btree_map entirely.
  • Remove abseil as a possible dependency (users are free to re-introduce it in their own projects, of course)

Bug Fixes

  • Fix bug when sending multiple messages with HttpConnectionService
  • Fix data race with multiple threads creating services without dependencies
  • Fix data race in coroutine IO implementation
  • Fix bug in EventStatisticsService where collected events would be thrown away because a coroutine was not being run to completion
  • Fix bug where iterators to event interceptors might get invalidated by modifying the list of interceptors inside of an event intercept handler
  • Fix bug where realtime example would always try to re-enable SMT if option to disable it was missing

* Change every usage of std::optional to tl::optional where possible, because that allows using the [[nodiscard]] attribute on the class, giving off extra warnings.
* Change HttpHeaders to an unordered_map, as that makes more sense in how to use them
* Add base64, as the Etcd V2 auth uses HTTP Basic Authentication
* Update to latest glaze, fixes a misaligned address load.
…lementations. Also add some Raspberry Pi benchmark results.

This means we can remove abseil as its only remaining use for Ichor is the btree multimap.
However, users can still opt to create their own event queue implementation with abseil.
@codecov-commenter
Copy link

Codecov Report

Attention: 304 lines in your changes are missing coverage. Please review.

Comparison is base (dcbd0d7) 75.51% compared to head (e108f5b) 82.29%.
Report is 13 commits behind head on main.

❗ Current head e108f5b differs from pull request most recent head 5972676. Consider uploading reports for the commit 5972676 to get more accurate results

Files Patch % Lines
include/ichor/glaze.h 0.00% 96 Missing ⚠️
...nchmarks/utils_benchmark/ichor_utils_benchmark.cpp 62.35% 32 Missing ⚠️
include/ichor/services/etcd/IEtcd.h 0.00% 30 Missing ⚠️
include/ankerl/unordered_dense.h 93.58% 26 Missing ⚠️
include/ichor/events/InternalEvents.h 79.26% 17 Missing ⚠️
include/ichor/services/network/ClientFactory.h 65.30% 17 Missing ⚠️
include/ichor/stl/ReferenceCountedPointer.h 86.53% 14 Missing ⚠️
...ependency_management/ConstructorInjectionService.h 42.10% 11 Missing ⚠️
...cy_management/IServiceInterestedLifecycleManager.h 12.50% 7 Missing ⚠️
...dependency_management/DependencyLifecycleManager.h 86.84% 5 Missing ⚠️
... and 17 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   75.51%   82.29%   +6.78%     
==========================================
  Files         143      183      +40     
  Lines        6771     9834    +3063     
==========================================
+ Hits         5113     8093    +2980     
- Misses       1658     1741      +83     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Oipo Oipo merged commit dabb63d into main Feb 4, 2024
10 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants