Jason Tucker's Blog

not at all creative...

Web Service Architecture Questions

I've finally gotten above water in my work and have been now tasked with a new project where I am constructing a Web Services architecture. I've been scanning a few sites and I have a few questions that I need answered that I'm either missing or just can't understand what I'm reading. So maybe someone here will be able to either point in the direction of a good Best Practices document or help with the answers.

  1. Multiple calls to various methods or single call with lots of data? I would think that since processing is cheap these days that all the data should be piped down to the method and have the callee process all the data.
  2. Since the caller and the callee with both be in .Net better to use simple datatypes or can I get away with using objects since they are of the same development language?

Thanks for whatever you can give me. I'm now gonna settle down and start reading the Application Architecture document from the patterns group and see if I can deduce some other questions I have.

Posted: Feb 09 2004, 02:56 PM by jtucker | with 6 comment(s)
Filed under:

Comments

Morten Abrahamsen said:

1. Generally you want to have single calls with lots of data.

2. You can use complex datatypes regardsless of whether or not the client/ server is .Net. At the end of the day it's a message that is beeing sent.

For interoperability reasons I would stay away from complex ".net" types as DataSet and so on, but this is simply about taste. Building your own classes with basic types is just a good thing!

Web Services are about interoperabilty. I would recommend taking a look at the actual message beeing sent. Make sure it makes sence!

Good luck, and most of all; have fun!
Morty
# February 9, 2004 3:07 PM

Jerry Pisk said:

Generally you would want to have multiple simple calls instead of one call that does everything. Your code will be easier to maintain and less prone to bugs and side-effects. It will also scale better under load.

But I agree with Morty, it all depends on what you're doing, design your methods based on the problem, not on whether it's better to have single call or multiple calls.
# February 9, 2004 3:15 PM

Udi Dahan - The Software Simplist said:

There is a golden rule to follow whenever having to deal with constraints:

Develop the best system possible ( both client and server ) ignoring the constraint. Make sure you have identified in your "perfect" solution where the constraint will have to go. If there isn't a unique architectural place where it fits, iterate the system until there is. Now, add the constraint.

I have some example code that illustrates this with caching (on my blog). I suggest you take a look.
# February 9, 2004 3:43 PM

Gopinath Varadharajan said:

1. Single call with lots of data, but Compress the Data. It works beautifully. We have 89 tables returned to client with data over 900kb, which after compression gets ~100k (with max compression level - 9). I get the dataset and convert as xml file, using WSE send this xml (after compressing) as DIME Attachment.

1a. In the next version ,we used Async Web Service calls to get this data (while the main menu(dll) loads, we get all the screen data) this worked wonderfully well, as our clients never gets any delay ! We are using Win User Controls under IE.

1b. There are code samples available how to do this..(let me know - vgopinath@hotmail.com, if anyone want the links..)

1c. One fall off in this model is, when U convert datast --> xml file, if U have any Null rows returned, xml will simply ignore it !, se we need return always something, for null row we send some dummy values. !!??
I have not got over this so far.

2. we used all datatype as strings !? and convert at client appropriately..

just my experience...


# February 9, 2004 4:49 PM

DevHawk said:

1. Chunky beats chatty across the wire every time.

2. If you're doing .NET on both sides, you can use .NET remoting which allows for complex pass-by-value objects as parameters. If you're using web services, Don't think in terms of objects, think in terms of message schemas.
# February 11, 2004 1:51 AM

Theodora said:

Hey. I am not young enough to know everything. Help me! I can not find sites on the: Baby crib bedding. I found only this - <a href="baby-bedding.net/">dwell baby bedding</a>. Bedding, hide gearboxes among targeted helical number programs and researchers are clearer than those on the moon. I get that we believe rushing receptive by the fact and traveling to say at the old chromosomes, bedding. Best regards :confused:, Theodora from Lebanon.

# March 28, 2010 4:04 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)