473,654 Members | 3,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To service or not to service

Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.

Aug 1 '06 #1
8 1190
I think i should also add, if you're opting for option one, then am i
overdramatising what i conceive as a 'more difficult task' - getting
information out of the service.

Again, many thanks for your forthcoming input,
James Randle.
pigeonrandle wrote:
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.
Aug 1 '06 #2
From your question, I don't see the need to use a service. If so, I would
not write a service just to write one, as deployment is also a concern.
Will this be a server listening for request/reply?

--
William Stacey [MVP]

"pigeonrand le" <pi**********@h otmail.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
| Hi,
| I am writing a server application and would like to know what you
| experts think i should write it as. I would like (ie need) it to have a
| visual interface, hence the question,
| "Should i write it as a service and then provide another program that
| displays information on what's going on", or, "should i simply write it
| as a multi-threaded asynchronous socket beast GUI"?!
|
| I like the second option (mainly because it will involve less typing
| :o).
|
| If you think the first option is a better one, i would love to hear
| your reasons why.
|
| Many thanks (once again),
| Your friend and mine,
| James Randle.
|
Aug 1 '06 #3
When I need to determine if I have to write a Service, I always ask me the
following questions:

- Do I need to have the application running without any user connected?
- Do I need to have the application running at the computer start?

If I answer yes to one of these, then I go for a service...
- José
"pigeonrand le" <pi**********@h otmail.coma écrit dans le message de news:
11************* *********@m79g2 00...legr oups.com...
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.

Aug 1 '06 #4
William and José,
Thankyou both for replying.

The server will be listening for tcp connections and sending data back.
And i think i will need a user logged in because ... what really
complicates this project is the fact that the server will also be
responsible for remote controlling another application (using
WM_SETTEXT and friends). (It also updates databases, but i imagine this
can be done without a user being logged in?)

What on earth have i let myself in for!
James Randle.

José Joye wrote:
When I need to determine if I have to write a Service, I always ask me the
following questions:

- Do I need to have the application running without any user connected?
- Do I need to have the application running at the computer start?

If I answer yes to one of these, then I go for a service...
- José
"pigeonrand le" <pi**********@h otmail.coma écrit dans le message de news:
11************* *********@m79g2 00...legr oups.com...
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.
Aug 1 '06 #5
In general if you need a visual interface, this should be outside the
service. Setting "Allow interaction with the Desktop" can cause numerous
problems. If you need for your GUI to "talk" to the service you could use
Remoting, named pipes or a socket server / client arrangement built into the
service.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"pigeonrand le" wrote:
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.

Aug 1 '06 #6
William and José,
Thankyou both for replying.

The server will be listening for tcp connections and sending data back.
And i think i will need a user logged in because ... what really
complicates this project is the fact that the server will also be
responsible for remote controlling another application (using
WM_SETTEXT and friends). (It also updates databases, but i imagine this
can be done without a user being logged in?)

And yes, it does need to be running on startup ... but i guess i need
to have a user log in first anyway.

What on earth have i let myself in for!
James Randle.

Apologies if there are two versions of this message ... i had an
afterthought :o)

José Joye wrote:
When I need to determine if I have to write a Service, I always ask me the
following questions:

- Do I need to have the application running without any user connected?
- Do I need to have the application running at the computer start?

If I answer yes to one of these, then I go for a service...
- José
"pigeonrand le" <pi**********@h otmail.coma écrit dans le message de news:
11************* *********@m79g2 00...legr oups.com...
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.
Aug 1 '06 #7
Peter,
Thanks for your input. My dad said i should have been a gardener and
what with the seeds of doubt being planted in my mind, i think i would
have made a good one!

Given my further explanation above do you have anything else you could
add? From what William and José have added, i am beginning to think
that i cant do this with a service (unless a service can spawn an
application without a user being logged in that is...)

Cheers,
James.
Peter Bromberg [ C# MVP ] wrote:
In general if you need a visual interface, this should be outside the
service. Setting "Allow interaction with the Desktop" can cause numerous
problems. If you need for your GUI to "talk" to the service you could use
Remoting, named pipes or a socket server / client arrangement built into the
service.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"pigeonrand le" wrote:
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.
Aug 1 '06 #8
Assuming the application(s) your service must spawn has no interaction with
the desktop, there is no restriction about it.
I have implemented several services that spawned applications (even old C
applications [console applications] with input/output interactions managed
by the service) and this was no problem at all.

Regarding the front-end, I used to implement windows forms that communicated
through remoting (this is easier than you may first think).

-José

"pigeonrand le" <pi**********@h otmail.coma écrit dans le message de news:
11************* ********@m73g20 00...legro ups.com...
Peter,
Thanks for your input. My dad said i should have been a gardener and
what with the seeds of doubt being planted in my mind, i think i would
have made a good one!

Given my further explanation above do you have anything else you could
add? From what William and José have added, i am beginning to think
that i cant do this with a service (unless a service can spawn an
application without a user being logged in that is...)

Cheers,
James.
Peter Bromberg [ C# MVP ] wrote:
In general if you need a visual interface, this should be outside the
service. Setting "Allow interaction with the Desktop" can cause numerous
problems. If you need for your GUI to "talk" to the service you could use
Remoting, named pipes or a socket server / client arrangement built into
the
service.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"pigeonrand le" wrote:
Hi,
I am writing a server application and would like to know what you
experts think i should write it as. I would like (ie need) it to have a
visual interface, hence the question,
"Should i write it as a service and then provide another program that
displays information on what's going on", or, "should i simply write it
as a multi-threaded asynchronous socket beast GUI"?!

I like the second option (mainly because it will involve less typing
:o).

If you think the first option is a better one, i would love to hear
your reasons why.

Many thanks (once again),
Your friend and mine,
James Randle.

Aug 1 '06 #9

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

Similar topics

9
7005
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 sample, it provides the feature to install service under LocalSystem account. What I need is to install service under some other certian account. By further studying the code, and MSDN...
7
712
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: service 1 - my service watches service 2 - windows service service 2 is stopped - service 1 starts service 2
9
7252
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service stopping. Please advise how to stop the service. Thanks, SP
3
56971
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I want to test this service on a Windows Server 2003 box that doesn't have the Visual Studio Command prompt. How do I go about installing the service on the Windows Server 2003 box? Thanks!
2
4672
by: letibal | last post by:
Hello, I have written a windows service and created an installer for it. The service runs under the system accounts. When started, it launches a GUI. By default, the InteractiveProcess property of the service is not set (this can be checked by right-clicking on the service in the Services window (Admin tools>Services), choosing Properties, LogOn tab). In order to enable my service to launch a GUI at startup, I added the following lines...
4
3175
by: kkt49 | last post by:
# vim: et sw=4 ts=8 sts from wxPython.wx import * import sys, os, time import pywintypes import win32serviceutil import win32service import win32event import win32process
4
21716
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
3
6615
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
20
6736
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1 xxx = new localhost.Service1(); localhost is not recognized by the compiler.
5
3296
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
8372
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
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 we have to send another system
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.