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

Best Method Question: Passing Numerous Transactions To Web Service

I have a disconnected handheld device that I want to send the results of the
day to a database through a web service (on an intranet)

What's the best method to do this?

XML?
Tab Delimited/Carriage Return String?
Through a file?
Other?

There will usually be 150 records but could be as many as 500 per device
(and there will be a few dozen devices). The XML structure is about 350
bytes per record (including length of xml elements) versus about 100 bytes
through a tab delimited string

I don't want to send one transaction at a time... I need to send all
transactions and have them processed "in bulk"

TIA

Eric
Sep 24 '08 #1
5 1952
"Eric Fortin" <em******@comcast.netwrote in message
news:OH**************@TK2MSFTNGP04.phx.gbl...
I have a disconnected handheld device that I want to send the results of
the day to a database through a web service (on an intranet)

What's the best method to do this?

XML?
Tab Delimited/Carriage Return String?
Through a file?
Other?

There will usually be 150 records but could be as many as 500 per device
(and there will be a few dozen devices). The XML structure is about 350
bytes per record (including length of xml elements) versus about 100 bytes
through a tab delimited string

I don't want to send one transaction at a time... I need to send all
transactions and have them processed "in bulk"
What is the throughput of the connection from the handheld device? 500
records at 350 bytes apiece is only about 30 seconds at 56kbs. If you have
that level of speed, then I suggest you worry about correctness and
maintainability before you worry about the performance.
--
John Saunders | MVP - Connected System Developer

Sep 27 '08 #2
Eric Fortin wrote:
I have a disconnected handheld device that I want to send the results of the
day to a database through a web service (on an intranet)

What's the best method to do this?

XML?
Tab Delimited/Carriage Return String?
Through a file?
Other?

There will usually be 150 records but could be as many as 500 per device
(and there will be a few dozen devices). The XML structure is about 350
bytes per record (including length of xml elements) versus about 100 bytes
through a tab delimited string

I don't want to send one transaction at a time... I need to send all
transactions and have them processed "in bulk"
You create a ADO.Net Dataset on the client side with a table or tables
in it. You load the table with the data. You can XML serialize the
Dataset object with the table or tables with data in it down to a
serialized XML dataset.

You send the entire serialized XML dataset over the wire. The Web
service de-serializes the XML dataset back to a ADO.Net Dataset object.
You know what to do from there, look it up use Google to get code examples.

You can also compress/decompress it with some free 3rd party tool that
you can include in your code on the Web client and Web service sides.

Or you could just create an XML Doc file and load it all up too and send
it doing a compress/decompress.

What's to say you can't use text file full of tab delimited data
records, doing a compress/decompress? Or even a Memory Stream?
Sep 28 '08 #3
What is "correct"? I'm trying to find out what is considered "best
practice" to complete this type of job (handheld device submitting a day's
worth of transactions) --XML or a string containing transactions or file
upload or other...

Thanks

"John Saunders" <no@dont.do.that.comwrote in message
news:O9**************@TK2MSFTNGP06.phx.gbl...
"Eric Fortin" <em******@comcast.netwrote in message
news:OH**************@TK2MSFTNGP04.phx.gbl...
>I have a disconnected handheld device that I want to send the results of
the day to a database through a web service (on an intranet)

What's the best method to do this?

XML?
Tab Delimited/Carriage Return String?
Through a file?
Other?

There will usually be 150 records but could be as many as 500 per device
(and there will be a few dozen devices). The XML structure is about
350 bytes per record (including length of xml elements) versus about 100
bytes through a tab delimited string

I don't want to send one transaction at a time... I need to send all
transactions and have them processed "in bulk"

What is the throughput of the connection from the handheld device? 500
records at 350 bytes apiece is only about 30 seconds at 56kbs. If you have
that level of speed, then I suggest you worry about correctness and
maintainability before you worry about the performance.
--
John Saunders | MVP - Connected System Developer

Sep 28 '08 #4
I am currently passing a dataset and am being told that is "bad practice".
What is the current thought for "best practice"

"Paul Montgumdrop" <Pa**@Montgumdrop.comwrote in message
news:Oe**************@TK2MSFTNGP02.phx.gbl...
Eric Fortin wrote:
>I have a disconnected handheld device that I want to send the results of
the day to a database through a web service (on an intranet)

What's the best method to do this?

XML?
Tab Delimited/Carriage Return String?
Through a file?
Other?

There will usually be 150 records but could be as many as 500 per device
(and there will be a few dozen devices). The XML structure is about
350 bytes per record (including length of xml elements) versus about 100
bytes through a tab delimited string

I don't want to send one transaction at a time... I need to send all
transactions and have them processed "in bulk"

You create a ADO.Net Dataset on the client side with a table or tables in
it. You load the table with the data. You can XML serialize the Dataset
object with the table or tables with data in it down to a serialized XML
dataset.

You send the entire serialized XML dataset over the wire. The Web service
de-serializes the XML dataset back to a ADO.Net Dataset object. You know
what to do from there, look it up use Google to get code examples.

You can also compress/decompress it with some free 3rd party tool that you
can include in your code on the Web client and Web service sides.

Or you could just create an XML Doc file and load it all up too and send
it doing a compress/decompress.

What's to say you can't use text file full of tab delimited data records,
doing a compress/decompress? Or even a Memory Stream?


Sep 28 '08 #5
"Eric Fortin" <em******@comcast.netwrote in message
news:ex*************@TK2MSFTNGP03.phx.gbl...
I am currently passing a dataset and am being told that is "bad practice".
What is the current thought for "best practice"
DataSets or any other .NET-specific types are bad practice in the sense that
they are not interoperable. Instead, follow the Data Transfer Object pattern
by returning simple types, arrays, structs, etc. For instance, to emulate a
multiple-table DataSet:

public struct Table1Row {
public int ID {get;set;;}
public string Column {get;set;}
}

public struct Table2Row {
public int ID {get;set;;}
public string Column {get;set;}
public Table1Row RelatedRow {get;set;}
}

public class Table1 : List<Table1Row>
{
}

public class Table2 : List<Table2Row>
{
}

public class DataSet {
public Table1 Table1 {get;set;}
public Table2 Table2 {get;set;}
}

OTOH, if you don't now, nor ever will, care about interoperability, then go
ahead and use a DataSet.
--
John Saunders | MVP - Connected System Developer

Sep 29 '08 #6

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

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
4
by: Chuck Ritzke | last post by:
I keep asking myself this question as I write class modules. What's the best/smartest/most efficient way to send a large object back and forth to a class module? For example, say I have a data...
5
by: J. L. Goddard | last post by:
1) Do c# web methods support default parameters ? 2) Can a web method, or a c# method such as: public nullTest( int i ) { return i++; }
3
by: Paul Michaud | last post by:
Consider the following: Class A { .... } Class B:A { ....
4
by: DeepDiver | last post by:
I am developing an inventory database in SQL Server. I realize there are many commercial (as well as some non-commercial) inventory offerings, but my client has specific requirements that would...
9
by: David Eades | last post by:
Hi all Complete newbie here, so apologies if this is the wrong forum. I've been asked to use mysql and asp to make a simple bidding system (rather like a simple ebay), whereby users can use a...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
10
by: e_matthes | last post by:
Hello everyone, I have read many threads about concurrency issues, and I think I understand some of the pieces, but not the whole picture. I believe I am like many people using php: ...
0
by: =?Utf-8?B?R3V5?= | last post by:
I already spent some time thinking for a solution for my problem, but finally can't decide what would be the most optimal and correct solution. Therefore I post my question to this forum, to get...
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: 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
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...
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
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...
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
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.