Wiki Home

Using And Developing For MTS


Namespace: VFP
If you are planning to participate in this lecture on MTS, you should have MTS installed. If you are running Win9x or NT4, install the NT4 Option Pack (yes, even on Win9x). If you are running Win 2 K, you already have what you need. You can find the NT4 option pack on your Visual Studio disks or download it from the Windows web site. If you are running NT, make sure you reinstall any service packs after installing the Option Pack.

http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/default.asp

[Irrlelevant material has been trimmed.]

Session Start: Wed Sep 20 20:09:46 2000

[20:12] *** Cindy Winegarden changes topic to 'Craig Berntson: Using And Developing For MTS {^2000/09/20} 9PM ET, 6PM PT, 0100GMT '

[20:26] {Evan Delay} For those that don't have MTS installed, you can get it here.

[20:26] {CarlKarsten} What about Win2000?

[20:27] {CraigBerntson} It is totally integrated into Win2k. We'll talk briefly about that, but not in detail. If you want details, come to my pre-con session at Whilfest.

[20:33] {MarkusVoellmy} Craig Just a question I have been asked now twice, how do you check with Win98 if MTS is working?

[20:34] {CraigBerntson} Markus Voellmy, it's a service...it just runs, but, if you need to find out, you can launch the MTS Explorer.

[20:35] {MarkusVoellmy} Hmm ... You mean when the explorer works, MTS works also?

[20:36] {CraigBerntson} Not Windows Explorer, MTS Explorer... and MTS works without it. MTS Explorer is just the management console, much like SQL Server Enterprise Manager is not SQL-Server.

[20:37] {MarkusVoellmy} Yep. That I got. But I think in Win98 you haven't a menu entry to start the explorer, wenn you install it with the PWS ... at least Denis and Carlos had that problem ... here with NT it works fine ;)

[20:37] {CraigBerntson} No, there is a menu option...it's hidden under NT Option Pack.

[20:40] {PabloRoca} Good, then a question: Win98 in client and Win 2 K server does this fit?

[21:01] {Evan Delay} Tonight's presentation is Using And Developing For MTS with Craig Bernston. Craig Bernston is Microsoft MVP and a regular on the Universal Thread. He is also a frequent speaker for Microsoft at its Salt Lake City events and will be presenting at the upcoming Whilfest.

[21:02] {CraigBerntson} MTS is Microsoft Transaction Server, which is a stupid name because it does more than transactions. It comes as an add on to NT and Win9x but is built into Win2k, where it is married with COM to create COM+. Under win2k it's called "Component Services." So, the big question is, what can it do for you? When you are designing an n-tier solution, MTS will house your middle-tier COM components. You do not install mts on the client, but it runs on the server. We'll get to client setup later.

[21:05] {CraigBerntson} So, the first thing MTS does is provide a runtime environment for COM components. These must be compiled to DLLs and it's better to use apartment model threading. Under VFP Build options, it's labeled "Multi-threaded dll", but it's really apartment modle.

[21:06] {DenisChasse} Apartment model threading?

[21:06] {CraigBerntson} We're all familiar with single threading, that's what we have now. Let's put this in layman terms: let's say you go to the supermarket and there are 10 checkout stands, but only one is working. All the customers have to go through that one queue. The person at the front of the line gets serviced and all others wait. With apartment model threading, many lines are open, but you have to pick one, and only one. You can't go to a different one. With multi-threading, you can go to many lines at the same time. Any questions on that?

[21:09] {CarlKarsten} But you still only have one processor (or 2), but not 10 - so what is the benefit?

[21:09] {PabloRoca} Any limits on that?

[21:10] {CraigBerntson} If you have one processor, all the lines are time sliced, so multiple people get helped at the same time (or close to it).

[21:10] {CraigBerntson} Pablo: I don't know of any limits.

[21:11] {CarlKarsten} But what is the advantage of "time sliced" - that just means that each gets less.

[21:11] {CraigBerntson} Carl, let's say that you have a component that takes three seconds to run. Person one will get it and it will take three seconds. If it's single threaded, person two will get it and have to wait for person one to finish, so it could take 6 seconds.

[21:12] {CraigBerntson} If it's time sliced (Apartment Model) then it could take say, 4 seconds for both person one and person two. So, while it takes more time for person one, it takes less time for person two. Now extrapolate that out to 100 or 1000 people.

[21:13] {CarlKarsten} Where does it get the extra time?

[21:13] {DenisChasse} Why then would anyone want to make a DLL single threaded?

[21:13] {CarlKarsten} I would think the switching back and forth would be overhead, therefore added to the total.

[21:14] {CraigBerntson} Carl it's time sliced so some time is given to each user. What's great about MTS is that it is a single EXE, not multiple, so the switching is minimal.

[21:14] {Vlad} Carl, Its Input output problem. When one user wait while data saved to disk, other user processed its calculations.

[21:14] {Evan Delay} Ah...

[21:14] {CarlKarsten} Right - like 48% to user1, 48% to user2, and 4% for overhead.

[21:15] {DenisChasse} Why then would anyone want to make a DLL single threaded?

[21:15] {CarlKarsten} So the 3 second process takes about 6.1 seconds, not 4

[21:15] {CraigBerntson} The next thing that MTS does is called "just in time activation" or JIT. What this means is that the component sits on disk until requested the first time. It then loads when requested and then unloads when no one is using it. Or, you can set a timeout of like 5 mintues, which means if no one uses it, then it unloads after five minutes. You can also set things up so it always stays in memory. When person two uses the component, it is already in memory, so the instantiation time is much shorter.

[21:17] {DenisChasse} Are there limitations to MTS on W98 compared to MTS on Win NT or W2000?

[21:17] {CraigBerntson} Yes, there are Denis...we'll get to them in a bit. Ok, next is Object Request Broker or ORB. This means that MTS will handle calls from the client to the proper instance of the component or launch a new one if needed. Nothing mysterious there.

[21:19] {CraigBerntson} Next is Connection Pooling. When you establish a connection to something like SQL-Server, the time it takes to make the connection is big, so, MTS will make the connection. When you're done with it, MTS will hold it open for the next person so that overhead is not there.

[21:21] {CraigBerntson} Next is Role Based Security. You can set things up so that an NT user group or user is a member of a role. When the request is made to instantiate the component, MTS will validate that the user can access the component. If not, the component is not instantiated and an error is returned to the client. Because there is no security on win9x, you can't do security. This security checking is done automatically. you don't have to do anything in your code to make it work. It's all setup through NT security and the MTS Explorer.

[21:24] {CraigBerntson} Finally, MTS provides transaction services. These work acrosss databases, so if you have some data in Oracle and some in SQL-Server, a transaction will work from MTS. It's called a two-phase transaction. In phase one, MTS asks the data store if if can do the transaction. If it gets a "yes" in everycase, then phase two happens where MTS tells the data store to commit the data. If one data store says "no", then MTS sends out a rollback command in phase two.

[21:26] {ChrisMccandless} Craig, how often does this happen, where I would need to write to different DBs at the same time?

[21:27] {CraigBerntson} Chris: if you are in a heterogenous environment, you may need to do this. I know of a place that needs to update data on a mainframe database and in SQL-Server.

[21:26] {MarkusVoellmy} Craig ... So using MTS would be another way to secure your VFP data if I see this right?

[21:27] {CraigBerntson} Markus, you could do that, but there is a caveat to using VFP data. You can't use MTS to manage the transaction when going to MTS data.

[21:28] {MarkusVoellmy} All Access over BizObjects then of course.

[21:28] {CraigBerntson} OOPS you can't use MTS to manage the transaction when going to VFP data. MTS doesn't understand vfp transactions.

[21:28] {CraigBerntson} Markus: yes...you're biz and data objects would all run under MTS.

[21:29] {Vlad} Is it possible to call VFP COM Object through MTS, so it will make all transactions?

[21:29] {MarkusVoellmy} And I can prohibit the access to them using MTS that's what I meant.

[21:29] {CraigBerntson} Vlad, not to VFP data, but you can to SQL-Server or Oracle.

[21:30] {CraigBerntson} markus: yes, mts security works for vfp objects

[21:30] {Vlad} Why? I cannot inside VFP COM object use 'BEGIN TRANSACTION command?

[21:30] {CraigBerntson} vlad: you can do it that way, but YOU are managing the transaction, not mts

[21:30] {PabloRoca} the destination DB, can be any ODBC compliant? (like Interbase, ...) ?

[21:31] {Vlad} Can MTS call VFP COM object when start transaction and end transaction (when needed)?

[21:31] {CraigBerntson} pablo: yes

[21:31] {Vlad} So I can write functionality in VFP COM object to support transactions?

[21:31] {CraigBerntson} vlad: the transaction is independent of the component...it's based on the data store

[21:31] {CraigBerntson} yes, vlad, you can

[21:32] {CraigBerntson} when you write your components for running under mts, you should keep them stateless

[21:33] {CraigBerntson} this means that you don't set or query properties from outside the component

[21:33] {CraigBerntson} do everything through parameters and RETURNs

[21:33] {CraigBerntson} there is nothing stopping you from not using properties

[21:34] {CraigBerntson} but, stateless will make your solution more scalable

[21:34] {CraigBerntson} you should also instatiate the component just before you need it

[21:34] {CraigBerntson} and destroy it as soon as you're done

[21:34] {S} what does stateless mean?

[21:34] {Vlad} Something like 'call-response', right?

[21:35] {Evan Delay} Craig, question.

[21:35] {CraigBerntson} S, think of state as holding onto something .. for example a network connection on your corporate LAN

[21:35] {CraigBerntson} you log onto the lan in the morning, and maintain state all day, then log off at the end of the day

[21:36] {CraigBerntson} stateless is like the internet.. you make a connection to a web site, download a page, then disconnect

[21:36] {CraigBerntson} Vald: yes, call-response

[21:36] {S} Thanks you, Sir

[21:36] {CraigBerntson} Evan, what's your question?

[21:36] {Evan Delay} We can pass an object back from the COM component?

[21:36] {CraigBerntson} umm...sometimes

[21:37] {CraigBerntson} you can pass ado record sets, which is an object

[21:37] {Evan Delay} But not a custom object?

[21:37] {CraigBerntson} but you can't do something like scatter name MyObject and pass that back

[21:37] {Evan Delay} Like oData populated with my data

[21:37] {CraigBerntson} evan, can you pass a custom object under com?

[21:38] {Evan Delay} Not sure.

[21:38] {Evan Delay} Was thinking this was a way to get around sthe stateless problem.

[21:38] {Evan Delay} Pass back an object with propertie populated with data

[21:38] {CraigBerntson} evan, I've never tried it either cause I use ado or a single value return

[21:39] {Evan Delay} Okay. I will research. Thanks

[21:39] {CraigBerntson} so, there's your homework assignment

[21:39] {CraigBerntson} should be easy to test

[21:39] {RobertBaker} Can you return an XML string

[21:39] {CraigBerntson} yup, you can robert cause it's a single value

[21:40] {PabloRoca} how does MTS fit with crash situations? power failure, ... what must we do in that case?

[21:40] {CraigBerntson} mts works like anything else in that case, pablo

[21:41] {PabloRoca} but any gets corrupted? or not?

[21:41] {CraigBerntson} there's nothing to corrupt...it's just a program

[21:41] {PabloRoca} ok

[21:42] {CraigBerntson} ok, let's take a look at mts explorer

[21:42] {CraigBerntson} it gets a bit tricky here, because the interface is different on all the os

[21:42] {CraigBerntson} win9x is different than nt which is different than win2k

[21:43] {CraigBerntson} if you're on win9s or nt, go to start}programs}option pack and then to MTS explorer

[21:44] {CraigBerntson} on win2k, it's under control panel} administrative} component services

[21:44] {CraigBerntson} step through the interface until you open up "my computer"

[21:45] {CraigBerntson} everyone with me?

[21:45] {DenisChasse} yes

[21:45] {CraigBerntson} on win9x and nt, it will say "packages installed"

[21:46] {CraigBerntson} on win2k it's "COM+ applications"

[21:46] {CraigBerntson} They are the same thing, just different names.

[21:46] {CraigBerntson} we're going to create a new package

[21:47] {CraigBerntson} right click on "packages installed" or "com+applications" and select "new package"

[21:47] {CraigBerntson} then create an empty package and name it "Wed MTS"

[21:47] {CraigBerntson} anyone lost?

[21:48] {Vlad} I right click, but nothing happens..

[21:48] {PabloRoca} library app or server app?

[21:48] {CraigBerntson} server app

[21:48] {CraigBerntson} Vlad, what OS are you on?

[21:48] {Vlad} W2K

[21:48] {SimonGaudiuso} win2k -> New -> Application = New Package?

[21:48] {CarlKarsten} in win2k - right click on the left hand pane

[21:49] {RobertBaker} on W2K is it new Application

[21:49] {CraigBerntson} carl: yes

[21:49] {DenisChasse} W98 doesn't work. Nothing happens with the right click

[21:49] {Vlad} Ok, I got it. Right click - new window from here.

[21:49] {Vlad} Than in new window right click works as Craig said...

[21:51] {CraigBerntson} are we all there yet?

[21:51] {Vlad} yes, in wizard...

[21:51] {CraigBerntson} vlad: where in the wizard are you?

[21:52] {PabloRoca} I just done, with the rights of the interactive user (admin)

[21:52] {Vlad} COM application install wizard

[21:52] {CraigBerntson} Vlad: click Next

[21:52] {Vlad} Than create new application, right?

[21:52] {CraigBerntson} Denis: right click on the right-hand side

[21:52] {CraigBerntson} vlad, yes

[21:53] {CraigBerntson} denis: did you get there?

[21:54] {CraigBerntson} denis: I have it on my win98 box at home....we can deal with this directly later on

[21:55] {CraigBerntson} but let's move on

[21:55] {CraigBerntson} underneath the package on the left pane, is components and roles

[21:55] {CraigBerntson} under roles is where you setup security

[21:55] {CraigBerntson} we're going to build a component in vfp and install it into the package

[21:56] {CraigBerntson} you can download the code for the component at http://members.home.com/foxpro/mts.htm

[21:56] {CraigBerntson} then unzip it into a folder of your choice

[21:56] {CarlKarsten} um, im on "create empty app", "enter a name..." of the com app wizard

[21:57] {CraigBerntson} Carl: Empty app...the name is Wed MTS

[21:57] {CraigBerntson} then just accept the default settings for everything else

[21:57] {CarlKarsten} got it

[21:58] {CraigBerntson} once you unzip the code, lauch vfp and open the project, then the prg

[21:59] {CraigBerntson} this is the component code that we'll compile to a dll to run in the package that we just created

[21:59] {CraigBerntson} if you look at the code, you'll see the line loMtx = CREATEOBJECT("MTXAS.Appserver.1")

[21:59] {CraigBerntson} this gets a reference to mts

[22:00] {CraigBerntson} then loContext = loMtx.GetObjectContext()

[22:00] {CraigBerntson} gets a reference to your instance of the component

[22:00] {CraigBerntson} loContext.SetComplete() does two things

[22:00] {CraigBerntson} it will commit any transactions

[22:01] {CraigBerntson} and it tells mts that you're done using that instance of the component and another user can use it

[22:01] {CraigBerntson} loContext.SetAbort()

[22:01] {CraigBerntson} also says "I'm done"

[22:01] {CraigBerntson} but it says "rollback any transactions"

[22:02] {CraigBerntson} even if you're not using transactions, you need to include one of those two lines

[22:02] {CraigBerntson} preferably setabort() because there is less overhead to abort and commit

[22:02] {CraigBerntson} any questions on the code?

[22:03] {CraigBerntson} ok, let's build a dll

[22:03] {Vlad} multi-threaded?

[22:04] {CraigBerntson} vlad, in our example it won't matter

[22:05] {CraigBerntson} now switch back to mts explorer and right-click on "components' underneath the package we just created

[22:05] {CraigBerntson} we want add a new component

[22:06] {CraigBerntson} at some point it will ask you which dll you want to install

[22:06] {CraigBerntson} select the one we just built

[22:06] {Vlad} again, need to open new window to get 'New' option...

[22:06] {CraigBerntson} you MAY need to select the tlb too

[22:07] {CraigBerntson} vlad, I think that's right on win9x

[22:07] {PabloRoca} Craig, a question, where should the dll reside? Must I prior copy this to the server disk?

[22:07] {CraigBerntson} just walk through the wizard

[22:07] {Vlad} I'm on w2k, that supposed to be better...

[22:07] {CraigBerntson} good question pablo

[22:08] {CraigBerntson} if you're installing on a server, you'll need to copy the dll, the tlb to the server and install the VFP runtime

[22:08] {CraigBerntson} vlad, you should just be able to right click and run the wizard

[22:08] {Vlad} Ok, I'm there.

[22:08] {CraigBerntson} everyone get their component installed?

[22:08] {Vlad} Yes

[22:09] {CraigBerntson} you should see a ball on the right hand side

[22:09] {Hiland} yes - this ball is really cool!

[22:09] {CraigBerntson} ok, now switch back to vfp and instiate the component with the code

[22:09] {CraigBerntson} ox = createobject("exone.math")

[22:10] {CraigBerntson} then switch back to mts explorer and the ball should be spinning

[22:10] {CarlKarsten} too cool!

[22:10] {CraigBerntson} now in VFP we can call the method in the component

[22:10] {CraigBerntson} ? ox.multiply(3, 4)

[22:11] {CraigBerntson} you should get 12

[22:11] {Hiland} my box is snipping clockwise - is this significant?

[22:11] {CraigBerntson} nope, it isn't hiland

[22:11] {CraigBerntson} if you ox=null the ball will stop spinning

[22:12] {ChrisMccandless} Craig, under Win2k, I am not seeing the ball spinning, although I get 12 as a result. any ideas?

[22:12] {RobertBaker} get ole error - unknown name

[22:12] {CraigBerntson} chris, dunno .. it spins for me here

[22:12] {MarkusVoellmy} Robert check for typo :)

[22:12] {CraigBerntson} robert, did you build the component?

[22:13] {RobertBaker} tronsposition

[22:13] {Hiland} RobertBaker - sounds like it wasna instantiated properly - you might have to recompile and reload the beastie

[22:13] {CraigBerntson} I know this is kinda hard to follow, but the problem is that it's different under each os

[22:14] {CraigBerntson} if you're at miami or whilfest, I'll be happy to show you in person

[22:14] {CraigBerntson} ok, we get everyone there?

[22:14] {Vlad} yes

[22:14] {CraigBerntson} we have one more thing to discuss

[22:14] {RobertBaker} yes ?

[22:14] {CraigBerntson} remember that this stuff is on the server

[22:14] {CraigBerntson} so the question is, how do we get the client machines to know about it?

[22:15] {CraigBerntson} the answer is dcom

[22:15] {RobertBaker} re single or multi threaded compile - what is exact difference under MTS

[22:15] {CraigBerntson} robert: we discussed that earlier, review the log when it's posted

[22:15] {PabloRoca} yes I got an OLE dispatcht err 733

[22:15] {SimonGaudiuso} Craig: to build the dll I need to build a com dll?

[22:15] {Vlad} Simon, right

[22:15] {CraigBerntson} simon: that's the only kind of dll that you can build in vfp

[22:16] {CraigBerntson} so, dcom is how the client will see the component

[22:16] {CraigBerntson} if you've ever configured dcom, you know it's a pain the butt

[22:16] {CraigBerntson} but, mts makes things simple

[22:16] {CraigBerntson} go back to mts explorer and right-click on the package that we just created

[22:17] {CraigBerntson} on win2k, you'll select export

[22:17] {CraigBerntson} I think it's the same on nt and win9x

[22:17] {CraigBerntson} let's walk through win2k first, then get to nt

[22:18] {CraigBerntson} because there are some differences

[22:18] {CraigBerntson} click next on the first screen in the wizard

[22:18] {CraigBerntson} it will then ask for a full path and filename

[22:18] {CraigBerntson} enter c:\mymts\ex1

[22:19] {CraigBerntson} and make sure you select "Application Proxy" in the radio buttons

[22:19] {CarlKarsten} w2k - where is 'export'?

[22:19] {CraigBerntson} Carl: right click on the package that we created

[22:19] {CraigBerntson} it's in the Component Services manager

[22:20] {CarlKarsten} got it

[22:20] {CarlKarsten} not the spinny ball, but one level up

[22:20] {CarlKarsten} wedMTS

[22:20] {CraigBerntson} now, if you go out to windows explorer, you'll see that an MSI file was created...you'll install that on the client

[22:20] {CraigBerntson} Carl: that's right

[22:21] {CraigBerntson} ohh.. a .cab and a .msi

[22:21] {CraigBerntson} install those on the client

[22:21] {CraigBerntson} they'll setup all the dcom crap for you

[22:21] {CraigBerntson} that's it...you're done

[22:21] {CraigBerntson} now, on nt:

[22:22] {CraigBerntson} I 'think' it's the same on 9x

[22:22] {CraigBerntson} right click on the package and select export

[22:22] {CraigBerntson} enter C:\mymts\ex1

[22:22] {CraigBerntson} then click on export

[22:23] {CraigBerntson} now go out to windows explorer

[22:23] {CraigBerntson} you'll see a foler called c:\mymts\ex1\clients

[22:23] {CraigBerntson} in that folder is an exe

[22:23] {CraigBerntson} run that exe on the client

[22:23] {CraigBerntson} that's it

[22:23] {RobertBaker} On my Win98 I attempted install of component developed on my W2K server: it says Component Services are not installed - they are avaiable on W2K

[22:24] {CraigBerntson} robert...hold on a moment, let me try that

[22:24] {RobertBaker} I have MTS on my laptop

[22:25] {PabloRoca} I got in the Win98 client (with W2K server), install a new service pack for running this msi?

[22:26] {Evan Delay} I still don't like client install stuff.

[22:26] {CraigBerntson} Robert: it's gonna take some more time...I'll try it later and get back

[22:26] {RobertBaker} thx

[22:27] {RobertBaker} I will try from NT

[22:27] {Vlad} Evan right, is there way to avoid such installation?

[22:27] {CraigBerntson} Pablo: msi is microsoft installer file, so you'll need that

[22:27] {CraigBerntson} evan: no...you have to install this on the client

[22:27] {PabloRoca} yes, but I think is not available for spanish w98...

[22:27] {AshishBindra} I exported and it said export successful but it did not create an exe, the dir has a .PAk, .dll, and .tlb files

[22:28] {CraigBerntson} AshishBindra: are you running nt or 9x?

[22:28] {AshishBindra} 98

[22:28] {Evan Delay} I would rather deploy with ASP and COM and avoid the DCOM client install

[22:28] {CraigBerntson} that could be it, I don't think you can create a client install with 98

[22:28] {Vlad} What is needed to install DCOM on client?

[22:29] {AshishBindra} Craig Berntson: ok.. thanks!

[22:29] {CraigBerntson} evan: if your app server and web server are different boxes, you'll need to install this on the web server

[22:29] {Evan Delay} Craig, at least that is only 1 install. Not 3000 [22:29] {CraigBerntson} vlad: if don't have dcom installed, you'll need to install it too

[22:29] {CraigBerntson} evan: correct

[22:29] {Vlad} How?

[22:30] {PabloRoca} with Win98 SE it's necesary? I suppose it's included?

[22:30] {ChrisMccandless} Craig, I tried to install, but got an Error registering COM+ Application. Any clues? This is on a diff. Win2k maching

[22:30] {CraigBerntson} vlad: there is a link someplace on the microsoft web site, but I'm not sure where it is .... start looking at www.microsoft.com/windows

[22:30] {CraigBerntson} pablo: win98 ships with dcom...95 does not

[22:30] {CraigBerntson} chris: you need to install the vfp runtimes first

[22:31] {MarkusVoellmy} Craig: That looks quite fast here over the network ;)

[22:31] {Vlad} Indeed I'm starting to like WEB version more, just as Evan mentioned...

[22:31] {CraigBerntson} so far, we've talked about using mts for hosting biz and data objects

[22:32] {CraigBerntson} but there's another use

[22:32] {ChrisMccandless} Ah, that makes sense. I should pay more attention *g*

[22:32] {CraigBerntson} here at the office we have about 200 desktops that need to access data from another vendor

[22:32] {CraigBerntson} one vendor is in texas, the other in virginia...and we're here in utah

[22:32] {CraigBerntson} one vendor is sql server, the other oracle

[22:33] {CarlKarsten} wait - now that we have this thing insalled on a client, how to we use it?

[22:33] {CraigBerntson} rather than configure odbc on all 200 desk tops, we set it up on an application server, then created a component

[22:33] {CraigBerntson} then we did the client install and everyone was connected

[22:33] {CraigBerntson} much easier and very fast

[22:34] {CraigBerntson} carl: just like we did before... ox=createobject("exone.math")

[22:34] {CraigBerntson} to the client, it doesn't know the component is on the server ... it thinks it's on the same box

[22:35] {Vlad} What about CREATEOBJECTEX( ) command? Help says it is for 'remote computer' objects...

[22:35] {CraigBerntson} no.....

[22:35] {MarkusVoellmy} Craig: The old Dcom way works also...

[22:35] {CraigBerntson} createobjectex is if you are running a com exe on the server

[22:35] {CraigBerntson} markus: but it's soooooo messy to setup all the calls

[22:36] {RobertBaker} It works over the NET?

[22:36] {CraigBerntson} nope, it won't work over the net because com is synchronous and the net is asynchronous

[22:36] {CraigBerntson} wait..that's not right

[22:37] {CraigBerntson} you have to maintain the connection to the com object until you are done with it...you can't do that with http...it'll time out

[22:37] {RobertBaker} So only for a LAN?

[22:37] {CraigBerntson} yup

[22:37] {CraigBerntson} or, your web server can call it

[22:37] {Vlad} Craig, really, Why help nothing writes about mentioned limitation for createobjectEX?

[22:38] {Vlad} I just found it uses DCOM too...

[22:38] {Vlad} And can connect over internet.

[22:38] {CraigBerntson} vlad: I didn't write that help topic, so I can't say

[22:38] {SimonGaudiuso} Craig: Then how did you connect to two different company?

[22:39] {CraigBerntson} simon: I guess I wasn't clear enough...the server is here ... it makes an odbc connection over a t1 line to the other companies

[22:39] {CraigBerntson} all the mts stuff is local

[22:40] {PabloRoca} Craig a question

[22:40] {CraigBerntson} go ahead Pablo

[22:40] {PabloRoca} With CREATEOBJET don't works for me but yes with CREATEOBJETEX

[22:40] {PabloRoca} curious.....

[22:41] {Vlad} Maybe createobjectEx don;t require to install MTS stuuf for DCOM on client computers?

[22:41] {CraigBerntson} I don't see why createobjectex won't work, but you really shouldn't use it for this

[22:41] {Vlad} Will try thihs now...

[22:41] {CraigBerntson} I don't know why createobject didn't work

[22:42] {PabloRoca} I got an OLE dispatch error 733 with createobject

[22:42] {PabloRoca} sorry using the ox object with multiply

[22:42] {CraigBerntson} I'd have to dig into it a bit more pablo .... don't really have the time tonight

[22:42] {PabloRoca} ok

[22:42] {MarkusVoellmy} Craig As you said, here works both. Does Createobject EX not use the MTS then?

[22:43] {CraigBerntson} createobjectex would have to use mts because a dll can't run on its own, it has to have an exe to host it, which is what mts is doing

[22:43] {MarkusVoellmy} Aha. Thx So just more overhead then.

[22:44] {CraigBerntson} there is lots more to mts. I suggest you look at randy brown's white paper on the microsoft vfp homepage

[22:44] {CraigBerntson} hold on and I'll get the exact link

[22:45] {CraigBerntson} http://msdn.microsoft.com/library/default.asp?URL=/library/techart/MTSVFP.htm

[22:46] {RobertBaker} I found the solution to the problem

[22:46] {CraigBerntson} or you can shorten that to just

[22:46] {CraigBerntson} http://msdn.microsoft.com/library/techart/MTSVFP.htm

[22:46] {CraigBerntson} what was it Robert?

[22:46] {RobertBaker} Must click on Application proxy

[22:46] {CraigBerntson} ahh.. yes

[22:47] {CraigBerntson} that would do it

[22:47] {PabloRoca} where? robert

[22:47] {ChrisMccandless} Craig, quick question: is there an easy way to install the VFP runtime on a client?

[22:47] {CraigBerntson} chris: yes, create a setup that has only the runtime

[22:47] {RobertBaker} Smile (no slap) - on Application Export Info in win 2K

[22:47] {PabloRoca} tnx

[22:48] {CraigBerntson} any more questions before I get back to work?

[22:48] {Evan Delay} Not here.

[22:48] {AshishBindra} CraigBerntson:Got to go know, this session was really cool - learnt some interesting things today. It was time well spent. Thanks a lot Craig... you did a great job. G'night...

[22:48] {SimonGaudiuso} Thanks for you time

[22:49] {PabloRoca} yes, a question

[22:49] {CraigBerntson} Ashish, glad I could be of help

[22:49] {Evan Delay} Great job Craig. Thank you for presenting.

[22:49] {PabloRoca} how portable is MTS? I explain, if I need to copy the app to a laptop for working outside the office, wich steps must I do? (suppose the laptop has W98 with only the needed soft for mts installed)

[22:49] {MarkusVoellmy} Thank you Craig ... fantastic session tonight

[22:49] *** AshishBindra has quit IRC (QUIT: )

[22:49] {CraigBerntson} Pablo, the export will also create and install for another server

[22:49] {PabloRoca} ok, perfect, thanks for this session

[22:49] {CraigBerntson} then, just install the stuff there

[22:50] {CraigBerntson} one more thing of importance

[22:50] {CraigBerntson} there are some important COM concepts that we didn't go over tonight that you should know about

[22:51] {CraigBerntson} I'm scheduled to do an Intro to COM session next month...please come back then so that you'll get that information

[22:51] {CraigBerntson} also

[22:51] {Vlad} Where I can read more abou such functions of MTS as GetObjectContext and Set Complete?

[22:51] {PabloRoca} Craig a query, can you dig a bit more between the createobject versus createobjectex to tell us more on this?

[22:51] {CraigBerntson} COM+ has some additional things that we didn't get into

[22:52] {CraigBerntson} pablo, I'm not going to have time before devcon...perhaps that's a good question for posting on the UT

[22:52] {PabloRoca} ok

[22:52] {CraigBerntson} I'm doing a pre-con session at whilfest that will talk about COM+ and how vfp 7.0 can take advantage of it

[22:53] {PabloRoca} the microsoft way is going in this direction, I'm figuring much net overheat can this do?

[22:53] {CraigBerntson} pablo, .net is going in a different direction, but this stuff won't go away and .net is a long way off

[22:54] {Evan Delay} Just a note everyone, we are hoping to have a live chat from Miami Devcon next week on _Tuesday_. Find out about VFP7

[22:54] {CraigBerntson} but what we discussed here is the current shipping technology

[22:54] {PabloRoca} sorry I wanted to say network overheat

[22:54] {CraigBerntson} pablo: it actually makes your network more scalable

[22:55] {RobertBaker} Isn't SOAP going to cut down DCOM's future?

[22:55] {PabloRoca} for sure, but doing all with COM, DCOM, ... don't know how much is the network traffic increased

[22:55] {MarkusVoellmy} Pablo Gigabit ethernet ... Gigabit ethernet it's all I'd say :-)

[22:55] {Mike} There's gonna be a web cast of DevCon, right?

[22:56] {CraigBerntson} Robert: nope...soap allows different systems to talk, one might be unix and java and the other windows and com

[22:56] {PabloRoca} Devon? You must wear a webcam for seeing you! :))

[22:56] {PabloRoca} Devon=Devcon

[22:56] {Mike} SOAP uses HTTP, DCOM can use a direct connection so its faster, and a little more stable and all that. Right, Craig?

[22:57] {PabloRoca} Markus...LOL!

[22:57] {CraigBerntson} but com is windows only...what happens if you need to connect to a unix/java box?

[22:57] {Mike} True

[22:57] {Mike} But you couln'dt use DCOM there anyways

[22:57] {Mike} So its not like SOAP is cutting in on terrirtory

[22:57] {CraigBerntson} soap uses xml to handle everthing

[22:58] {CraigBerntson} soap is platform independent and being pushed by companies other than ms

[22:58] {RobertBaker} So we write different apps for LAN & WAN?

[22:58] {Mike} As a rule of thumb, ifyou can use DCOM, do it. Everywhere else SOAP will have to do. Would you agree?

[22:58] {Evan Delay} SOAP is also "firewall friendly"

[22:58] {Mike} Aka: Don't use SOAP where you can use DCOM?

[22:58] {CraigBerntson} no, that's too general a statement, Mike

[22:59] {DenisChasse} Finally Craig. I don't think that I'm going to try to figure out what went wrong with my MTS installation. I think that this will give me the necessary push to install W2000 on my machine.

[22:59] {PabloRoca} Evan, with createobjectex I got a firewall warning! :)

[22:59] {CraigBerntson} we're setting up a new office in kentucky...I'm not going to use dcom to connect the two offices

[22:59] {CraigBerntson} denis: win2k is MUCH better than 9x .... good decision

[23:00] {Mike} Why, Craig? Wouldn't DCOM alsways be many times more effeicent that SOAP?

[23:00] {PabloRoca} and slowerrrrrrr.

[23:00] {Vlad} Guys - concerning Create Object Ex - it works, but you need to provide class ID istead of name like 'exone.Math'

[23:00] {CraigBerntson} we're not going to use soap either

[23:00] {PabloRoca} Vlad, this works: ox = createobjectex("exone.math","myserver")

[23:00] {RobertBaker} RDS?

[23:00] {CraigBerntson} thanks Vlad, that's good to know

[23:00] {Vlad} So here is real power of VFP - no need to install something to get remote object work.

[23:00] {Mike} I meant in response to your "Too general of a statement"

[23:00] {MarkusVoellmy} Vlad Nah, thats not true.

[23:00] {DenisChasse} Thanks and have a good night everyone!

[23:00] {CraigBerntson} no, not rds... two sql servers with replication

[23:01] {RobertBaker} AHH!

[23:01] {Vlad} However, question - is MTS involved when we use Create Object Ex?

[23:01] {RobertBaker} How often will they sync?

[23:01] {PabloRoca} I think not, cause my icon is not spinning...

[23:01] {CraigBerntson} vlad: yes ... same reason... the dll runs on the server ... the dll must run inside the memory space of an exe...mts is the exe

[23:02] {CraigBerntson} robert: we haven't determined that yet...we're in the early planning stages now

[23:02] {CraigBerntson} ok...I need to make some systems upgrades before the nightly processing kicks in

[23:02] {CraigBerntson} thanks for coming



Contributors: Craig Berntson Evan Delay Cindy Winegarden
Category XML Category Training Category Wednesday Night Lectures
( Topic last updated: 2000.09.23 01:10:04 AM )