Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-user access to one COM instance?
Message
From
06/04/2000 23:09:05
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00355750
Message ID:
00356645
Views:
21
George,

>... any user who instantiates this COM server now uses the same instance. Data session is set to private (I am using the VFP SESSION class to achieve this) so each user has his own data session.

Before you go too far down this route, I hope you are planning some serious testing up front with a few dozen users all attempting to hit your out-of-process multi-use EXE at the same time.

Is the "save" activity you referred to so sparse that you will not have conflicts of method calls being blocked while the previous user's method is executing? You are using a "multi-use" EXE, not a "multi-threaded".

Are you sure that each user has his own data session when calling into the EXE? How do you accomplish that, with everyone using the same instance? Have you tested that to confirm that it really is the case?

It would not necessarily be a problem if you are designing your COM classes and methods to be absolutely stateless, closing up tables, clearing variables, etc after each call, or perhaps creating a new session object on each call and destroying it at the end of the method. Otherwise the next person in would get someone else's leftovers.

I'm just wondering about the architecture here that will naturally block (and make users wait) until the previous caller is done.

Why not just have a COM object that reads a common dbf log file of "saves" and writes them out to SQL Server then marks them completed? Or how about sending data objects or XML data from each save into an MSMQ Message Queue, which can then be read by your COM object one at a time? No blocking issues that will keep the apps waiting.

Is there something I am missing here -- perhaps a very slow pace of saves that keeps you from having blocking conflicts? Don't make the mistake of testing it yourself with just two computers and proclaiming victory, when you may sink way down the road when reality hits with 3 dozen users.

If you're concerned about SQL Licensing fees and the SQL Server traffic is not too heavy, just put your installations on MS Small Business Server, which includes SQL 7, Exchange Server, and a whole lot more, very reasonably priced.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform