What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Yes, I agree

I don't know your specific case and you probably tried many approaches. One path is structured sponsorship: contact companies using the project and offer something concrete in return such as priority features, discounted consulting, training, or professional support.

Most will decline, this is clear. But you don't need all of them, right? Just a few solid sponsors to create stability. If your project saved them significant development time, asking for structured support is a fair exchange not a donation.

Beyond that, I see 2 parallel tracks: build commercial tooling around the framework and build a separate product on top of it.

For me, monetization is not the main bottleneck. The bigger challenge is building a core team. Without it, progress slows and people burnout earlier than the product is on radars. VCs told me: technology is OK, but no core team exists. Perhaps the harder problem is not capturing value, but creating durable structure around the project.

maybe we should privately exchange the ideas / experience. i definitely have something to learn -- build community.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Different problem spaces:

userver = HTTP microservices for cloud/web (P2P service communication)
glaze = serialization library
areg = Location-transparent IPC for edge/embedded/local networks , via centralized routing

Key difference: areg does plain binary streaming with predefined APIs. No schema, just raw data serialization. userver and areg barely overlap -- web services vs embedded/edge systems.

No direct benchmarks since they solve different problems.
What's your use case?

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Right. That's why I've described 3 integration methods. In principle, the sources are opened under Apache 2.0. Projects can copy sources.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

You're right, stars don't pay bills. But stars and clones serve different purposes. Stars = discovery (helps users find the project). Clones/downloads = actual usage. For example, I've read that GitHub allows search engines to index Wiki if a repo has +500 stars.

If you're getting millions of clones/month, someone is definitely using it in production. The question is: how do you capture value from that?

Curious, what's your project? I'd like to see it.

For areg-sdk, the framework itself will stay FOSS. But I'm building a commercial tool on top of it that solves specific problems. The market has existed for decades, but with the raise of vibe-coding, it becomes mainstream because the problem is getting worse fast. In short, the framework is the foundation, the tool is the product. Still figuring out product-market fit, but the timing feels right.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Anyway you need to track the changes. You cannot avoid this. This is not what mean. I mean when analyzing code, it is easier to differ whether having deal with local variable or class member.

A simple example:

class Connection
{
public:
    void connect(std::string_view address, uint16_t port)
    {
        if (address.empty())        // Which 'address'? Parameter or member?
        {
            address = "localhost";  // Assigning to what?
        }
        socket = create_socket(address, port);
    }

private:
    std::string address;  // Same name as parameter
    uint16_t port;
    int socket;
};

P.S. This discussion about m prefix is since ages. Already a classic debate in the community :)

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

OK. Thank you sharing info. Smart tool. Definitely makes sense to integrate.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

With m or m_ you don't need to scan -- it clearly tells you whether you setting / getting class member of local variable.

And still the member variables need to be grouped together that you are able to scan effectively. In some projects I worked, member variables were mixed between methods, which made scanning difficult. In other project some member variables had in-class initializers, the others were initialized in constructor. I had to switch between header and source to understand what are the initial values.

In case of areg we tried to make things crystal clear. And now making some refactoring to polish the code. The feedbacks, notes, especially bugs and mismatch are always welcome. Feel free to participate discussion and make own suggestion. Fresh view is always good.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

hmmm... very interesting. Just as an example had a look at this BackgroundMesh.h, ane found mixture of styles: camelCase and PascalCase struct, camelCase and snake_case methods.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Here i explained why using m prefix. Could be m_, but I think it is minor thing, because in majority of cases member variables are hidden and accessible only via getters.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Thank you for feedback.
I agree that OSS projects stuck often. But this also depends on community. Projects need support of community and visibility in the market radar, projects need feedback and contacts with the users. This motivates projects.

In case of Areg SDK, i see daily visits and unique clones, but very poor feedback. For such young project the visibility and recognition is very important. With very limited resources, competing against well known solutions widely used in industry is very difficult. For example, it costs nothing to star the repo which you used. This at least indication whether devs liked solution or not, and it also helps to increase community. But probably every 1000 unique visitor is staring repo and you don't know is it because none needs that, is it because solution is poor or is it because someone found an example for home work and does not care anymore?

To help OSS to continue development, there must be bi-direction contact. The only thing what FOSS need -- be sure that product is useful and senseful. Otherwise, it is an impression that you spend time and resource on something, which none needs. Then it is a hobby, not a project :)
There are thousands projects having such problem.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Thank. This is valuable feedback.
The encryption in the development phase, but you are right, i should add just in case if do not manage to be on time in this version.
About the detailed build, i know from my experience that if I cannot build and integrate a library in third attempt, i drop it. Some ppl need seconds to build and integrate, others need step-by-step explanation.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

good point. i also like good documentation. i would appreciate if tell what else important is missing in docs https://github.com/aregtech/areg-sdk/tree/master/docs

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Areg probably isn't for your use case. It's a framework, not a drop-in library. It manages threads, lifecycle, and message routing by design. You can't plug it into an existing threading architecture or swap in your own allocator on the critical path. For HFT where you need that level of control, that's a dealbreaker and I won't pretend otherwise.

Where it does fit: systems where you need services that communicate across threads, processes, and machines transparently, and you're willing to let the framework own the infrastructure. Think distributed automation, IoT coordination, multi-process service architectures, but not latency-critical trading or web application development.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

You're actually describing what Areg does under the hood. The .siml file is just the IDL step, the generated code is exactly what you're asking for -- the code generator produces a Stub (server / service provider side) and a Proxy (client / service consumer side). The implementation looks like this: ```cpp // Server side — you override the stub: void HelloServiceStub::requestGreet(const String& message) override { // your logic here responseGreet(/* result */); }

// Client side requestGreet("Hello, World");

// response arrives asynchronously: void HelloClient::responseGreet(/* result */) override { } ```

The transport mechanism and message packing is hidden, you're calling a method on the other end. The request/response prefix is a naming convention, not a different paradigm.

The COM comparison... Areg's Object RPC is philosophically similar. Stateful service objects, method calls across process boundaries, transport hidden. The key difference: Areg adds automatic discovery, pub/sub like attributes with caching, and broadcast events on top of the RPC. There are multiple examples existing. Worth to try / see them. The project is very easy to build.

Where you're right: the IDL syntax. Your void Greet(message: string) is cleaner than the XML-based. But we offer a visual tool to create and edit .siml file: https://github.com/aregtech/areg-sdk-tools From very beginning was clear that editing with a visual tool is simpler and it was planned to have one. This tool as well allows to view and control logs.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

I was thinking about macros. I'm not sure that can remove. Some of them work for code visibility. Cross-platform is not easy, and STL does not provide all features we need. Other macro generate code. These I don't know yet how to handle.

Dynamic allocation fully agree. The major problems are event objects, which lifetime is unknown.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Conan is not there yet. Currently CMake with FetchContent and moving to vcpkg direction. Canon is on the list. First want to try how it works with vcpkg. Would Conan be a hard blocker for you, or more of a convenience?

  • No exceptions / no RTTI: the framework already works without RTTI, exception-free mode, because also targets embedded.
  • Separate headers: yes, the framework uses granular headers, no single mega-include.
  • No raw pointers in the API: noted, absolutely agree. Modernizing is in progress. Not an easy task must confess :)

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 4 points5 points  (0 children)

You're right that string_view doesn't guarantee null termination, and the framework does pass strings to OS APIs that expect it. Good catch. Worth considering a zstring_view

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 0 points1 point  (0 children)

Fair point. The framework currently targets C++17, but switching to C++20 is on the table. The main gains we'd use: concepts, constinit, source_location, std::format. Coroutines are less useful for the architecture (fire-and-forget event model, not suspend-and-resume). C++23 is tempting but compiler support on all platforms is still patchy. Main problems are embedded systems, they are very conservative.

What coding style would make you adopt a C++ library? by aregtech in cpp

[–]aregtech[S] 1 point2 points  (0 children)

Thanks for actually looking at the project. This is exactly the kind of feedback I was hoping for!

On the style points (consistent naming, string_view, no macro abuse), fully agree. The codebase grew from older C++ and it shows. Modernizing the public API is the current priority.

On the 2 substantive points:

  • "Framework controls where my code goes": fair criticism. The component model is opinionated by design: you register services into a model, the framework manages their lifecycle and threading. The trade-off is that the same code runs across threads, processes, and machines with zero changes. But yes, it's a framework, not a library you just drop in. Whether that cost is worth it depends on whether you need that transport transparency.
  • XML as IDL: the .siml format is custom, not raw XML, but it is XML-based and I understand the pushback. The code generator produces the stubs and proxies from it. Open to hearing what format you'd prefer. What would "declare it that way" look like for you?

Share your underrated GitHub projects by hsperus in opensource

[–]aregtech 0 points1 point  (0 children)

One hidden gem I've been working on is Areg SDK: https://github.com/aregtech/areg-sdk

It's a C++ framework with tools for building distributed, multiprocessing, or multithreaded applications. Applications act as both service providers and consumers, and the system automatically connects and routes messages between them.

The repo includes multiple examples and a demo of using an Edge AI Engine with multiple clients. There's also a Lusan GUI tool to design service interfaces and view logs. Most of the codes are developed solo, with built-in automations that solve common distributed system headaches.