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

Need Asynchronous WCF solution which allows for multiple responses

Bear with me because we are new to WCF and have been going through
documentation and samples trying to absorb as much as possible in a
short amount of time. Any suggestions would be much appreciated. We
would of course rather start off on the right path instead of learning
later that there's a much better and easier solution, but get stuck
with our original implementation.

We are working on designing a client server solution using WCF where
we will have at most 20 clients calling the server with a requests
using NetTcp. Because of the amount of data that can be returned and
usability we want to make this an asynchronous call as well as allow
the server return chunks of data at a time.

- It looks like the Duplex calls only allow for a single response from
the server, so this option is out.
- We have considered creating an Endpoint on both the server and the
client. When requesting data from the server the client would pass
it's Endpoint information to the server. The server would then create
a channel using the client Endpoint info and send responses to the
client in chunks.
- We have also considered using a pattern similar to reading data from
a file where the client will request chunks of data from the server in
multiple calls until it receives an EOF flag. This would need to be
asynchronous as well. This would keep us from creating an Endpoint on
each client. I'm not sure if this is a benefit, but it's one less
thing to do.
- Finally, what would be the best way to pass back the data. We've
created a simple data container, which looks like a basic dataset and
is decorated to allow serialization by WCF. It seems like it would be
sufficient.

Again, any suggestions to get us on the right path earlier rather than
later would be very much appreciated.

Jayson

Mar 8 '07 #1
7 6295
<jt*********@yahoo.comwrote in message
news:11*********************@t69g2000cwt.googlegro ups.com...
Bear with me because we are new to WCF and have been going through
documentation and samples trying to absorb as much as possible in a
short amount of time. Any suggestions would be much appreciated. We
would of course rather start off on the right path instead of learning
later that there's a much better and easier solution, but get stuck
with our original implementation.

We are working on designing a client server solution using WCF where
we will have at most 20 clients calling the server with a requests
using NetTcp. Because of the amount of data that can be returned and
usability we want to make this an asynchronous call as well as allow
the server return chunks of data at a time.

- It looks like the Duplex calls only allow for a single response from
the server, so this option is out.
- We have considered creating an Endpoint on both the server and the
client. When requesting data from the server the client would pass
it's Endpoint information to the server. The server would then create
a channel using the client Endpoint info and send responses to the
client in chunks.
- We have also considered using a pattern similar to reading data from
a file where the client will request chunks of data from the server in
multiple calls until it receives an EOF flag. This would need to be
asynchronous as well. This would keep us from creating an Endpoint on
each client. I'm not sure if this is a benefit, but it's one less
thing to do.
- Finally, what would be the best way to pass back the data. We've
created a simple data container, which looks like a basic dataset and
is decorated to allow serialization by WCF. It seems like it would be
sufficient.

Again, any suggestions to get us on the right path earlier rather than
later would be very much appreciated.

Jayson

Please post WCF related questions to the WCF forum at :
http://forums.microsoft.com/MSDN/Sho...D=118&SiteID=1

Willy.
Mar 8 '07 #2


<jt*********@yahoo.comwrote in message
news:11*********************@t69g2000cwt.googlegro ups.com...
Bear with me because we are new to WCF and have been going through
documentation and samples trying to absorb as much as possible in a
short amount of time. Any suggestions would be much appreciated. We
would of course rather start off on the right path instead of learning
later that there's a much better and easier solution, but get stuck
with our original implementation.

We are working on designing a client server solution using WCF where
we will have at most 20 clients calling the server with a requests
using NetTcp. Because of the amount of data that can be returned and
usability we want to make this an asynchronous call as well as allow
the server return chunks of data at a time.
How much data are you talking about? Have you tested using a simple duplex
contract using a binary formatter and tcp transport?

David

Mar 8 '07 #3
On Mar 8, 10:46 am, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.bewrote:
<jtbjurst...@yahoo.comwrote in message

news:11*********************@t69g2000cwt.googlegro ups.com...
Please post WCF related questions to the WCF forum at :http://forums.microsoft.com/MSDN/Sho...D=118&SiteID=1

Willy.
Will do. Thanks.

Mar 8 '07 #4
On Mar 8, 11:06 am, "David Browne" <davidbaxterbrowne no potted
m...@hotmail.comwrote:
<jtbjurst...@yahoo.comwrote in message

news:11*********************@t69g2000cwt.googlegro ups.com...
How much data are you talking about? Have you tested using a simple duplex
contract using a binary formatter and tcp transport?

David
We are estimating that the larger responses could be around 75 mb. The
size is definitely an issue but the server accumulates the data in
chunks and it also can take while to gather all the data. So, getting
the data back in subsets is ideal.

Mar 8 '07 #5
Thus wrote jt*********@yahoo.com,
Bear with me because we are new to WCF and have been going through
documentation and samples trying to absorb as much as possible in a
short amount of time. Any suggestions would be much appreciated. We
would of course rather start off on the right path instead of learning
later that there's a much better and easier solution, but get stuck
with our original implementation.

We are working on designing a client server solution using WCF where
we will have at most 20 clients calling the server with a requests
using NetTcp. Because of the amount of data that can be returned and
usability we want to make this an asynchronous call as well as allow
the server return chunks of data at a time.
Asynchronous calls and asynchronous service execution are local phenomenon
and are not related to what happens on the wire or what metadata a service
exposes.

As far as chunking is concerned -- there are several implementations available
on the Web, but probably you want to use streaming instead, which is built-in.
- It looks like the Duplex calls only allow for a single response from
the server, so this option is out.
I'm not sure what you mean by "single message". A service can implement only
one Duplex contract, but you can host multiple Duplex bound services in a
single server application.
- We have considered creating an Endpoint on both the server and the
client. When requesting data from the server the client would pass
it's Endpoint information to the server. The server would then create
a channel using the client Endpoint info and send responses to the
client in chunks.
This gives you more flexibility regarding contract design, but you must implement
a full blown service host in your client application.
- We have also considered using a pattern similar to reading data from
a file where the client will request chunks of data from the server in
multiple calls until it receives an EOF flag.
That's ugly, as it exposes technical communication details in your service
contracts. That's what WCF actually tries to avoid.

[...]
- Finally, what would be the best way to pass back the data. We've
created a simple data container, which looks like a basic dataset and
is decorated to allow serialization by WCF. It seems like it would be
sufficient.
How did you allow serialization? In case of doubt, use a DataContract.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Mar 8 '07 #6
On Mar 8, 1:08 pm, Joerg Jooss <news-re...@joergjooss.dewrote:
Thus wrote jtbjurst...@yahoo.com,
Bear with me because we are new to WCF and have been going through
documentation and samples trying to absorb as much as possible in a
short amount of time. Any suggestions would be much appreciated. We
would of course rather start off on the right path instead of learning
later that there's a much better and easier solution, but get stuck
with our original implementation.
We are working on designing a client server solution using WCF where
we will have at most 20 clients calling the server with a requests
using NetTcp. Because of the amount of data that can be returned and
usability we want to make this an asynchronous call as well as allow
the server return chunks of data at a time.

Asynchronous calls and asynchronous service execution are local phenomenon
and are not related to what happens on the wire or what metadata a service
exposes.

As far as chunking is concerned -- there are several implementations available
on the Web, but probably you want to use streaming instead, which is built-in.
- It looks like the Duplex calls only allow for a single response from
the server, so this option is out.

I'm not sure what you mean by "single message". A service can implement only
one Duplex contract, but you can host multiple Duplex bound services in a
single server application.
- We have considered creating an Endpoint on both the server and the
client. When requesting data from the server the client would pass
it's Endpoint information to the server. The server would then create
a channel using the client Endpoint info and send responses to the
client in chunks.

This gives you more flexibility regarding contract design, but you must implement
a full blown service host in your client application.
- We have also considered using a pattern similar to reading data from
a file where the client will request chunks of data from the server in
multiple calls until it receives an EOF flag.

That's ugly, as it exposes technical communication details in your service
contracts. That's what WCF actually tries to avoid.

[...]
- Finally, what would be the best way to pass back the data. We've
created a simple data container, which looks like a basic dataset and
is decorated to allow serialization by WCF. It seems like it would be
sufficient.

How did you allow serialization? In case of doubt, use a DataContract.

Cheers,
--
Joerg Jooss
news-re...@joergjooss.de
Thanks. I'll have to look into streaming our return data. Are there
any examples or articles out there for this?

Mar 12 '07 #7
Thus wrote jt*********@yahoo.com,

[...]
Thanks. I'll have to look into streaming our return data. Are there
any examples or articles out there for this?
MSDN and the Windows SDK contain sample code. You can find more information
at http://msdn2.microsoft.com/en-us/library/ms731913.aspx. You may also want
to check out both Nicholas Allen's blog and Kenny Wolf's blog.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Mar 13 '07 #8

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

Similar topics

3
by: Josh | last post by:
A while back I started a project to write a mail server. I was doing this in c++ and found that I/O completion ports were the best solution for the project. I've since decided to port my...
16
by: Joel Finkel | last post by:
Folks, I am confused as to how to implement the following solution. I have a series of processing steps, each of which contains similar features (forms, etc). Therefore, I create a base...
1
by: Julian Hershel | last post by:
Reading about asynchronous programming (ms-help://MS.NETFrameworkSDK/cpguidenf/html/cpconasynchronousdesignpatterno verview.htm) I could not clarify some doubts. Hope you can help me. 1) Are...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
3
by: Maya Sam | last post by:
Hi all, I have the following code I created to do multiple websites data crawling using Asynchronous Thread calling it works fine however I'm confused when it comes to make the calling thread...
0
by: Paroxsitic | last post by:
Below is my VB.net 2003 code for simply looking at a page from a website with different users with cookies and a get command. More in the program I use the same technique to post actions to the...
3
by: =?Utf-8?B?Q0xFQVItUkNJQw==?= | last post by:
We have an asp.net application that will also use MSMQ. When a client makes a request, we want to check several databases and put each response in MSMQ. We don't want the client to wait for all...
3
by: intrader | last post by:
What I have is a class A with a method Foo. I would like to create a thread that instances A and then calls Foo asynchronously while performing other duties. I think that the solution is to...
5
by: wink | last post by:
Hello, I'm getting my feet wet in Python and thought I'd try to see how well Python works for asynchronous messaging. I've been using asynchronous messaging for 5 years and find it advantageous...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.