Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi! I need to create WCF service, it would realize CRUD operations but with some extensions, so WCF Data Service is not match for my solution.
In this service is needed to share some data between instances, how better to realize it?:confused:
Singleton service also doesn't match to my solution. By setting InstanceContextMode.Single and ConcurrencyMode.Multiple or exist another way to solve my problem.
Posted

1 solution

If you have multiple services that want to share cached data, it may make sense to use a service specifically for that, and make service to service calls from the other services. This cached data service should be a singleton service.

If you have a single service with multiple instances, then you may just want to use a static field/object although you'd then have to make sure you handle synchronization issues (via some basic locking mechanism during writes).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900