Solved

C# distributing programming

Posted on 2014-10-02
21
84 Views
Last Modified: 2015-03-05
i have a situation where i have 2 dlls written in C# , but kept in 2 different servers dllA on server A and dllB on server B .

now i want to utilize power of both the servers (RAM and CPU) , how can write a program in C# , which does following things
1. executes both the dlls on their respective servers
2. now when execution of both dlls complete it combines the result on server A
0
Comment
Question by:BeyondBGCM
  • 5
  • 4
  • 3
  • +3
21 Comments
 
LVL 33

Expert Comment

by:ste5an
ID: 40356483
A simple solution would be using psexec to run those programs. On the otherhand, I would also consider running your programs as Windows service.
0
 

Author Comment

by:BeyondBGCM
ID: 40356517
can you please explain it in detail .....?
0
 

Author Comment

by:BeyondBGCM
ID: 40356521
how windows service can execute 2 dlls on 2 different servers at same time , and can combine the results .
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 33

Expert Comment

by:ste5an
ID: 40356584
It's plural: "programs". You need to run a service on each machine.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40356607
>>executes both the dlls

dll's are libraries of code.  They do not run on their own.  Your app can use code from a dll but it runs in your app.

What you want may be impossible, it depends on what you require as results AND how much you can redesign the existing things.
0
 

Author Comment

by:BeyondBGCM
ID: 40491904
Biz Talk server can solve this problem...?
0
 

Author Comment

by:BeyondBGCM
ID: 40635254
no answer comments for past 2 months
0
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 500 total points
ID: 40639498
Hi mate,
as said before, dll's are not applications.
They don't compute on their own.

My advise is:
1. Create 2 WCF (SOAP or REST) services, one for each dll and expose the methods you need.
2. Deploy each WCF service on the different servers.
3. Consume both services from the application that needs the output.

Like this each "dll" will be executed in a different server like you want and the application just needs to wait for both executions to complete and act upon.

Also be aware this also requires that the calls to the web services need to be asynchronous.
0
 
LVL 33

Expert Comment

by:it_saige
ID: 40639530
Just reiterating the previous comments.  In order to do what you want to accomplish (regardless of whether the assemblies are exe's or dll's)...  You would need to use something that is running on the targeted server in order to make the calls and do the calculations you are attempting to use.  Whether it is a WCF service, psexec or just a plain old application does not matter.

-saige-
0
 
LVL 40
ID: 40639732
.NET Remoting allow you to call dlls that are installed on different computers.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 40639763
@Jaques, with .Net Remoting is just an abstraction (helper) layer on top of sockets communication.
This means that on the destination server we must have some sort of application already running and listening to a port.

So again, DLL's don't run code by themselves, and you don't do distributed computing just by spreading DLL's around.
0
 
LVL 40
ID: 40639840
@Alexandre

And this application can serve as a bridge between the client and the dll installed on the server.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 40639895
Of course, but it's not just the DLL.
You'll always need an application of some sort, on the remote server, that references the DLL and exposes the methods.
0
 
LVL 40
ID: 40639907
Well, I agree that my statement about remoting was not clear. Comment taken.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40639915
Which leads one back to the original comments on this question.
You can't do it with some setting - one has to write code and run things on each server.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 40639951
I think we all agree on that... now we just need @BeyondBGCM to come and explain exactly what he's trying to accomplish :)
0
 
LVL 33

Expert Comment

by:ste5an
ID: 40639962
I have scared him..
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40640000
I suspect he is waiting for someone to tell him the magic word and then everything will work without having to do anything else.
0
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 40640004
Lets give the Time-Zone go around :)

I'm out for today,
Cheers guys!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 46
Changes to XXX.exe.config file are not retrieved on restart. 3 39
Need a simple RegEx to search for two words 27 42
linq, c# 8 22
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question