Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stateless components over Internet
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00771686
Message ID:
00771863
Views:
9
This message has been marked as the solution to the initial question of the thread.
Yrgo,

No stateless by its very nature means that everything happens in a single method call. No state between calls. Every property access is a call to the server and you're actually makeing a COM method call there. That is not stateless.

What you're referring to is a transaction state, which in truth is not set until a method executes, but while you're setting properties you have state. Internally a component may use its own properties and maintain state, but the external interface must be one method call to be stateless. That's why when you build COM+ components you either create a special front end class for them that are property less and pass lots of parameters typically (or objects) or you create high level methods in your objects that are stateless that internally call a few other methods and set properties etc.

THis may sound esoteric, but to see a really stateless mechansim stick your code onto the Web and you will know what I mean. Every method you call on the Web (via a Web Service or plain HTTP request) *must* be running in a single method call. IN fact Web Services don't even support properites for this very reason...

As I stated before MTS/COM+ doesn't require stateless programming, although it certainly helps to scale and provide better performance. Stateless code is alwyas faster than stateful code (on the same environment) because fewer server roundtrips are required.

+++ Rick ---

>thanks for your answer Rick!
>
>however, it seems to me that components can still be stateless if properties are used. it's when you set some properties at the "Init" event. if setComplete() or setAbort() is used in every function then all other properties that have been set by some earlier function call are set to default. but the properties set at Init() remain because init is actually called every time i use some function of my component. that's the impression i have got from some testing anyway.
>
>we haven't managed to make our mind about what technology to use for Internet enabling our app. the problem is that the main criteria we probably need to consider is performance. this however is quite tricky to predict if you don't have any actual experience.
>
>could anyone tell if COM+ means considerably higher performance cost compared with DCOM, Web services, ISAPI?
>
>thanks!
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform