Solved

C# distributing programming

Posted on 2014-10-02
21
79 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 32

Expert Comment

by:Stefan Hoffmann
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
 
LVL 32

Expert Comment

by:Stefan Hoffmann
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 32

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 32

Expert Comment

by:Stefan Hoffmann
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Linq help 1 16
Image decoding from Camera 3 44
System.InvalidCastException: Specified cast is not valid 10 48
Hide Tab Page 3 18
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now