473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Get hold of a Service

Hi all,

Ok, here is what I want to do. I want a service to load some data. Then
during the day, several processes will do some stuff with this data. Now, how
can I access the Class behind a running service? Or in other words. How can
my processes access the data loaded by this service?

Any ideas?

Regards Alexander
Nov 16 '05 #1
5 991
One of the easiest ways would be to use remoting, where on
the server, you end up having the server create a sharable
instance with
RemotingConfiguration.RegisterWellKnownServiceType (), and
then when ever data needs to be updated it connects to it
and makes said changes. On the application side, each one
would simply connect to the same instance and do what ever
they need to do using a similar method.

Take a look at
http://www.csharphelp.com/archives/archive187.html (or
just a general google search) for some info on Remoting.
Given the seeming long life of the data you'll be reading
and the need for it to exist for a while, be sure to
overload InitializeLifetimeService() to return null so
that your remoted object does not timeout.
-----Original Message-----
Hi all,

Ok, here is what I want to do. I want a service to load some data. Thenduring the day, several processes will do some stuff with this data. Now, howcan I access the Class behind a running service? Or in other words. How canmy processes access the data loaded by this service?

Any ideas?

Regards Alexander
.

Nov 16 '05 #2
Hum, I thought about this solution, too, but I don't trust Remoting 100% =D.
Am I wrong?

What about performance issues. Is Remoting fast enough? Because this is a
large scaled system, the requests could be very numerous and frequent.
Although these tasks should not consume a lot of working time.

Regards Alexander

"Brendan Grant" wrote:
One of the easiest ways would be to use remoting, where on
the server, you end up having the server create a sharable
instance with
RemotingConfiguration.RegisterWellKnownServiceType (), and
then when ever data needs to be updated it connects to it
and makes said changes. On the application side, each one
would simply connect to the same instance and do what ever
they need to do using a similar method.

Take a look at
http://www.csharphelp.com/archives/archive187.html (or
just a general google search) for some info on Remoting.
Given the seeming long life of the data you'll be reading
and the need for it to exist for a while, be sure to
overload InitializeLifetimeService() to return null so
that your remoted object does not timeout.
-----Original Message-----
Hi all,

Ok, here is what I want to do. I want a service to load

some data. Then
during the day, several processes will do some stuff with

this data. Now, how
can I access the Class behind a running service? Or in

other words. How can
my processes access the data loaded by this service?

Any ideas?

Regards Alexander
.

Nov 16 '05 #3
The best thing I can tell you is to give remoting a try,
see if it is fast enough for you. There is a bit of
overhead to it, but the rewards of using it generally
outweigh the costs.

If you do give it a try, I would recommend using a TCP
port and binary encoding over an HTTP one with SOAP simply
because the prior is faster as there is less running
across the wire.
-----Original Message-----
Hum, I thought about this solution, too, but I don't trust Remoting 100% =D.Am I wrong?

What about performance issues. Is Remoting fast enough? Because this is alarge scaled system, the requests could be very numerous and frequent.Although these tasks should not consume a lot of working time.
Regards Alexander

"Brendan Grant" wrote:
One of the easiest ways would be to use remoting, where on the server, you end up having the server create a sharable instance with
RemotingConfiguration.RegisterWellKnownServiceType (), and then when ever data needs to be updated it connects to it and makes said changes. On the application side, each one would simply connect to the same instance and do what ever they need to do using a similar method.

Take a look at
http://www.csharphelp.com/archives/archive187.html (or
just a general google search) for some info on Remoting. Given the seeming long life of the data you'll be reading and the need for it to exist for a while, be sure to
overload InitializeLifetimeService() to return null so
that your remoted object does not timeout.
>-----Original Message-----
>Hi all,
>
>Ok, here is what I want to do. I want a service to
load some data. Then
>during the day, several processes will do some stuff
with this data. Now, how
>can I access the Class behind a running service? Or in

other words. How can
>my processes access the data loaded by this service?
>
>Any ideas?
>
>Regards Alexander
>.
>

.

Nov 16 '05 #4


"Alexander Wehrli" <Al*************@discussions.microsoft.com> wrote in
message news:9D**********************************@microsof t.com...
Hum, I thought about this solution, too, but I don't trust Remoting 100%
=D.
Am I wrong?

What about performance issues. Is Remoting fast enough? Because this is a
large scaled system, the requests could be very numerous and frequent.
Although these tasks should not consume a lot of working time.

Regards Alexander

Why not simply use EnterpriseServices (COM+) when you need to call methods
from other processes.
ES offers the fasted interprocess path and is secure, something that cannot
be said of Remoting.
Note that ES components can be configured to run as Services as well (on
W2K3 or XP).

Willy.
Nov 16 '05 #5
Sounds interesting! Do you have some links or other references where I could
read something about this? I've never used this before...

Regards Alexander

"Willy Denoyette [MVP]" wrote:


"Alexander Wehrli" <Al*************@discussions.microsoft.com> wrote in
message news:9D**********************************@microsof t.com...
Hum, I thought about this solution, too, but I don't trust Remoting 100%
=D.
Am I wrong?

What about performance issues. Is Remoting fast enough? Because this is a
large scaled system, the requests could be very numerous and frequent.
Although these tasks should not consume a lot of working time.

Regards Alexander

Why not simply use EnterpriseServices (COM+) when you need to call methods
from other processes.
ES offers the fasted interprocess path and is secure, something that cannot
be said of Remoting.
Note that ES components can be configured to run as Services as well (on
W2K3 or XP).

Willy.

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: don | last post by:
My question is, do C++ array of objects hold the objects or just the pointers to the objects..... I know Java arrays only hold pointers to objects, but I seem to remember that C++ arrays hold the...
0
by: 4.spam | last post by:
Hello. W2K, DB2 ESE V8.2.1 I created a dummy sql sp that returns 2 result sets. One of cursors inside it I declared as "with hold with return" and another as "with return" (without "with...
9
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code...
4
by: Craig HB | last post by:
I have a windows service that gets its settings from a webservice. So, when the windows service calls a method called GetSettings it needs to connect to a webservice, pass in 2 parameters (so the...
3
by: vtxr1300 | last post by:
I'm trying to create a login box control to use that simply exposes the username, password and remember me properties when the login button is clicked. I have the button click wired up and working...
0
by: Paul DeWitt | last post by:
I have a textbox on a Windows Form. I am wanting to display a popup form to request/validate info if the user clicks the textbox and have a different form (to delete data) load if the user either...
11
by: dotnetnoob | last post by:
in the old VB, you can use global variables to hold commonly use data. i'll like to pass a variables selected by user in the combobox, how do you hold this variable for other object to use. does...
0
by: DaTurk | last post by:
Hi, I need to have a native class hold on to a managed function pointer. Not a unmanaged class in a manged block. I mean an unmanaged class in an unmanaged block via #pragma unmanaged. I'm...
1
by: itsmesrini85 | last post by:
Hi, I'm trying to get session in the web service implementation class. But I'm webservicecontext is coming as null.. The class and the configuration is as below. How can i get the session or...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.