473,403 Members | 2,366 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,403 software developers and data experts.

Asynchronous socket programming vs. remoting

I need to write a server app to send images to client GUIs that are outside
of the server's domain.
The client will have the file system path to the image but can not access
the file system.
I am trying to decide if I should use remoting vs. writing a server that
uses networkstreams.

I have read that networkstreams\tcp programming should be faster than
remoting and is a better choice for what I am doing but that it is difficult
to code.

I'd like to get
1. a recommendation on remoting vs socket programming for what I'm doing
and
2. If socket programming is recommended ... the url of a full sample of
an ansychronous server\client file sharing application.

Thank you,
Michael Lindsey

Nov 21 '05 #1
4 5306
Hard question Michael in that there's a lot to be considered. I'd agree
that Sockets will be faster but I don't know how much - because it depends.
If you have a lot of users or expect that the user base could grow big time,
then the trade offs are a lot to consider in both directions. Remoting is a
LOT cleaner and a lot easire to deploy, maintain, update etc. You can also
piggy back off of IIS Security quite easily. On the other hand, if you need
every bit of performance you can get, then it's a trade off.

I'd need to know a lot more about the architecture before I could
responsibly make a recommendation. One nice thing about Remoting though is
that you can easily move stuff around and split up the load - we Remote TONS
of stuff and performance hasn't been an issue in more than a few large scale
enterprise apps.

can you tell me a little more about the scenario?

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Michael Lindsey" <mi**********@alltel.net> wrote in message
news:yQ**************@fe61.usenetserver.com...
I need to write a server app to send images to client GUIs that are outside of the server's domain.
The client will have the file system path to the image but can not access
the file system.
I am trying to decide if I should use remoting vs. writing a server that
uses networkstreams.

I have read that networkstreams\tcp programming should be faster than
remoting and is a better choice for what I am doing but that it is difficult to code.

I'd like to get
1. a recommendation on remoting vs socket programming for what I'm doing and
2. If socket programming is recommended ... the url of a full sample of an ansychronous server\client file sharing application.

Thank you,
Michael Lindsey

Nov 21 '05 #2
Hard question Michael in that there's a lot to be considered. I'd agree
that Sockets will be faster but I don't know how much - because it depends.
If you have a lot of users or expect that the user base could grow big time,
then the trade offs are a lot to consider in both directions. Remoting is a
LOT cleaner and a lot easire to deploy, maintain, update etc. You can also
piggy back off of IIS Security quite easily. On the other hand, if you need
every bit of performance you can get, then it's a trade off.

I'd need to know a lot more about the architecture before I could
responsibly make a recommendation. One nice thing about Remoting though is
that you can easily move stuff around and split up the load - we Remote TONS
of stuff and performance hasn't been an issue in more than a few large scale
enterprise apps.

can you tell me a little more about the scenario?

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Michael Lindsey" <mi**********@alltel.net> wrote in message
news:yQ**************@fe61.usenetserver.com...
I need to write a server app to send images to client GUIs that are outside of the server's domain.
The client will have the file system path to the image but can not access
the file system.
I am trying to decide if I should use remoting vs. writing a server that
uses networkstreams.

I have read that networkstreams\tcp programming should be faster than
remoting and is a better choice for what I am doing but that it is difficult to code.

I'd like to get
1. a recommendation on remoting vs socket programming for what I'm doing and
2. If socket programming is recommended ... the url of a full sample of an ansychronous server\client file sharing application.

Thank you,
Michael Lindsey

Nov 21 '05 #3
Ok, here is the scenario:
This will not be an internet application and it will not require security -
nothing fancy anyhow.
The client application is key from image data entry application where
information is read from an image and keyed
by the de operators and the data is sent back to a sql server.

The client starts up and requests a batch of images to data enter.
The unc paths to the image are pulled from the database.
Currently the application is used by only those that are joined to our
network and so they have access to the unc path and
can download the image directly from the file system.

It has been requested that we allow our sister companies (residing all
around the US and some over seas) be able to help out with data entry.
To this point they cannot use the application because they cannot access our
file system.

I am planning on using remoting or tcp server to get around this issue.
Either way, I will pull down 10 to 50 images on a background thread while
the user is performing data entry on a batch.

The max users are currently 20 to 40 users. The max potential probably
around 100 users.

I would like to do load balancing by having the each instance of the host
service that is running on multiple server (~6), whether remoting or tcp
server, update a db table with it's current cpu usage every five seconds.
Before the client starts downloading images it will first see which instance
of the service has the lowest cpu usage, by calling a stored proc, and use
that server to download the images.

The 6 servers are dual Pentium II (650mhz) with 1 gb ram.
There are several applications that run on these servers.
The database is MSSQL server cluster running dual Pentium II processors.
The clients will be WinXp Pentium III or IV.

Thank You,
Michael Lindsey
"W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
Hard question Michael in that there's a lot to be considered. I'd agree
that Sockets will be faster but I don't know how much - because it depends. If you have a lot of users or expect that the user base could grow big time, then the trade offs are a lot to consider in both directions. Remoting is a LOT cleaner and a lot easire to deploy, maintain, update etc. You can also piggy back off of IIS Security quite easily. On the other hand, if you need every bit of performance you can get, then it's a trade off.

I'd need to know a lot more about the architecture before I could
responsibly make a recommendation. One nice thing about Remoting though is that you can easily move stuff around and split up the load - we Remote TONS of stuff and performance hasn't been an issue in more than a few large scale enterprise apps.

can you tell me a little more about the scenario?

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Michael Lindsey" <mi**********@alltel.net> wrote in message
news:yQ**************@fe61.usenetserver.com...
I need to write a server app to send images to client GUIs that are

outside
of the server's domain.
The client will have the file system path to the image but can not access the file system.
I am trying to decide if I should use remoting vs. writing a server that
uses networkstreams.

I have read that networkstreams\tcp programming should be faster than
remoting and is a better choice for what I am doing but that it is

difficult
to code.

I'd like to get
1. a recommendation on remoting vs socket programming for what I'm

doing
and
2. If socket programming is recommended ... the url of a full sample

of
an ansychronous server\client file sharing application.

Thank you,
Michael Lindsey



Nov 21 '05 #4
Thanks Frank.
You are the first person that said I should use sockets.
The argument against sockets is usually "all the coding and maintenance"
that it takes to get it working well.
I decided to give it a try and got a real nice solution up and running
quickly, with surprisingly little code, using asynchronous network streams.
The performance is awesome! I am pulling images from FL to GA and loading
them quicker than I can load them from my harddrive using the file system.

It scales nice too - I tried throwing 400 requests at the server in a span
of 30 secs and it returned all images without a hitch.
I was pulling them at 129kb/s and that limitation is likely due to using DSL
over a VPN.
The processor usage during my test never went above 8% on a Pentium II 500
with 1 gig of ram.
The ram usage was at 10 mb but dropped back down to 2-3 mb after each test.
The threads got up around 100 during the test and dropped back down to 6
after the test. The extra threads were due to the asynchronous processing
and it was all handled by the system. I didn't have to create a single extra
thread manually.

Thanks for the advice.

Michael Lindsey

"Michael Lindsey" <mi**********@alltel.net> wrote in message
news:yQ**************@fe61.usenetserver.com...
I need to write a server app to send images to client GUIs that are outside of the server's domain.
The client will have the file system path to the image but can not access
the file system.
I am trying to decide if I should use remoting vs. writing a server that
uses networkstreams.

I have read that networkstreams\tcp programming should be faster than
remoting and is a better choice for what I am doing but that it is difficult to code.

I'd like to get
1. a recommendation on remoting vs socket programming for what I'm doing and
2. If socket programming is recommended ... the url of a full sample of an ansychronous server\client file sharing application.

Thank you,
Michael Lindsey


Nov 21 '05 #5

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

Similar topics

0
by: Rob | last post by:
Hello, I've got a huge problem with async sockets. I've created a networked virtual environment, using async socket programming. The problem I face occurs when I close the listener socket. It...
6
by: ... | last post by:
Does anyone know a good tutorial on asynchronous programming in .net AsyncCallback And IASyncResult are driving me crazy. And the msdn documentation is not really helpful on this topic I...
5
by: a.kostrzewa | last post by:
I have a question about C#. How can I stop asynchronous read/write operation ( BeginReceive() / BeginSend() ) if timeout occurs? The Socket class doesn't make any cancel method available. I used...
48
by: Steve - DND | last post by:
I'm trying to determine if I need to make my application multi-threaded, or if it can be done with asynchronous programming. I realize that asynch calls do create a new thread in the background,...
9
by: Michael Lindsey | last post by:
I need to write a server app to send images to client GUIs that are outside of the server's domain. The client will have the file system path to the image but can not access the file system. I am...
7
by: Colin | last post by:
I'm writing a little console socket server but I'm having some difficulty. Can I ask your advice - where is the best place to get some help on that topic? It would be nice if some people who knew...
2
by: Macca | last post by:
My app has an asynchronous socket server. It will have 20 clients connected to the server. Each client sends data every 500 millisecondsThe Connections once established will not be closed unless...
4
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket...
6
by: Pat B | last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol using C#. I have implemented it using BeginReceive and EndReceive calls so as not to block when waiting for data from the...
2
by: Nicolas Le Gland | last post by:
Hello everyone here. This is my first post in this newsgroup, I hope I won't be to much off-topic. Feel free to redirect me to any better group. I am getting strange timing issues when...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
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...
0
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...
0
agi2029
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,...
0
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...

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.