From the little that I know about WCF it seems to be the right solution to a particular problem I have but I'd like to get some input on it.
Problem Description:
Clients sequentially access domain objects from a list roughly once ever 1-10 minutes (average is 2 mins), but no 2 clients should ever access the same object. Certain orderings should be maintained within the list.
Example Usage:
Client X -> WCFService::GetNextObject() -> Fetch from DB, sort
<- return nextObject
Where X is [1,~200)
The list of objects is basically a DB table where each object is annotated with a priority. All objects with priority 1 should be the next ones passed out. The ordering from there depends on the priority level. E.g. priority 1 objects should be handed out chronologically based on a datetime on the object, whereas priority 4 objects need to be handed out alphabetically based on a string value on the object.
[Edit]Some points of clarification: there are other sorting schemes for different priority levels which need to reference associated records in myriad other tables - it seems overly complicated but there is a valid business case for it. Likewise, objects are added and removed from this list potentially very frequently (but the average is rarely).[/Edit]
I am looking at using WCF so that people from any geographical location can use it via LAN/WAN and it will ensure that the ordering is maintained and that no two clients get the same nextObject. Am I right in thinking that WCF is a good choice for this?
The one thing I wonder about is the state of a WCF Service? Or, better put: Is it stateless? Will each client's access to the service create a new logical WCF instance? And if so, then how is synchronization/locking normally approached?
It should be noted that everything else at the company here is developed on the .NET stack, so there's obviously an existing affinity for .NET technologies. It's not, however, mandatory by any means.