Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 6 Jun 2008 02:43:43 -0700 (PDT),    group: microsoft.public.dotnet.framework.aspnet.webservices        back       


Architectural issue , threading   
so thats what I have :
a web service, lets say is called "Facility" and it`s primary goal is
to submit some information to the database.
the problem comes, when from another service/app (consumer) I send
such information to the Facility service..
all works fine, but in the end the "consumer" wants to make an report
(select) from the database , to recieve what has been saved (report).

of course the problem is the concurrence between the services.. while
the calling one is done with all the async seding to the Facility
service, it makes request to build the report. But meanwhile NOT all
of the data has been submitted to the databasa, due to traffic/sql
server concurrency and so forth..

the easiest workaround is to force a waiting time before requesting
the report, but I think you can offer a smarter approach when no time
is wasted on sleep mode ..

the "Facility" service is builded on .net 3.5 WCF , hosted by ASP.NET
IIS6 with the conditions :

 [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
                 ConcurrencyMode = ConcurrencyMode.Multiple,
                 IncludeExceptionDetailInFaults = true)]

I tried a solution with an EXTRA call to the service, to explicitly
check if all the data has been submited, but this way the extra call
can EVEN happen before the service has recieved all the previous data
of the wire ..

thanks in advance for any ideas :)
date: Fri, 6 Jun 2008 02:43:43 -0700 (PDT)   author:   unknown

Re: Architectural issue , threading   
Make sure the 2 webservice operations implemented in the "Facility" service 
are synchronized.on a critical section (monitor). That way a report can only 
be generated when no writing takes place and information is only submitted 
to the database when no report is being generated.

Its not the client the one making sure the data is written, its the service 
that makes sure all exposed operations are executed consistently when 
required - in this case its required because both operations share a single 
resource, the database.

Tiago Halm

 wrote in message 
news:e033137c-d80a-4c6e-b5fc-485169e09fd5@d77g2000hsb.googlegroups.com...
> so thats what I have :
> a web service, lets say is called "Facility" and it`s primary goal is
> to submit some information to the database.
> the problem comes, when from another service/app (consumer) I send
> such information to the Facility service..
> all works fine, but in the end the "consumer" wants to make an report
> (select) from the database , to recieve what has been saved (report).
>
> of course the problem is the concurrence between the services.. while
> the calling one is done with all the async seding to the Facility
> service, it makes request to build the report. But meanwhile NOT all
> of the data has been submitted to the databasa, due to traffic/sql
> server concurrency and so forth..
>
> the easiest workaround is to force a waiting time before requesting
> the report, but I think you can offer a smarter approach when no time
> is wasted on sleep mode ..
>
> the "Facility" service is builded on .net 3.5 WCF , hosted by ASP.NET
> IIS6 with the conditions :
>
> [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
>                 ConcurrencyMode = ConcurrencyMode.Multiple,
>                 IncludeExceptionDetailInFaults = true)]
>
> I tried a solution with an EXTRA call to the service, to explicitly
> check if all the data has been submited, but this way the extra call
> can EVEN happen before the service has recieved all the previous data
> of the wire ..
>
> thanks in advance for any ideas :)
date: Sat, 7 Jun 2008 04:00:04 +0100   author:   Tiago Halm

Re: Architectural issue , threading   
On Fri, 6 Jun 2008 02:43:43 -0700 (PDT), adrian.vladimirov@gmail.com
wrote:

>so thats what I have :
>a web service, lets say is called "Facility" and it`s primary goal is
>to submit some information to the database.
>the problem comes, when from another service/app (consumer) I send
>such information to the Facility service..
>all works fine, but in the end the "consumer" wants to make an report
>(select) from the database , to recieve what has been saved (report).
>
>of course the problem is the concurrence between the services.. while
>the calling one is done with all the async seding to the Facility
>service, it makes request to build the report. But meanwhile NOT all
>of the data has been submitted to the databasa, due to traffic/sql
>server concurrency and so forth..
>
This sounds like an ill-behaved client.
>the easiest workaround is to force a waiting time before requesting
>the report, but I think you can offer a smarter approach when no time
>is wasted on sleep mode ..
>
Why not add a third service that writes the data and then returns the
report? Clients that require a report after data submission can make
async calls to this service.

regards
A.G.
date: Sat, 07 Jun 2008 07:13:47 -0400   author:   Registered User

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us