Does anyone know if Microsoft plans to implement an C#
(.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API? 17 25446
Now that would be pretty cool...
I haven't seen the API but it must be very low level to support data sync
and load balancing, etc. A managed wrapper may not be possible or
desirable...
But I wonder if one could design a C# clustering api using msmq, sockets,
and wmi? What would go into such a project?
ok,
aq
"Peter Ericsson" <pe**************@ericsson.com> wrote in message
news:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API?
There is a big difference between a wrapper and implementing an API.
The MS cluster API's (cluster resources) are implemented using C/C++ , the
reason is high reliability, efficiency and a low memory footprint, something
that managed code doesn't offer, as it was not designed to be used as a
system level platform.
The cluster management API's are available as native C/C++ API's and a set
of COM interfaces, so if you only need to manage MS cluster server, you
could wrap the COM api.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote in message
news:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API?
OP was talking about MS cluster server API's , not sure what this has to do
with msmq sockets and WMI.
Willy.
"Ahmed Qurashi" <ah**********@gmail.com> wrote in message
news:uy**************@TK2MSFTNGP12.phx.gbl... Now that would be pretty cool...
I haven't seen the API but it must be very low level to support data sync and load balancing, etc. A managed wrapper may not be possible or desirable...
But I wonder if one could design a C# clustering api using msmq, sockets, and wmi? What would go into such a project?
ok, aq
"Peter Ericsson" <pe**************@ericsson.com> wrote in message news:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API?
Yup, a bit offtopic there...just wondering aloud what a c# implementation of
an open source clustering software architecture would look like..
ok,
aq
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message
news:O%******************@TK2MSFTNGP09.phx.gbl... OP was talking about MS cluster server API's , not sure what this has to
do with msmq sockets and WMI.
Willy.
Based on the same "shared clustering" technology used by Windows cluster
server? IMO it would be written in C and C++ and some assembly.
Don't forget that WCS consists of a low level device driver and a filter
driver, a service and a number of resource managers that expose the cluster
API's to consumers.
The driver can't be written in managed code point. The service could be
written in C#, the resource managers also, but the cluster aware resources
(think SQL server, Exchange, the file server service ...) expect a C
function export as API style, that means your resource managers must be
written in C (or C++) too. What's left is your service, but I don't expect
you would implement this one in managed code if all others are unmanaged.
Willy.
"Ahmed Qurashi" <ah**********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Yup, a bit offtopic there...just wondering aloud what a c# implementation of an open source clustering software architecture would look like..
ok, aq
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message news:O%******************@TK2MSFTNGP09.phx.gbl... OP was talking about MS cluster server API's , not sure what this has to do with msmq sockets and WMI.
Willy.
My only interest is to manage the cluster. Start and stop
resorces, get notifications when they fail, find out what
kind of resources are available in the cluster and so on.
I mean these kind of methods are available for windows
services but not for clustered resources.
I'm not an COM expert so I'd rather stick to C#.
/Peter -----Original Message----- There is a big difference between a wrapper and
implementing an API.The MS cluster API's (cluster resources) are implemented
using C/C++ , thereason is high reliability, efficiency and a low memory
footprint, somethingthat managed code doesn't offer, as it was not designed
to be used as asystem level platform. The cluster management API's are available as native
C/C++ API's and a setof COM interfaces, so if you only need to manage MS
cluster server, youcould wrap the COM api.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote
in messagenews:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++
API?
.
The management API's are also available through COM, that doesn't mean you
can't use C# to access them, simply create a interop assembly from the
automation server dll (msclus.dll) and use the API's from C#.
However, the "automation server API's" don't support notifications, a much
better "managed" option is to use System.Management namespace classes and
the WMI cluster classes MSCluster_XXXX to build cluster management
applications using C#.
I can post a sample of the latter if you are interested.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote in message
news:25****************************@phx.gbl... My only interest is to manage the cluster. Start and stop resorces, get notifications when they fail, find out what kind of resources are available in the cluster and so on. I mean these kind of methods are available for windows services but not for clustered resources.
I'm not an COM expert so I'd rather stick to C#.
/Peter-----Original Message----- There is a big difference between a wrapper and implementing an API.The MS cluster API's (cluster resources) are implemented using C/C++ , thereason is high reliability, efficiency and a low memory footprint, somethingthat managed code doesn't offer, as it was not designed to be used as asystem level platform. The cluster management API's are available as native C/C++ API's and a setof COM interfaces, so if you only need to manage MS cluster server, youcould wrap the COM api.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote in messagenews:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API?
.
Willy,
I would be very interested in seeing such a sample. What are the WMI
Cluster Classes you mention? I have a similar need - to monitor and restart
if needed a service on a cluster, and have not had much luck to date finding
manged objects to allow me to perform this simple task. I could always issue
shell commands, but thats just ... klugy. :)
Your help would be MOST appreciated!
Chuck Haeberle
"Willy Denoyette [MVP]" wrote: The management API's are also available through COM, that doesn't mean you can't use C# to access them, simply create a interop assembly from the automation server dll (msclus.dll) and use the API's from C#. However, the "automation server API's" don't support notifications, a much better "managed" option is to use System.Management namespace classes and the WMI cluster classes MSCluster_XXXX to build cluster management applications using C#.
I can post a sample of the latter if you are interested.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote in message news:25****************************@phx.gbl... My only interest is to manage the cluster. Start and stop resorces, get notifications when they fail, find out what kind of resources are available in the cluster and so on. I mean these kind of methods are available for windows services but not for clustered resources.
I'm not an COM expert so I'd rather stick to C#.
/Peter-----Original Message----- There is a big difference between a wrapper and implementing an API.The MS cluster API's (cluster resources) are implemented using C/C++ , thereason is high reliability, efficiency and a low memory footprint, somethingthat managed code doesn't offer, as it was not designed to be used as asystem level platform. The cluster management API's are available as native C/C++ API's and a setof COM interfaces, so if you only need to manage MS cluster server, youcould wrap the COM api.
Willy.
"Peter Ericsson" <pe**************@ericsson.com> wrote in messagenews:1d****************************@phx.gbl... Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++?
Or has someone else written a C# wrapper for the C++ API?
.
hi.. i'm a newbie here.. i think i have the same problem with you
peter..
i've been researching for almost a month now regarding applications/
example codes for remote cluster administration for windows 2000
advanced server using asp/vb.net.. but unfortunately, i can't see
something that is similar to my project.. hope you can give me some
ideas regarding this..
this is my problem:
we want to display on a webpage the current active nodes of clustered
servers. for ex we have:
server1a,server1b
server2a,server2b
server3a,server3b
and the current active nodes are server1a, server2b, and server2b..
how can i do that in asp/vb.net? i'm developing remotely from the
servers using XP and vs.net..
and also, we want to configure the resources (eg: diskspaces, database,
windows services) from the owner (which is the active node)
anyone? please share your ideas.. i'm really frustrated now.. :sigh:
hope you can help me.. thanks..
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
i've been researching for almost a month now regarding applications/
example codes for remote cluster administration for windows 2000
advanced server using asp/vb.net.. but unfortunately, i can't see
something that is similar to my project.. hope you can give me some
ideas regarding this..
this is my problem:
we want to display on a webpage the current active nodes of clustered
servers. for ex we have:
server1a,server1b
server2a,server2b
server3a,server3b
and the current active nodes are server1a, server2b, and server2b..
how can i do that in asp/vb.net? i'm developing remotely from the
servers using XP and vs.net..
and also, we want to configure the resources (eg: diskspaces, database,
windows services) from the owner (which is the active node)
anyone? please share your ideas.. i'm really frustrated now.. :sigh:
hope you can help me..
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Chuck Haeberle" <Ch***********@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com... Willy,
I would be very interested in seeing such a sample. What are the WMI Cluster Classes you mention? I have a similar need - to monitor and restart if needed a service on a cluster, and have not had much luck to date finding manged objects to allow me to perform this simple task. I could always issue shell commands, but thats just ... klugy. :)
Your help would be MOST appreciated! Chuck Haeberle
Herewith a small sample that illustrates how one can use System.Management
and WMI to write cluster management application, note that the cluster needs
to run W2K3 for this to work.
using System;
using System.Management;
class App {
[MTAThread]
public static void Main() {
string clusterName = "MyCluster"; // cluster alias
string custerGroupResource = "FS_Resource1"; // Cluster group name
ConnectionOptions options = new ConnectionOptions();
options.Username = "ClusterAdmin"; //could be in domain\user format
options.Password = "HisPassword";
// Connect with the mscluster WMI namespace on the cluster named "MyCluster"
ManagementScope s = new ManagementScope("\\\\" + clusterName +
"\\root\\mscluster", options);
ManagementPath p = new ManagementPath("Mscluster_Clustergroup.Name='" +
custerGroupResource +"'");
using(ManagementObject clrg = new ManagementObject (s, p, null ))
{
// Take clustergroup off line and read its status property when done
TakeOffLine(clrg);
clrg.Get();
Console.WriteLine(clrg["Status"]);
System.Threading.Thread.Sleep(3000); // Sleep for a while
// Bring back online and get status.
BringOnLine(clrg);
clrg.Get();
Console.WriteLine(clrg["Status"]);
}
}
static voidTakeOffLine(ManagementObject resourceGroup)
{
ManagementBaseObject outParams =
resourceGroup.InvokeMethod("Takeoffline", null, null);
}
static void BringOnLine(ManagementObject resourceGroup)
{
ManagementBaseObject outParams =
resourceGroup.InvokeMethod("Takeoffline", null, null);
}
}
Check the MSDN documentation for all other WMI mscluster namespace classes,
and write some small programs to exercize the features offered by the
individual classes.
If in doubt about some property or feature, load wbemtest.exe and connect to
the cluster namespace. Wbemtest allows you to get/change the properties of
cluster resources and execute the methods exposed by the mscluster classes.
Willy.
rWilly - thank you very much! Very interesting.
However I have in the meantime, managed to find another solution using
msclus.dll which we copied to my XP dev machine from a Server 2003 machine.
First I registered msclus.dll using regsvr32
I added msclus.dll as a reference to my project, allowing .NET to build a
standard com interop layer for me.
It's a little more brute force but it is working for us:
using MSClusterLib;
...//..
static void Main(string[] args)
{
ClusterClass cluster = new ClusterClass();
cluster.Open("MDSQLDEV");
Console.WriteLine(cluster.Name);
Console.WriteLine(cluster.Version);
ClusResourcesClass resources = (ClusResourcesClass)cluster.Resources;
for(int i=0; i< resources.Count; i++)
{
ClusResourceClass resource = (ClusResourceClass)resources[i+1];
if(resource.Name == "Ciena NetworkTracker Escalation Manager")
{
Console.WriteLine(resource.Online(30).ToString());
break;
}
}
for(int i=0; i< resources.Count; i++)
{
ClusResourceClass resource = (ClusResourceClass)resources[i+1];
if(resource.Name == "Ciena NetworkTracker Escalation Manager")
{
Console.WriteLine(resource.Offline(30).ToString()) ;
break;
}
}
}
"Willy Denoyette [MVP]" wrote: "Chuck Haeberle" <Ch***********@discussions.microsoft.com> wrote in message news:A7**********************************@microsof t.com... Willy,
I would be very interested in seeing such a sample. What are the WMI Cluster Classes you mention? I have a similar need - to monitor and restart if needed a service on a cluster, and have not had much luck to date finding manged objects to allow me to perform this simple task. I could always issue shell commands, but thats just ... klugy. :)
Your help would be MOST appreciated! Chuck Haeberle
Herewith a small sample that illustrates how one can use System.Management and WMI to write cluster management application, note that the cluster needs to run W2K3 for this to work.
using System; using System.Management; class App { [MTAThread] public static void Main() { string clusterName = "MyCluster"; // cluster alias string custerGroupResource = "FS_Resource1"; // Cluster group name ConnectionOptions options = new ConnectionOptions(); options.Username = "ClusterAdmin"; //could be in domain\user format options.Password = "HisPassword"; // Connect with the mscluster WMI namespace on the cluster named "MyCluster" ManagementScope s = new ManagementScope("\\\\" + clusterName + "\\root\\mscluster", options); ManagementPath p = new ManagementPath("Mscluster_Clustergroup.Name='" + custerGroupResource +"'"); using(ManagementObject clrg = new ManagementObject (s, p, null )) { // Take clustergroup off line and read its status property when done TakeOffLine(clrg); clrg.Get(); Console.WriteLine(clrg["Status"]); System.Threading.Thread.Sleep(3000); // Sleep for a while // Bring back online and get status. BringOnLine(clrg); clrg.Get(); Console.WriteLine(clrg["Status"]);
} } static voidTakeOffLine(ManagementObject resourceGroup) { ManagementBaseObject outParams = resourceGroup.InvokeMethod("Takeoffline", null, null); } static void BringOnLine(ManagementObject resourceGroup) { ManagementBaseObject outParams = resourceGroup.InvokeMethod("Takeoffline", null, null); } }
Check the MSDN documentation for all other WMI mscluster namespace classes, and write some small programs to exercize the features offered by the individual classes. If in doubt about some property or feature, load wbemtest.exe and connect to the cluster namespace. Wbemtest allows you to get/change the properties of cluster resources and execute the methods exposed by the mscluster classes.
Willy.
"Chuck Haeberle" <Ch***********@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com... rWilly - thank you very much! Very interesting.
However I have in the meantime, managed to find another solution using msclus.dll which we copied to my XP dev machine from a Server 2003 machine.
First I registered msclus.dll using regsvr32 I added msclus.dll as a reference to my project, allowing .NET to build a standard com interop layer for me.
It's a little more brute force but it is working for us:
using MSClusterLib; ..//.. static void Main(string[] args) { ClusterClass cluster = new ClusterClass();
cluster.Open("MDSQLDEV");
Console.WriteLine(cluster.Name); Console.WriteLine(cluster.Version); ClusResourcesClass resources = (ClusResourcesClass)cluster.Resources;
for(int i=0; i< resources.Count; i++) { ClusResourceClass resource = (ClusResourceClass)resources[i+1]; if(resource.Name == "Ciena NetworkTracker Escalation Manager") { Console.WriteLine(resource.Online(30).ToString()); break; } }
for(int i=0; i< resources.Count; i++) { ClusResourceClass resource = (ClusResourceClass)resources[i+1]; if(resource.Name == "Ciena NetworkTracker Escalation Manager") { Console.WriteLine(resource.Offline(30).ToString()) ; break; } } }
Chuck ,
Right, this is the way to go when you have W2K based clusters. The only
problem here is that you can't handle cluster event notifications.
Note that the mscluster WMI stuff is only available on W2K3 and the
documentation is a bit lacking but the provider seems to do it's job pretty
well.
Willy.
i've used this code in vb.net and added msclus.dll
__________________________________________________ __
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim objcluster, colResTypes, colResType, colResTypeResources,
clusResource, colClusProperties
objcluster = CreateObject("MSCluster.Cluster")
colResTypes = CreateObject("MSCluster.ClusResTypes")
colResType = CreateObject("MSCluster.ClusResType")
colResTypeResources =
CreateObject("MSCluster.ClusResTypeResources")
clusResource = CreateObject("MSCluster.clusResource")
colClusProperties = CreateObject("MSCluster.ClusProperties")
objCluster.Open("CVSPWCLSTR")
colResTypes = objCluster.ResourceTypes
colResType = colResTypes.Item("TextBox1.Text")
colResTypeResources = colResType.Resources
For Each clusResource In colResTypeResources
colClusProperties = clusResource.CommonProperties
MsgBox(TextBox1.text & " resource name: " & "
clusResource.Name ")
Next
it says RPC not available..
pointing to objCluster.Open("CVSPWCLSTR")
does it means access denied? i'm executing remotely from the cluster and
i'm using xp with vb.. i don't have enought administrative rights but i
can use some admin account if i'll use the Remote desktop
connection..how to access that with using remote desktop connection? any
ideas? thanks..
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
hi willy,
I tried your code snippet but it does not seem to work with my clusters.
Is this supposed to work if i run it from a remote machine.
My cluster is on an IA64 win2k3 machine and i am running this program
from a 32 bit machine.
Also i could not find 'Mscluster_Clustergroup' on msdn?
thanks
*** Sent via Developersdex http://www.developersdex.com ***
"sarita" <an*******@devdex.com> wrote in message
news:ez****************@TK2MSFTNGP10.phx.gbl...
|
| hi willy,
| I tried your code snippet but it does not seem to work with my clusters.
| Is this supposed to work if i run it from a remote machine.
| My cluster is on an IA64 win2k3 machine and i am running this program
| from a 32 bit machine.
| Also i could not find 'Mscluster_Clustergroup' on msdn?
| thanks
|
Not sure what code you are talking about, do you mind posting what you have
and doesn't seem to work.
It should work from a remote machine, and that's the only way you should
ever use it.
MSCluster_ResourceGroup is probably what you are looking for.
Willy.
hi willy,
As per my understanding i have two choices for writing a C# cluster
management application.
1. Use msclus.dll
does not support event notification??
2. use system management with WMI.
What are the advantages/disadvantages of both methods?
My requirement is that the application would run on a remote machine and
may have a different platform than the cluster nodes. Authentication
would be windows auth.
thanks.
*** Sent via Developersdex http://www.developersdex.com *** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Leonardo C |
last post by:
Hi:
I'm trying to setup a MS Cluster but I don't know if it is feasible to
configure it in the way I think.
I have two machines with win2k server and MSSQL-2000 one of them is
currently...
|
by: williams |
last post by:
I am trying to encrypt data in a SQLServer 2000 Cluster using Microsoft
EFS. I have successfully encrypted a standalone DB but we are having
difficulty with the Cluster. I am only encrypting the...
|
by: richardshen |
last post by:
DB2 V8 on windows 2003 cluster server.
DB2MSCS -f:db2.cfg
DB2 instance is in the cluster now.
DB2MSCS -u:db2
DB2 instance is in the local node now.
I want to cluster the instance again
DB2MSCS...
|
by: Pankajdynamic |
last post by:
Hi,
I've gone through couple of articles on conguring the NLB cluster using NLB
Manager.Below are my queries:
1. In NLB Manager, Cluster Parameter tab, - Can I give any IP address for
Cluster...
|
by: ThunderMusic |
last post by:
Hi,
We have many servers setup as a cluster. When one server crashes, another
one take the relay... We want to know if it's possible (I suppose it is) to
make a Windows service developed with .NET...
| |
by: Simon |
last post by:
Hi All,
I'm hoping someone will have some words of wisdom for me regarding MS
Clustering on Windows 2003.
I have a service that runs on a cluster. During invocation it's
supposed to...
|
by: dunleav1 |
last post by:
I have a many row and many column table that is in a 16K page size.
I have four indexes on the table.
I am running row compression on the table.
The table does not have a primary key.
The table...
|
by: =?Utf-8?B?S2Vubnk=?= |
last post by:
I have one bat file that contains a command to startup Java Program. Then, I
would like to create a cluster job to call the bat file. In case of one
computer is down, another computer can also call...
|
by: Ian |
last post by:
Henry J. wrote:
MDC *guarantees* clustering, whereas a table with a clustering index
will eventually require maintenance (a.k.a. reorg) to maintain the
cluster ratio.
That's not to say that...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |