Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
A while ago i made a database framework in c++ and have been using it in various places, even made a wrapper for it for vb.net.
Now i have a new project that would require multiple programs accessing a single database and it would be wasteful to load up the database multiple times for every one of them not to mention the syncing horrors.
So I figured i would turn the framework into a standalone application and access to the data would be done in some xx magical way from those other programs. From what I've seen php and mysql do something like this..?
Problem is, I have no clue where to start. The only kind of cross program communication i've done is one program reading and writing directly into the other ones memory, seems kinda hacky though and I'm not sure if that sort of thing is going to fly with managed languages (I want to make it accessible in vb.net too).
Tips?
The most portable way to do IPC (inter-process communication) is probably going to be Sockets.
What about D-Bus? There ist a port for Windows.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am developing a Windows desktop app, it allows users to create accounts and then login. Once logged in it allows them to interact with other users, and even has a chat box in a certain area. This app will eventually be ported over to android and ios(hopefully). Considering that it fetches quite a bit of information over the internet is C++ the most appropriate language to program it in?(i know quite a bit of c++, enough to make this) or should I use HTML5 or something else.
EDIT: For simplicity, essentially what I would like to know is. What is the EASIEST language to program an application in that will accept username/password and allow users to interact with one another. This program will also be accepting payments within it. I would like to use a language that is easily ported over to Android and IOS.
This is a question that doesn't really have a good answer. It's like asking what color you should paint the garden shed. There are many correct answers, and they are all subjective, and most likely based on the answerer's personal experiences.
If you have had experience with C++, then by all means go for it. C++ and it's related languages have the capability to create message windows and interact over the internet, so it is a good possibility for you.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have seen recently that people use xml files as a database to store the settings. However, I don't know why exactly is it done. I am from a C/C++, Linux background. Thus, please help me to understand this concept. Any simple C/C++ example will help me to understand it's benefit better?
XML is a very common tool with tons of libraries to handle it. Although it isn't the most beautiful format in the world, it is possible to read and modify it by both hand and program. Probably one want to use it when program configuration modified by some gui or tool. If you intend manual configuration, it's probably better to choose something else, for example ini. This is why linux tools rarely use XML, BTW.
As a C++ programmer you'd probably find interesting the "boost::property_tree" library to deal with configs. Examples of usage included in the documentation. Also it provides with plenty of different backends to store configuration, so you haven't to stick to some one format.
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 8 years ago.
Improve this question
I'm working on a project where I need to integrate 2 simulation software packages; as in the output from one is to be used as input for the other one, and vice versa. The exchange of information happens at every time-step of the simulation, so it occurs very frequently. Both simulation packages have support for plugins: one of them supports plugins written in C, and the other supports plugins written in C++. Is there an elegant way to integrate these two plugins to make the software packages talk to each other? I thought about reading/writing files to hard drive, but I'm hoping that there is a better way to do this.
Thanks all!
Is SOAP or RESTful service an option? That would work in both C and C++
You definitely can use files to do that, but I wouldn't recommend writing them to the disk, but to use a Memory-mapped file. There are several libraries that implement this functionality, such as Boost C++. Java has the FileChannel class that handles it
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm wondering Which solution could be the best to interact with a C++ application and its data through CakePHP over a Windows environment.
I was thinking about creating an API, with Delphi or Java for example, which could work with JSON requests and which at the same time would be linked to the C++ application.
This is a very generic question but I would like to have any feedback about this or know if anyone have tried something similar before and what solution was implemented for it.
Thanks.
First, you need to define "best": Most performant, easiest to implement, best scalable, most portable...?
If you can modify the C++ application, I would not create a component in the middle (what you suggest to write in Delphi or Java) but instead add an interface which PHP can access directly. If you cannot do this then you need to create such a component, of course. In this case, roughly the same options exist as for embedding the interface in the C++ app:
A simple approach is to use sockets (see Interprocess communication within PHP with a continuous process?). A more heavyweight approach is http://activemq.apache.org/.
And of course you can expose a webservice (SOAP, REST, XML or JSON...). This is certainly a very portable interface but probably not the fastest (more layers in between).
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 2 years ago.
Improve this question
I not a DB expert, so am looking for advice for a web-based system I'm thinking of setting up.
The general set up of the system I have is that it will have a web-based interface (possibly in PHP) for logging in etc, and some C++ code running on the server doing some processing. Both the PHP and the C++ code will need read/write access to the MySQL DB.
So, (1) What is the best way to access/update a MySQL database with C++?
(2) Are there any issues/things I should be aware of with a DB that has concurrent access from both PHP and C++. I'm kinda assuming that the DB looks after all that...
Thanks,
Lehane
The DB should take care of concurrent access. You can consider using MySQL++ as a library to access mysql from C++ code. I only know of its existence, with no usage experience, so I cannot tell you about usability.