RTC Forums
November 23, 2024, 09:17:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: kbmMW to RTC "Transport" (experimental)  (Read 13191 times)
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« on: January 02, 2013, 01:47:35 AM »

Here is an experimental implementation of kbmMW 2 RTC Transports, which make it possible to intagrate kbmMW functionality into RTC Clients and Servers (provided you have both component sets installed). By using RTC Client and Server components as transports for kbmMW, all data from kbmMW components will be sent by RTC components over HTTP/S, wrapped inside RTC-specific "envelopes".

This is practical for RTC Applications, because they can now be extended with database access functionality provided by kbmMW. But, the added "envelope" also makes kbmMW+RTC Applications INCOMPATIBLE with kbmMW Clients and Servers using other transports.

If, for example, you have existing kbmMW Client and Server Applications and you wanted to replace the existing transposts with the RTC SDK, you would need to replace kbmMW transports on both sides (Client and Server). Replacing kbmMW transports only one side won't work, because of the "envelope" that RTC Transports add to all kbmMW data sent over them.

Download: kbmMW 2 RTC Transport units (ZIP).

The latest version of kbmMW and RTC SDK components is required for the kbmMW 2 RTC Transports to work.

NOTE: These units are JUST AN EXPERIMENT and there is NO SUPPORT for using them. There is also NO PACKAGE and NO REGISTRATION UNIT for adding kbmMW2RTC Transport components to the component palette, so you will either need to create kbmMW 2 RTC Transport classes in code (and connect them to RTC components), or make a package with a registration procedure (if you want to register the components to the Delphi component palette).

Best Regards,
Danijel Tkalcec
Logged
xalion
RTC Expired
*
Posts: 6


« Reply #1 on: January 04, 2013, 03:55:33 AM »

Great,it's really my want.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #2 on: January 04, 2013, 11:31:09 AM »

Click HERE to DOWNLOAD simple kbmMW Client and Server Demos modified to use kbmMW2RTC Transports.

NOTE: You will also need the kbmMW2RTC Transport units in the search path (link above), as well as the latest version of RTC SDK and kbmMW components installed in order to compile these Demos. The Server Demo uses SQLite, so make sure you enable it in your kbmMW config file.

Here is a short explanation for using kbmMW2RTC Transports ...

Server side:

1. Create an instance of a TkbmMW2rtcServerTransport component

2. If you are creating a new Server Project, or updating a kbmMW Server Project, you also need to create a TRtcHttpServer component and set at least the "ServerPort" property to the Port number you want to use for your Server. If you are adding kbmMW functionality to your existing RTC Server Project, you will use your existing TRtcHttpServer or TRtcISAPIServer component, or a TRtcDataServerLink (or TRtcDualDataServerLink) component to add kbmMW functionality to your existing RTC Server.

3. Assign the TRtcHttpServer component (or any other TRtcDataServer descendant) to the "RtcServer" property of the TkbmMW2rtcServerTransport, or ... if you are using TRtcDataServerLink or TRtcDualDataServerLink components, assign the appropriate RtcDataServerLink component to the "RtcServerLink" property instead.

4. Set the "RtcFileName" property to the URI which you want to use. This can be "/kbm", or anything else you want to use, but make sure it is NOT already used by a RtcServerModule or a RtcDataProvider inside the same RTC Server Application. If you are hosting more than one domain on your Server, you should also assign the "RtcHost" property to the domain through which you want your kbmMW Server code to be accessible. If you leave the "RtcHost" property empty, your kbmMW code will be acessible through all domains on the Server through the assigned "RtcFileName" URI.

5. This completes the RTC side of the transport setup. Now, all you need to do to connect the transport to your kbmMWServer, is assigning your TkbmMWServer component to the "Server" property of the TkbmMW2rtcServerTransport component. For instructions on setting up kbmMW components, please check kbmMW documentation.

Client side:

1. Create an instance of a TkbmMW2rtcClientTransport component

2. If you are creating a new Client Project, or updating a kbmMW Client Project, you also need to create a TRtcHttpClient component and set at least the "ServerAddr" and "ServerPort" properties to point to at the Server. Setting "AutoConnect" to TRUE will also help, so you don't need to call "Connect" manually. If you are adding kbmMW functionality to your existing RTC Client Project, you will simply use the existing TRtcHttpClient, TRtcDataClientink or TRtcDualDataClientLink component to add kbmMW functionality to your RTC Client.

3. Assign the TRtcHttpClient component (or any other TRtcDataClient descendant) to the "RtcClient" property of the TkbmMW2rtcClientTransport, or ... if you are using TRtcDataClientLink or TRtcDualDataClientLink components, assign the appropriate RtcDataClientLink component to the "RtcClientLink" property instead.

4. Set the "RtcFileName" property of the TkbmMW2rtcClientTransport component to the FileName (URI) where you've made your kbmMW Server code available. Unless you have compiled your Server into an ISAPI extension, this will be the same value as you have set up for the "RtcFileName" property on the Server in the TkbmMW2rtcServerTransport component. If you have compiled your kbmMW code into a RTC ISAPI extension, you also need to include the URI to the ISAPI on the Server in the "RtcFileName" property, just like you would for the "ModuleFileName" property on the TRtcClientModule component when accessing a TRtcServerModule running inside an ISAPI.

5. This completes the RTC Client transport setup for kbmMW. Now, all you need to do is connect that transport to your kbmMWClient components by assigning it to the "Transport" property of all your TkbmMWClient components. For instructions on setting up kbmMW components, please check kbmMW documentation.

Best Regards,
Danijel Tkalcec
Logged
xalion
RTC Expired
*
Posts: 6


« Reply #3 on: January 04, 2013, 02:19:02 PM »

yes, It works fine.
Logged
AndreFM
RTC Expired
*
Posts: 22


« Reply #4 on: January 03, 2014, 09:41:05 AM »

Hi,
Have someone already made any benchmark tests using normal kbmmw and kbmmw + RTC?
Thx
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: January 03, 2014, 10:47:20 AM »

I don't know of any benchmarks, but I wouldn't be surprised if someone said that kbmMW is working slower over RTC transports than over some binary transport, because RTC transports add an extra HTTP/S envelope to each kbmMW request and response.

Anyway ... if performance is very important to you, make sure to use RTC Client components with a blocking API (Blocking:=True, or UseProxy:=True, or UseWinHTTP:=True) and in single-threaded mode (MultiThreaded:=False), because kbmMW Client components are also blocking, so using asynchronous API would be somewhat slower, since blocking communication will then be emulated by using "WaitForCompletion".

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.025 seconds with 17 queries.