0

I read the "Cluster from scratch" document on this website : http://clusterlabs.org/doc/ ans I didn't find the answer to my questions :

1) I'm wondering if the Linux Cluster with Pacemaker + Corosync can be used with C++ programs. All the examples are for Apache servers and mostly webservices. Is it just possible ?

2) Is there any document/website that explains the possible links between the cluster status graph (online, active,...) and a potential C++ application graph (application running, stopped, ...).

TheFrenchGuy
  • 233
  • 1
  • 3
  • 14

3 Answers3

2

Short version: Resource agents can be written in any language including C++

Long version:

A resource agent is the glue between pacemaker and your daemon. Something that knows how to start, stop and health check your daemon but doesn't hang around afterwards.

Its not completely clear whether you want the agent to be in C++ or want to write an agent for a C++ daemon. I suspect you're asking about the first but really need the second. Best thing to do is say hello upstream (irc or public mailing list) so we can continue the discussion.

Beekhof
  • 391
  • 2
  • 4
  • Again!I think you're right! In fact my business tasks will be in C++ so I suppose the daemon will be in C++ ? I tried to send you a private message but can't find if it's possible on stackoverflow. – TheFrenchGuy Apr 27 '15 at 09:25
1

As I understand you need to create another type of resources, namely your own C++ application. If so then you will need to implement your own resource agent.

I would propose to look into a Dummy resource agent https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/Dummy and refactor it for your own needs. Read more about resource agents in https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc

-1

1) It is possible. I did some tests using c++ simple tcp code.

jdm
  • 1
  • 3