Re: Best practices for moving large amounts of data using WCF ...
- From: "msgroup" <nospam@xxxxxxxxx>
- Date: Wed, 31 Jan 2007 11:28:14 -0500
Hi, MobileMan:
You get problems for moving large amounts of data? Our SocketPro at
www.udaparts.com solves this problem completely with very simple and elegant
way, non-blocking socket communication. SocketPro is a package of
revolutionary software components written from batching, asynchrony and
parallel computation with many attractive and critical features to help you
easily and quickly develop secured internet-enabled distributed applications
running on all of window platforms and smart devices with super performance
and scalability.
See the attached tutorial three. Let me give you some code here.
protected void GetManyItems()
{
int nRtn = 0;
m_UQueue.SetSize(0);
PushNullException();
while (m_Stack.Count > 0)
{
//a client may either shut down the socket
connection or call IUSocket::Cancel
if (nRtn == SOCKET_NOT_FOUND || nRtn ==
REQUEST_CANCELED)
break;
CTestItem Item = (CTestItem)m_Stack.Pop();
Item.SaveTo(m_UQueue);
//20 kbytes per batch at least
//also shouldn't be too large.
//If the size is too large, it will cost
more memory resource and reduce conccurency if online compressing is
enabled.
//for an opimal value, you'd better test it
by yourself
if (m_UQueue.GetSize() > 20480)
{
nRtn =
SendReturnData(TThreeConst.idGetBatchItemsCTThree, m_UQueue);
m_UQueue.SetSize(0);
PushNullException();
}
}
if (nRtn == SOCKET_NOT_FOUND || nRtn == REQUEST_CANCELED)
{
}
else if (m_UQueue.GetSize() > sizeof(int))
{
nRtn =
SendReturnData(TThreeConst.idGetBatchItemsCTThree, m_UQueue);
}
}
There are a lot of samples inside our SocketPro to demonstrate how to
move a lot of database records, large files, a large collection of items
across machines. See the site
http://www.udaparts.com/document/articles/dialupdb.htm
"MobileMan" <MobileMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EAB34BEF-2C30-4AA6-A447-6019617373E7@xxxxxxxxxxxxxxxx
Hello everyone:
I am looking for everyone's thoughts on moving large amounts (actually,
not
very large, but large enough that I'm throwing exceptions using the
default
configurations).
We're doing a proof-of-concept on WCF whereby we have a Windows form
client
and a Server. Our server is a middle-tier that interfaces with our SQL 05
database server.
Using the "netTcpBindings" (using the default config ... no special
adjustments to buffer size, buffer pool size, etc., etc.) we are invoking
a
call to our server, which invokes a stored procedure and returns the query
result. At this point we take the rows in the result set and "package"
them
into a hashtable, then return the hashtable to the calling client.
Our original exception was a time-out exception, but with some
experimentation we've learned that wasn't the problem .... although it is
getting reported that way. Turns out it was the amount of data.
The query should return ~11,000 records from the database. From our
experimentation we've noticed we can only return 95 of the rows back
before
we throw a "exceded buffer size" exception. Using the default values in
our
app.config file that size is 65,536.
Not that moving 11,000 records is smart, but to be limited to only 64Kb in
a
communication seems overly restrictive. We can change the value from the
default, but I wanted to ask what other's are doing to work with larger
amounts of data with WCF first?
Are you simply "turning up" the size of the buffer size? Some kind of
paging technique? Some other strategy?? Having a tough time finding
answers
on this.
Greatly appreciate any and all comments on this,
Thanks
--
Stay Mobile
.
- Follow-Ups:
- Prev by Date: VB6 to C# Architecture Question - Best Practice?
- Next by Date: Re: No Vista support?
- Previous by thread: VB6 to C# Architecture Question - Best Practice?
- Next by thread: Re: Best practices for moving large amounts of data using WCF ...
- Index(es):
Relevant Pages
|