Using Web Service - a slow down?

J

Jonah Olsson

Hi guys,

I'm building a Web Service application to be run as an engine for some
client web applications.
The client application will be used as a shell to update and maintain a
customer database where the Web Service acts as the engine containing all
functions to interact with the SQL Server. One can see each client
application as a terminal to the main Web Service application.

Since all communication to the Web Service needs authentication, this
information has to be sent to the Web Service each time it's called to be
checked against the SQL Server. Will this slow down the process a lot?

Example:
Client updates info --> Call Web Service --> Authentication --> Update
info --> Return results to client

Does someone recommend a better solution to this? Or can I optimize the
process?

Thanks for any kind of help.

Regards,
Jonah Olsson
Generation Software
 
D

Dino Chiesa [MSFT]

It's possible to use Sessions to keep track of state (including
authentication info) on the server side.

In this case, the client would open a conversation (eg, session) with the
server, passing the authentication info when the session is started. At
that point the server would retain the authentication info on the server, in
the session object. When the client connected again (a new request for a
webmethod), then the server can examine the session and use the stored
authentication info.

example:
http://samples.gotdotnet.com/quickstart/aspplus/doc/servicesandobjs.aspx

This will not scale as well as a stateless model, where you authenticate
with each webmethod request. But if you do not have extreme perf
requirements, it may work just fine for you.

The client needs to be aware of the session, and needs to use cookies.

-Dino
 
T

Tom Vande Stouwe MCSD.net

You may want to look at Remoting, it is better suited for this application,
as you can make the service a singleton and thus eliminate the issue (Still
will scale within the limits of the server memory etc)

Tom
--
==========================================
= Tom Vande Stouwe MCSD.net, MCAD.net, MCP
= 45Wallstreet.com (www.45wallstreet.com)
= (803)-345-5001
==========================================
= If you are not making any mistakes
..= ..you are not trying hard enough.
==========================================
 
J

Jonah Olsson

Hi Dino,

Thanks for your reply and help.
I'll take a look at sessions, it sounds like a way to do it. I suppose
handling sessions takes both less cpu and bandwidth than checking
authorization against the SQL Server.

Jonah
 
J

Jonah Olsson

Tom,

Doesn't Remoting require something installed on the server? I'm on shared
hosting regarding the Web Service..

Thanks.
Jonah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top