IIS and Web Servers
RemoteApp versus web services
Gravatar is a globally recognized avatar based on your email address. RemoteApp versus web services
  VFPJCOOK
  All
  Apr 26, 2022 @ 01:56pm

I am so frustrated. Been coding Foxpro since 2.6. Have gone from running the exe on a local server to running the exe locally on workstations with the data on a local server, to accessing the app via remoteapp on a cloud server. Why frustrated? I can't seem to get the terminology correct so that I can ask this question, but here goes:

I have a VFP/VFE 9.0 SP2 app running on about 20 cloud servers, one server per customer. My customers connect to their particular cloud server and run my app using a RemoteApp shortcut on their local workstation. App runs superfast because with this type of configuration, all the users are running my app ON THE SERVER and the database (native VFP database) is also on the server. If (and that's a big if), I understand it correctly, this configuration is like having multiple workstations (each with it's own OS) on the same physical machine as the server, so there is no moving data across any LAN/wire. That is what makes it fast.

These 20 cloud servers are virtual and all of them are in my domain. I also have a "FTP Server" in that domain. It's just another virtual server.

Many years ago Rick helped me develop a web service so that some of my customers vendors can post transactions in my app.

If I have a vendor that needs access to the data for my app running on cloud server ITF17, I setup the web service on ITF17. When the web service starts up, it knows how to get to that data which is of course also on ITF17. I am not sure but it sounds like when a vendor instantiates the web service it is conceptually like another workstation running on the server and because of that, it enjoys the same "not moving data across any LAN/wire".

I will not bother you with why but I have decided I can have a single instance on my web service running on my FTP Server as opposed to setting up the web service on each server that it is needed on. When the web service starts up, it can use something like the userid to determine which database on which cloud server it would access. From the FTP server, I can access the database used by ITF running on CFS17 via \\cfs17\itf\data\itf.dbc

If I did this, would I not be going back to the old way of doing things i.e. moving data across the LAN/wire? Does the fact they are virtual servers mean otherwise?

Thanks, John

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Rick Strahl
  VFPJCOOK
  Apr 26, 2022 @ 02:55pm

I'm not quite sure what you're asking, but I think the idea with the Web Service is that you are abstracting the remote user from the database. Rather than accessing the data directly (which you can't control), you're providing an API that you control to allow access to that same data in a curated way. You can add permissions, meter the connection, log and know what's going on, which is not possible if direct access is used.

How the server accesses the data is up to you and if you can get to the data over VPN network share, then that's one option you can use. Performance of that though likely will be terrible unless the data is on a local network share as the latency and the FoxPro ISASM engine works needs to access all of the data either whole or at least the indexes and data returned. For slow connections/VPN/Internet a SQL Server can provide much better performance because the data is processed near the data (ie the same server) and only the results are returned. With FoxPro your Web app processes the queries over the network meaning it has to pull all the data down (depending on your query efficiency) and process it locally to produce a result. Rushmore optimization can help here, but depending on the complexity of the queries it's hard to get that 100% right even in a semi-complex application.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  VFPJCOOK
  Rick Strahl
  Apr 27, 2022 @ 04:46am

Hi Rick and thank you for the quick response.

I believe you did answer my question. Getting to the data over a VPN network share will likely be slower even though the 2 servers (one that the web service would be running on and one that the native FoxPro database would reside on) involved are virtual and all in my domain. I don't understand exactly how virtual servers are physically connected to each other. I know enough to know they could be on the same physical machine but they may not be, or they may be today but they may not be tomorrow. I really don't have any understanding of the networking between virtual servers. That's probably a discussion to have with my cloud provider.

Even if I did understand how all these virtual cloud servers are connected, and even if the VPN network share is just pointing to a place inside the same physical machine, it would surely be difficult to test the speed differences.

I am not going to go down that path.

Just an FYI: I paid 140K to switch from the native VFP database to a MS SQL Server database and got absolutely nothing. All my views are as optimized as I know how to make them. I do understand SQL Server is the CORRECT thing to do, just not yet doable.

Thank you for the input, John

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Rick Strahl
  VFPJCOOK
  Apr 27, 2022 @ 03:51pm

Network connections are always slower than local connections, and the further out the connection (in terms of network hops) the slower it gets.

If you use a VPN over a local network you should have decent performance, but VPN by itself also adds overhead as it encrypts all traffic. So for most VPNs you lose at least half of your speed compared to a raw LAN connection.

Virtual servers - they have an IP Address and you connect to them as if they were a physical box. Over the network they expose these virtual IPs but clients just see them as real IPs. In reality these IP Addresses have to be mapped to a real IP that might be shared in some way, but that's handled by the VIP provider. As far as you're concerned you just see the IP address and that works the same as if the machine was a physical box with an Ethernet port.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Steve
  VFPJCOOK
  Apr 27, 2022 @ 05:35pm

Hi John,
Did I read that right? It cost you $140,000.00 to modify your VFP App so that it utilizes SQLServer as the backend? Is it now setup to use either backend with the same code base?

Thanks,
Steve

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  VFPJCOOK
  Rick Strahl
  Apr 28, 2022 @ 01:47am

Thank you kindly for that very helpful understanding. John

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  VFPJCOOK
  Steve
  Apr 28, 2022 @ 01:53am

You read the part about the cost being $140,000.00 correctly. The project never got finished. I have no SQLServer backend. Other than learning a little bit about what it would take to do that project, I have nothing to show for that money.

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Steve
  VFPJCOOK
  Apr 28, 2022 @ 06:46am

Wow, I know that must be extremely frustrating. I hate that for you.

Some years back, I converted my large VFP Desktop App to use either VFP or SQLServer as the backend. I tried to structure it in such a way that I could also switch to MySQL, DB2, Oracle, or whatever if I ever needed/wanted to. However, SQLServer has done a great job and usually SQLServer Express (the Free Version) does the job. I usually utilize the VFP Backend, but some clients need SQLServer, mainly when there are multiple locations that need to be linked together, or the database server needs to be remote for whatever reason. I will say that SQLServer does give you nice flexibility when it comes to how the app can be configured. Plus, it gives you a practically unlimited growth path.

I will also say, it was a lot of work. It took me like 5 years to complete the project. Granted, it was a side project and I was working a regular full-time job during the day. I'm glad I did it though. It's nice to say SQLServer is an option if the need arises. I completed the project based on the information contained in the book "Client/Server Applications with Visual Foxpro and SQLServer" (Hentzenwerke Publishing) as well as a fantastic white paper from FoxTalk: "Turn Your VFP App into Client Server - A 12 Step Program", by Jim Falino. I've been very pleased with the result. As a side benefit, since I use the same techniques to access the VFP Files (Local Views and Table Buffering), corruption to the VFP Data Files was reduced to almost never. Of course, when accessing SQLServer, I use Remote Views, but otherwise it's the same technique for both backends (SQL Statements).

Anyway, I would like to pick your brain a bit about the service and technique you use for hosting your VFP App. I can also provide a copy of the 12 Step Whitepaper if interested. Is there an email where I can contact you?

Thanks,
Steve

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  VFPJCOOK
  Steve
  Apr 28, 2022 @ 07:56am

Hi Steve. I stay so busy I seldom have the option of helping others but Yes, you can certainly email me anytime. jcook@correctionalfoodservices.com

I have the book of which you spoke. I was just looking at it yesterday. I don't believe I have come across that white paper but would certainly be interested in that.

Not sure when I will have time to make another stab at SQLServer back end but I'm always hopeful. Some of my customer sites have 15 years of data in their native VFP database. After 10 years some things can get pretty slow. Running the app over RDP has helped tremendously with both speed and no more data corruption. Basically the app runs about 5 times faster. Best way to measure that is: Let's say you have 10 users accessing your app from their workstations. And let's say you can run your app ON THE SERVER. I am sure you know how much faster it is for you to run the app on the server vs how fast it runs for your users. When all your users are running the app via RDP they all get the same speed as you get running the app from the server. Hope that makes sense, John

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Steve
  VFPJCOOK
  Apr 28, 2022 @ 08:56am

Thanks John! I was mainly wondering what hosting service you use and how much it cost? I have been running my VFP App in Terminal Services for 8 years now, so I've got that pretty well worked out. Not all clients run in this configuration, but some do. Wanted to check into the Remote App option.

I will email the whitepaper to you. The approach does require that you utilize a DBC, at least for the Views. You use two sets of Views, one for Local VFP, and one for Remote SQLServer. The Views are identical, other than where they get the data. So, as far as your VFP Forms are concerned, it doesn't know from where the views get the data, be it VFP or SQLServer.

Thanks,
Steve

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  VFPJCOOK
  Steve
  Apr 28, 2022 @ 09:49am

Steve, Per the views, I have my views in a separate database which gets compiled into the exe so it sounds like that would help.

Per the costs of RDP, when we first switched from local server at each customer site, the CSP charged us $35 per cloud userid per month. For some workstations which I call "generic" meaning multiple users can use the one workstation, that was only one cloud userid.

About a year ago we moved to more of a per server cost. We have 20 cloud servers. One of those is the domain controller and houses our Active Directory. I maintain the users. One of those houses our SFTP site. The others are for customers data, generally speaking 1 customer per cloud server. The CSP does nightly backups and image backups. They are responsible for disaster recovery. They take care of all things security. That includes Cylance. With regard to disaster recovery, we are supposed to be able to switch data centers from Atlanta to Philidelphia almost overnight.

Our bill last month was $5365.00 We are in the process of consolidating servers which means we are going to house multiple customers systems on the same server hopefully to get the number of servers housing customers systems down to 3 and overall reduce the costs to about 35% less than we pay today. Be aware that means those new servers will need more memory and HDD space but we will have better utilization of the resources overall.

If you need the CSP name, I can provide.

John

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  Steve
  VFPJCOOK
  Apr 28, 2022 @ 07:15pm

Thanks for the info John!

Steve

Gravatar is a globally recognized avatar based on your email address. re: RemoteApp versus web services
  FoxInCloud Support - Thierry N.
  VFPJCOOK
  Apr 29, 2022 @ 02:32pm

Hi John

FoxInCloud is an alternative to remoteApp and Web Service: it clones your GUI into a responsive HTML/CSS/JS layer that runs your extant VFP code on the server; if your VFP database(s) lies on the same machine(s), you incur no network penalty or security risk.

Of course FoxInCloud takes care of maintaining user's state across requests against several virtual servers (many to many).

© 1996-2022