c# - Concurrent requests with a static value and webservices -


I have a web server (ASP.Net - mono 2.6.7), whose value is static float x < / Code> There are two ways: getX () and setX (newX) . I have two clients, a PC with a C # console app and the other is Mobile Device with Mobile Android (KSAP2). Both web servers can be used.

I do not know: if my mobile device tries to getX () , while my PC setsX (NewX) , Will there be any problem with this?

Thank you.

This is not a good practice for state-wide implementation for services You can fulfill multiple requests Can be in different instances. This is the case in ASP.NET web services. In WCF, using configuration, you can change instancing behavior. For example, you can give an example to fulfill all the requests (some of them may be concurrent) - In case, the unstable state in one (as in your case), you need to synchronize access to the state. The thread on the shared state will generate a hindrance in completing synchronization requests because only one request can reach the state on the thread. Also, you can not increase horizontally (i.e. web form scenario where requests will be made from many machines). If you want to select multiple instances in the service of the request, then you have to externate the state, for example to keep it in the database. In such a case, you are fined access to external data sources (which can be much more than thread synchronization) , But you'll have a scalable design.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -