Usage-based Licensing framework [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 just trying to look at different licensing models and potential technical C++ implementations.
Suppose you have a desktop application including several algorithms (A1, A2, A3). This application is communicating with some server (potentially in the cloud). These "local" algos may be used independently. Is there any solution/framework out there which could allow us to bill their usage independtly?
For example, , one user uses algo A2 and A3. Before saving files, the software computes the final bill, sends it to some server, asks the user to pay it and generate the results file.
This would allow to ship a potentially expensive software "for free" to the users and without the risk for them to spend an enourmous amount of money upfront without being sure this software will actually be heavily used.
Related question: what are the risks?

Though your Pricing model is feasible for large scale and probably same as what cloud offers.
I don't think any native application would be scalable/feasible with this model.
Most of the License of software's that are too costly to buy for each user, they give a floater license and a cap limit of number of simultaneous users.
Pay as you use is great but it is same as cloud computing but then question is simple.
Do you want to reinvent the wheel?
Unless you don't want to invest in your own cloud server, you can easily put your application on other cloud.
If you are ready for investment into build and maintain your own cloud then you should go ahead.
Edit:
You can use web service or the payment method. Expose the web service for calculating the price to be incurred. I would personally use Java or C# for this purpose.
as java and C# have enough support for it, for the wrapper around the C++ code i would use any of the jni or C++/cli language support.
Another thing is, I have not come accross any open source tool for it, each web service has it's own requirements. You can get the architecture but no ready made work.
C++ code->webservice->price billing->result returned to caller.
Regarding Technical Difficulties.
It would not be possible to do things completely in C++, You may require many other tools with C++.

Consider such a scenario:
The program processes the data on the customer's computer, produces some cryptic data at this stage and calls home (your server).
The server there decodes the data, makes the final analysis and sends info to the client "It will costs you X dollars to see the result. Do you want to proceed?"
If yes, the client makes the payment and gets the result.

Related

Is there a native C++ connector for mariadb/mysql that is not just a wrapper for an older c connector? [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.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Has anyone released a native c++ connector for mariadb/mysql that is not a wrapper for a c connector api? I've googled around and can't find anything.
The reason I ask is to judge the ultimate value of using a c++ connector versus just implementing the c connector itself without the "middle man" of the wrapper. Every programming language is finally just a human interface between the cpu and the programmer. Some languages are more artfully rendered and powerful than others, but they are still only interfaces. We have...
dbase engine <- c connector <- c++ wrapper <- application
versus
dbase engine <- c connector <- application
Is the only advantage to this the fact that the programmer doesn't have to do conversions from C types to C++ types and classes on his own?
Why wouldn't I just use the old C connector and leave out the C++ wrapper? Is there ever a performance degradation because of the "middle man"?
There probably is no native C++ connector (for MySQL/MariaDB), since the libmysqlclient has a C API, and since the network protocol between that library and the server is not very well documented or defined. That protocol is rumored to have changed several times (with versions of MySQL).
Regarding performance, it does not matter much in practice, since most of the time the SQL server is not on the same host as the client, so there is real netwoking (e.g. 1Gbit/sec ethernet) between them - which practically speaking is already a bottleneck (things could be different if the SQL server & the client are on the same host e.g. on localhost; but that is not very usual). A typical network interaction means kilobytes on the wire, so several milliseconds.
BTW, several (and probably most) SQL requests may require real hard disk access (at least when the entire database is big enough to not fit in RAM), which means many milliseconds. (Things are faster with SSD disks).
So in practice, it generally does not matter to go thru two layers of connectors (this costs only some dozens of microseconds).
BTW, if you are in the rare case where the data is on the same machine as your database client, you could consider Sqlite instead. If performance is very important to you, you might give up SQL and use indexed files à la GDBM
AFAIK, indexing is much more important performance-wise than the two layers of connectors: a good indexing may avoid several disk accesses!
Of course, I am thinking of large enough databases which do not fit in RAM. If your database is only a hundred megabytes, everything sit in RAM. And I am not an expert in databases or in MySQL
Since MySQL (& Mariadb) is free software, you could study the source code of libsqlclient, understand all the details of the protocol, and reimplement it (in a free GPL licensed library) in genuine C++ (or in Ocaml, etc.). But I don't think it is worth the effort.
Yes: https://launchpad.net/mariadb++
But there's no documentation and it hasn't seen any updates since it was first released over two years go.

Software Engineering for REST APIs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
At my last project we designed an issue documentation system component (like a bug reporting tool) which should integrate into different Client Applications (Desktop Applications, Mobile Apps and also standalone into a Webclient). The focus was not on the Application/UI itself, but on its functional capabilities as a service. Think of it like the Google Search API, which also can be integrated in your Browser, as a widget, on your phone, and so on.
While defining functional (Use Cases) and nonfunctional requirements I came in great trouble to define them without getting UI specific, because we wanted to get a kind of service.
As a Workaround, we simply defined our requirements to fit on a standalone Webapplication plus the nonfuntional requirement that all function calls have to be done via a RESTful Service API, hoping that we won't miss any function afterwards, when using this API in an Desktop Application for example. Due to the fact, that we don't actually want a webapp in the first place, but a service, I am not very happy with this indirect way of requirement analysis, and I hope, that our developers get the point.
So my question is: How are REST APIs or Webservices designed in a way, that a developer knows what to do? Is there a UML UseCase profile for webservices for example?
Do not Forget : Use cases are just "half of the whole story"
You will have non-functional requirements also.You can not capture every important detail with use cases.
Then Ask Yourself : Are Use Cases Right For Me?
Use Cases are generally good for "interactive systems": systems that has interaction with user.They are good for capturing "functional" requirements.
Use Cases are not good for some systems. Be open-minded. While writing
your use cases, you see that this does not capture what you want or does not add
any value try-start with alternative tecniques such as just plain
Feature List.
Find The Root Cause
Ask yourself "Why I came in great trouble to define my reqirements without getting UI specific details"?
Pick Your Battles : Quality Scenarious + Arhitectural Factor Table
Identify your architecturally significiant requirements. One good way to define them is "Quality Scenarious":
Quality Scenarios are short statements of the form [stimulus]
[measurable response]
For example: When a new bug report entered to the Bug System[stimulus],it will sended to the bug owner mobile phone within 5 minute under X conditions.[measurable response]
Then can create a Architectural Factor Table with Quality Scenarious
Architectural Factor Table is a tool that help you to understand the
influence of factors, priorities and variability.
Here is a sample Factor Table from Craig Larman book: Applying UML and Patterns
"Guarantee that the software do what you want"...
So write your test first...Or create "executable" specifications...
And communicate...
Finally
There is nothing like Software Engineering for REST APIs.:-)
Looking at the definition of software requirements specification, you can specify a RESTful API as a technical requirement in the perspective of the product use such as Software Interfaces (i.e. Overall description, Product perspective, Software interfaces). This is not a functional requirement. It is only a technical requirement of your project.
There are no UML Use Case profile because UseCase intends to specify functional requirements. You can specify the interaction of users accessing your system through the RESTful API considering the functional access and data exchange in a regular Use Case.
All the characteristics required from the expected RESTful API should be specified as a technical requirement (i.e. Specific requirements, External interface requirements). The developer knows what to do considering all requirements of the application.

IDL-like parser that turns a document definition into powerful classes? [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 8 years ago.
Improve this question
I am looking for an IDL-like (or whatever) translator which turns a DOM- or JSON-like document definition into classes which
are accessible from both C++ and Python, within the same application
expose document properties as ints, floats, strings, binary blobs and compounds: array, string dict (both nestable) (basically the JSON type feature set)
allow changes to be tracked to refresh views of an editing UI
provide a change history to enable undo/redo operations
can be serialized to and from JSON (can also be some kind of binary format)
allow to keep large data chunks on disk, with parts only loaded on demand
provide non-blocking thread-safe read/write access to exchange data with realtime threads
allow multiple editors in different processes (or even on different machines) to view and modify the document
The thing that comes closest so far is the Blender 2.5 DNA/RNA system, but it's not available as a separate library, and badly documented.
I'm most of all trying to make sure that such a lib does not exist yet, so I know my time is not wasted when I start to design and write such a thing. It's supposed to provide a great foundation to write editing UI components.
ICE is the closest product I could think of. I don't know if you can do serialization to disk with ICE, but I can't think of a reason why it wouldn't. Problem is it costs $$$. I haven't personally negotiated a license with them, but ICE is the biggest player I know of in this domain.
Then you have Pyro for python which is Distributed Objects only.
Distributed Objects in Objective-C (N/A for iPhone/iPad Dev, which sucks IMHO)
There are some C++ distributed objects libraries but they're mostly dead and unusable (CORBA comes to mind).
I can tell you that there would be a lot of demand for this type of technology. I've been delving into some serialization and remote object stuff since off-the-shelf solutions can be very expensive.
As for open-source frameworks to help you develop in-house, I recommend boost::asio's strands for async thread-safe read/write and boost::serialization for serialization. I'm not terribly well-read in JSON tech but this looks like an interesting read.
I wish something freely available already existed for this networking/serialization glue that so many projects could benefit from.
SWIG doesn't meet all your requirements, but does make interfacing c++ <-> python a lot easier.

Integrating with Sage Financial Software [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have recently been asked to develop an application that will have to integrate with Sage Line 50 financial software.
I've done some googling and I am surprised at the lack of info on interfacing with Sage from Java or .Net.
Is Sage such a black box that you need to sign up to a Sage Developer program before you get any info?
Are there any open source options to allow apps to talk to Sage?
Any info appreciated.
Cheers
Paul
Theres a new methodology Sage are moving to called SData. I think you can read about this at http://sdata.sage.com/
The long term aspiration is that SData will provide full CRUD facilities and simplify integration between different Sage programs (of which there are many!) and therefore provide a consistent web service that 3rd party applications can be integrated with too.
Looking on the Sage UK site I found the following Developer SDK.
Upshot is that you need to use .Net if you want to use the SDK.
Problem is that the SDK is only available under the Developer programme which starts at £1500: Here's the brochure.
However the developer programme does give you free copies of the Sage software for development purposes, so I can see the benefits if your business is Sage integration.
Another option is an addon for Sage which is sold by Sage for £299
http://shop.sage.co.uk/pdf/connect_for_Sage_50.pdf
This gives an XML import/export facility, this may be enough for my purposes.
I've done quite a bit with Sage Line 50 V9 (a couple of versions old, I know). Sage provide an ODBC driver which you can happily talk to with ADO & ADO.NET. The driver is however read-only which may or may not be an issue to you. There do seem to be some limitations with SQL queries though - in particular, double joins don't work (a JOIN b JOIN c) & need to be flattened-out. Also, the DISTINCT keyword doesn't seem to be recognised. Hope this of some use.
Going back a few years, but Sage also used to provide a read-write API (not ODBC based) for accessing the data in their products.
I'm not surprised that you need to join the developer program - Sage is a traditional closed source commercial application - it's unlikly to have open source options available for it.
Joining the dev program used to be free for Sage customers, which the people you are working for should be, surely...?
EDIT - yikes, not free any more

Managing features on a license basis for a C++ application [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
We are trying to offer a license mechanism for every feature our Linux application is running, and we are thinking of controlling it in a centralized way using a license server:
Our aim for licensing is:
Deny features the operator has not bought.
Offer trials (features which expire if they are not bought).
Activate features for periods of time, and make them available just for some period of time.
Is there any server license which allow us to do this (basically, we would use sockets to communicate with our application)? What else can we do (for example, use some open source software, read, etc.) to get started?
Do you really need to "phone home"?
I've seen a relatively painless license system, through which the user was provided an XML file that described the period the license was valid, an optional IP address, and the list of "unlocked" features. A digital signature was generated using the vendor's private key, which was reinserted into the license file. At startup, the application was reading the license, validating it, checking the IP and unlocking the features accordingly.
The vendor can provide newer licenses to the client when needed.
Although you could theoretically fool the license by changing the machine's local time and fudging with the IP address, in that case this would have made the application quite cumbersome to use, so this was not a problem.
If you really want to use a license server then make sure that your application does not have to contact it all the time to authorise use - this will lead to no end of problems when people lose their Internet connection or your server goes down or crashes.
I would suggest having something where a key is downloaded and stored locally, thus reducing round trips to the server all the time. The key can be encrypted based on the user's machine details so that keys cannot be shared.
We've used the HASP hardware key in the past and while they defnitely work and provide a solution, I don't think they are what you want as they are programmed once and that's that. For example, you wouldn't be able to update the HASP key to close a trial period.
There are times when software does need protection - check out these guys here - they provide hardware and software solutions.
FLEXnet (formerly known as FLEXlm) is a licensing package that is commonly used by high-end or specialized software packages, for example in the electronic design automation market. You can lock a license to a single machine (by hostid, usually an Ethernet MAC address) or to a portable hardware dongle, or have a networked server handle sharing a limited pool of concurrent licenses to clients running your software. Licenses can be granted for a limited time or permanently, and also can be limited by a version number. A license file describes the features that are licensed.
FLEXnet includes several APIs for integrating with your application, including one for C++. I imagine it uses public key cryptography of some kind. Generally, an application using FLEXnet only "phones home" when you ask it to through your use of the API. Many applications check the license once, at startup, or reserve a license from the pool for the duration of the application's runtime.
You pay an annual license fee, of course, to use FLEXnet in your products, starting above USD 1k. The fee varies by the revenue of your company and by the number of platforms (OS/CPU combination) you want your licensing scheme to be able to run on.
I would say it's not worth it to use something like FLEXnet if your product sells for less than several thousand USD per seat. It is onerous to use (the source of a good percentage of support calls for our company), but corporate customers may already be familiar with using it, depending on the market.
FLEXnet, like every DRM scheme I've heard of, is easily cracked. At least I assume it is, since unlocked versions of our products are regularly found on warez sites.
This is such a Dilbert-esque way of doing things. Just say no.
Although hated, this is a standard feature in high-end specialized software which costs tens of thousands of dollars. Think 3D scanners and CNC stuff.
If you do plan to code something up yourself, a common mechanism that I have seen is to tie the license to a MAC address.
Having used various packages that make use of license servers like this, I can tell you it is one sure way to make your software universally hated by its users.
A common licensing software is flexlm. However I would think twice if I would impose these restrictions on my users. Many users dislike them; especially from the FOSS/Linux environment.