Is there any JSON-RPC implementation in C++ that is transport-agnostic? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am currently looking for a JSON-RPC library that implements the 2.0 specification and is, or at least can be easily adapted to be, transport-agnostic, implemented in c++ and have as few dependencies as possible.
In my search for it, I already looked for on the obvious places and the more comprehensive collections below:
http://json-rpc.org/wiki/implementations (outdated info)
https://en.wikipedia.org/wiki/JSON-RPC
Header-only / standard c++11 implementation, for a quick drop in a new project, that can be used on different platforms is a plus!
Please note that I am not looking for a recommendation on which one is best or not, as I can most likely judge that myself. What I am asking is if anybody else know about a library that meet those technical requirements above, or at least already found a way to work around those requirements using an implementation that is public available.
Thank you.

After a lot of digging, the closest I could find that meet those requirement, specifically the one to be able to be adapted to be transport-agnostic was:
https://github.com/erijo/xsonrpc
It is still not a header-only implementation, and it has some external dependencies that makes it cumbersome to compile/use on different platforms and projects, but it was still the closest one I could find.
I might adapt this one to make it 100% in compliance with the original requirements of my question. Will update the question when I do so.
UPDATE
Using xsonrpc as a starting point, I put together an implementation that satisfy all those requirements and published as an opensource project:
https://github.com/uskr/jsonrpc-lean - include-only, transport-agnostic JSON-RPC 2.0 client/server implementation

Related

quickJS documentation and/or well commented projects [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am porting an in-house system from Duktape to quickJS to take advantage of the support for ES6 features and good module support (including dynamic imports).
Have ported some simple class libraries to be imported as shared object modules. But getting stumped with more advanced inter-operation issues. quickjs.h contains approximately 400 entries, but there are less than 2 pages of documentation for the C-API.
Any suggestions as to where more detailed documentation could be found?
Failing that pointers to any well documented project using quickJS might help. Yes, I have Googled and haven't found anything useful.
I am also in the same boat,QuickJS docs & examples are hard to find here are the best ones I found so far :
https://github.com/sntg-p/QuickJS-raylib : very nice as it wraps a good portion of the relatively large RayLib API
https://github.com/saghul/txiki.js might also have some nice things (as it wraps libuv amomngs other things
a more simple example https://github.com/calbertts/async-quickjs
hope the above examples help !

google test/mock vs boost vs catch support for c++14/c++17 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
The community reviewed whether to reopen this question 29 days ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am evaluating which testing framework would be ideal for me.
The choice is among these three: google test, boost.test and catch.
I would like something robust that has not so many dependencies and that is able to support C++14/C++17 if needed.
Another question, do you know which framework big companies in the avionics/space fields use?
I would like something robust that has not so many dependencies and that is able to support c++14/c++17 if needed.
Google C++ test framework requirements mention:
A C++98-standard-compliant compiler
It works just fine with C++14, I personally use it. From the linked documentation you can see that it has no dependencies on external libraries (see section requirements).
Catch known limitations mention:
our desire to support C++98 compilers
It works just fine with C++14, I personally used it in a couple of projects at work. Catch is a header only library, it has no dependencies at all.
Boost C++ libraries usually perform compile-time detection of compiler support for the standards and features are enabled/disabled depending on the result.
As a rule of thumb, those libraries usually depend on some other libraries picked up from Boost itself.
do you know which framework big companies in the avionics/space fields use?
Often they require not only to write tests but also to have a code coverage estimation. There are a plenty of professional tools for that, few of them are for free and (at least, as long as I know) there doesn't exist a standard de facto for that.

Policy based design in a real world open source project [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can anybody point me to an open source C++ project(preferably not a lib), where policy based design is extensively used?
Well, I suppose that any C++ application using the STL containers (parameterized by an Allocator and, sometimes, a Comparator) extensively use Policy-Based design. It's been a corner stone of the STL even seen it saw the light at SGI.
The obvious one by Alexandrescu: Loki
It's being actively developed.
any project that is using boost :-) http://www.boost.org/community/generic_programming.html#policy
if you mean initiating policy-based objects, than it would be a lot of projects that use boost. For example, http://programmingexamples.net/wiki/CPP/Boost/BGL/DijkstraDirected
or you can look at big projects on github https://github.com/search?q=%23include+%3Cboost%2Fgraph%2Fgraph_traits.hpp%3E&type=Code&ref=searchresults
if you mean defining policy-based object, than most of the use cases would be libraries. The reason for that is that if somethings needs a lot of customization and can be generalized, it becomes a library (even if for internal use). If you just writing a straightforward program that doesn't need customization of objects and poly-morphism, than it wouldn't use much of policy-based design.
for those, you can also search on github, trying out some common policy-based syntaxes.
In my scientific work, I use boost's odeint library that relies on policies. When I code, i start with a specialized hamiltonian, than I generalize it with policies and it basically becomes a library that I use in many other projects.

Is there any clear, entry level documentation available for boost-spirit? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've tried to wade through the official documentation on the Boost Spirit page, but I find it completely unintelligible (despite 25+ years programming experience and an English Language degree) -- it's clearly written by somebody who knows the system well (good) but assumes that the reader also knows the system well (bad). I need something that won't throw sentences like
Parsers and generators in Spirit are fully attributed
clearly a meaning of "attributed" I am unaware of, and a web search doesn't help. Or
Sequences require an attribute type to expose the concept of a fusion sequence, where all elements of that fusion sequence have to be compatible with the corresponding element of the component sequence
What is a fusion sequence? The only one I know is happening in the Sun. How in C++ does one "expose" a "concept"?
Are there any good tutorials describing Boost Spirit from a beginner's perspective?
I've found this documentation to be a good read for Boost.
http://en.highscore.de/cpp/boost/parser.html

qpThreads documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any documentation on qpThreads? In what way is it different from pthreads?
It looks like qpthread has become a sourceforge project. It hasn't changed in four or five years from the CVS repository and doesn't seem to contain any documentation. Chances are that if you don't have docs on it, then none exist save for the source code and headers of course.
I grabbed the source out of curiosity and it looks like a pretty standard threading implementation that is layered over pthreads. The largest difference is that pthreads is a C-style interface and qpThreads is an OO interface more akin to what you might find in Java. I haven't delved into it very deeply, but you might want to look at the interfaces like java.util.Timer and java.util.concurrent. Some of the interfaces look quite similar to what qpThreads offers.
You might want to investigate replacing it with Boost.thread or something more recent. Chances are that you will have better luck maintaining it. It shouldn't be that hard to do depending on how much code you have to deal with.
From a cursory look at google search results, qpThreads seems to be an obscure C++ threading class library. pthreads is a very widely used, POSIX-compliant, multi-platform threading C API.
The most important thing about using libraries is making sure they are actively maintained.
You should use a well known and heavily used library if possible. This way you will also have a vast number of people to ask questions if you have any.
Please see this similar SO question for more details:
Good c++ lib for threading (or use the search box for more).
Found some documentation finally.
Sourceforge qpthreads