Page 1 of 2 12 LastLast
Results 1 to 40 of 57

Thread: Multi-Process RPC Listener Host System for RC5

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Multi-Process RPC Listener Host System for RC5

    What is this?

    Short answer: A multi-process host system for vbRichClient5 RPC Listeners.

    Longer answer: Typically you have a single RC5 CRpcListener object instantiated in your server EXE, configured to run with mulitple listeners in a thread pool (e.g. an 8 listener handler thread pool in a single EXE). The new approach used here spawns multiple processes, each with a single listener handler thread pool.

    Why?

    There are some advantages to using multiple processes vs. multiple threads, such as:

    • Each process has access to a full 2GB of memory, which can be advantageous for high memory workloads (1 connection gets 2GB of memory if needed).

    • If a process crashes for any reason, at most 1 user connection will be affected. Crashed processes will be automatically respawned in short order, minimizing downtime.

    • Related to #2 - if you have a long-running RPC call that times-out, RC5 will terminate the listener handler thread, which can lead to problems. In a process model, we can unload/reload in this case to maintain overall system stability. TODO: I'm looking for a good way to detect when this happens so I can restart the appropriate listener host process (would appreciate some feedback from Olaf on this - maybe an event in CRpcListener could be raised?)

    • We can periodically unload/reload listener processes while leaving existing connections in other listener process unaffected. This can ensure that any bugs like memory leaks, unreleased locks, etc.. have minimal impact. Of course, it is critical to fix these bugs ASAP but sometimes availability is also critical while you hunt down a hard to squash bug. This is also useful for testing system resiliency by removing listeners periodically we can ensure our upstream client apps/reverse proxies are able to cleanly and quietly handle dead listeners by trying another port.


    What's the catch?

    There are some disadvantages to using multiple process vs. multiple threads, such as:

    • Processes use more memory than threads. Each Rc5RpcHost.exe takes about 20MB before any memory used by your app classes.

    • It can be difficult to manage startup, monitoring, and shutdown of multiple processes. I think I've handled this on your behalf though using Windows Job Objects and optional monitoring an outside App.ExeName & PID shutdown. All spawned Rc5RpcHost.exe processes should shutdown when required when the parent app closes, or when a /shutdown command is issued against a single Rc5RpcHost.exe process. The system also watches all spawned listener processes for crashes/unscheduled shutdown and will respawn as them as required.

      I've been running a slightly different version of Rc5RpcHost.exe in production for a few months and have 0% unscheduled downtime, so things are looking quite resilient. That said, there may be bugs that will need to be worked out and I am committed fixing them as they are reported to me.

    • Your RPC listeners will use 1 TCP/IP port per process (e.g. 32 listener processes will use 32 ports), whereas with the traditional thread pool approach you use a single port for multiple threads. This means you will have to either change you client app to randomly pick a port to connect to for each RPC call (e.g. pick a random number from 22222 to 22222+<# of listeners>-1) OR (my preferred method) configure a server like Nginx to stream connections it receives on a single port to one of your available backend RPC listeners. With the stream/reverse proxy approach you need only a single WAN facing open port and Nginx can bounce around backend ports to a free listener for your connecting client application. Needless to say, there's a bit more configuration work fo you to do here vs. the single process/multi-thread approach.


    Should I use it?

    I recommend you weigh the above pros and cons and decide if the multi-process approach is suitable for you.

    Getting Started

    1. Extract the source files from the archive located here: Rc5RpcHost.zip

    2. If you don't already have vbRichClient5 installed on your development system, download the files from vbrichclient.com and put them in the extracted Rc5RpcHost\bin\libs\ folder and register vbRichClient5.dll. If you already have vbRichClient5 installed on your development machine, copy vbRichClient5.dll, vb_cairo_sqlite.dll, and DirectCOM.dll to the extracted Rc5RpcHost\bin\libs\ folder but do NOT register them there.

    3. If you don't already have VbPcre2.dll & pcre2_16.dll installed on your development computer, download them from here to the extracted Rc5RpcHost\bin\libs\ folder and then register VbPcre2.dll. If you already have VbPcre2.dll and pcre2_16.dll installed on your development computer, copy those files from the installed location to the extracted Rc5RpcHost\bin\libs\ folder but do NOT register them.

    4. Open extracted Rc5RpcHost\Rc5RpcHost.vbp file and compile Rc5RpcHost.exe to the extracted Rc5RpcHost\bin\ folder.

    5. Copy your existing RPC DLLs to the extracted Rc5RpcHost\bin\libs\RPCDlls\ folder. If you don't already have any DLLs that you are using for RC5 RPC calls, then let me know and I can provide instructions on how to create a test DLL.

    6. When the above is complete your folder tree should look like this:


    Rc5RpcHost\
    Rc5RpcHost\<A bunch of VB6 source files>
    Rc5RpcHost\bin\
    Rc5RpcHost\bin\Rc5RpcHost.exe
    Rc5RpcHost\bin\libs\
    Rc5RpcHost\bin\libs\vbRichClient5.dll
    Rc5RpcHost\bin\libs\vb_cairo_sqlite.dll
    Rc5RpcHost\bin\libs\DirectCOM.dll
    Rc5RpcHost\bin\libs\VbPcre2.dll
    Rc5RpcHost\bin\libs\pcre2_16.dll
    Rc5RpcHost\bin\libs\RPCDlls\
    Rc5RpcHost\bin\libs\RPCDlls\YourRpcDll.dll

    Using Rc5RpcHost.exe

    Once the above steps have been performed, you can start the Rc5RpcHost.exe with the following required parameters:

    /start <NumberOfListenerProcessesToSpawn>
    - For example /start 5 will start one Rc5RpcHost.exe process in spawner/monitor mode and 5 Rc5RpcHost.exe process in listener mode.

    /host <IpAddress>
    - For example /host 127.0.0.1 will configure all listener processes to bind to address 127.0.0.1.

    /baseport <Port>
    - For example /baseport 22222 will configure all listener processes to bind to port 22222+offset. So for /start 5 /host 127.0.0.1 /baseport 22222, your will have 5 listener processes bound to 127.0.0.1:22222, 127.0.0.1:22223, 127.0.0.1:22224, 127.0.0.1:22225, 127.0.0.1:22226 (one process per IP : port).

    <optional> /parentproc <AppExeName:PID>
    - For example, /parentproc MyService.exe:12345 will tell the Rc5RpcHost.exe processes to monitor an application named MyService.exe with a PID of 12345 for shutdown. If MyService.exe PID 12345 ever closes, then all Rc5RpcHost.exe processes that are monitoring will also close. This is useful if you have a parent service that you want to tie your Rc5RpcHost.exe processes to.

    You can shutdown all of your Rc5RpcHost.exe processes at any time by using the /shutdown command line parameter.

    Once you've started your Rc5RpcHost.exe processes, they will behave just like your old single process RPC listener. This means your client applications can connect to and make RPC calls just like before using the vbRichClient5.CRpcConnection class & .RPC method.


    Hope some of you find this project useful, and Happy New Year to everyone at VBForums!
    Last edited by jpbro; Jan 9th, 2020 at 10:41 AM.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    In case you prefer a visual explanation of how the system can work (including how it can work alongside Nginx & VbFcgiHost.exe to serve web pages as well as RC5 RPC data for VB6 desktop applications), please see the image below. I hope the forum won't scale it down too badly.

    Name:  Rc5RpcHost and VbFcgiHost Network 7.jpg
Views: 1583
Size:  59.5 KB
    Last edited by jpbro; Dec 31st, 2019 at 01:24 PM. Reason: Improved network diagram

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Some Thoughts on Nginx and Rc5RpcHost

    The following notes are based on my real-world production setups. These are just notes based on my experience, and should not be taken as an endorsement or recommendation of an approach for any one else. I'm not going to get into extreme detail about any of the discussion points below, but I will be happy to elaborate on all specific points, so if you have any questions please feel free to post in this thread.

    First, you must decide where you want to host your server application. I've chosen to do this on third-party VPS systems with Linux as the OS. There a lot of VPS providers out there (including Windows VPS providers, though they tend to be a bit more expensive). Do your haomework and find one that has the best price/performance/feature set for you. Some important considerations:

    • Prioritize providers that use SSDs for storage. I did a few comparisons of SSD/non-SSD providers, and the non-SSD providers were noticeably slower. In particular I found there would be occassionally short periods of lag/freezing on the non-SSD hosts that I've never experienced on SSD hosts.

    • Look for providers with 1 gigabit (or higher) Ethernet. There are 10Gbps providers out there, but I'm not sure it's worth the additional cost unless you are moving a lot of data. I've been happy with a 1Gbps provider.

    • I recommend choosing a plan that offers multiple virtual CPU cores (or even dedicated cores for CPU-intensive workloads).

    • I highly recommend choosing a provider that offers fixed monthly fee plans. I'm not a fan of usage based pricing at all as it makes it difficult to determine what you should be charging your customers.

    • Choose a provider that has a datacenter located as close as possible to your users. Providers with multiple datacenters available world-wide are a plus!


    Once you've chosen a provider, install Linux on your VPS. I've been using the latest long-term support (LTS) version of Ubuntu, but there are lots of distributions available so you should do your own research. The only thing I recommend here is to choose a distribution with long-term support and one that you can confirm is compatible with Wine (Windows compatibility layer for Linux).

    Once your preferred Linux distribution is installed, install the latest versions of the following packages:

    • Nginx (Web server, reverse proxy, and load balancer)
      Nginx is available as a free open-source community edition, and a commercial edit. We'll be using the free open-source edition. More information about Nginx here: https://en.wikipedia.org/wiki/Nginx and https://nginx.org/en/

    • Wine (Windows compatibility layer for Linux)
      Wine is a Windows compatibility layer for Linux. Wine "prefixes" are like completely isolated Windows installs for which you can have many on a single system. Essentially you can have multiple Windows "computers" running on a single Linux installation - the number you can accommodate depends on your available system resources. For the purposes of this guide, just create a single Wine prefix. I used to recommend installing a 32-bit prefix, but I now recommend installing a 64-bit one since many Linux distributions are becoming 64-bit only. More information about Wine: https://en.wikipedia.org/wiki/Wine_(software) and https://www.winehq.org/

    • Xvfb (a virtual screen buffer)
      Xvfb is a virtual frame buffer for Linux. What the heck is that? Our server will be running headless (e.g. no monitor) but Wine expects to be able to display windows. Xvfb "pretends" to display Wine for us. More information: https://en.wikipedia.org/wiki/Xvfb and https://www.x.org/releases/X11R7.6/d...1/Xvfb.1.xhtml

    • Certbot (for SSL certificates - you'll need a domain name registered for this).
      Why pay for SLL certificates when you can get them for free from the Electronic Frontier Foundation (EFF)? More information about certbot and the EFF here: https://certbot.eff.org/ and https://www.eff.org/


    Once the above packages are installed, a Wine prefix is created, and you have an SSL certificate installed, you should install your server application with Rc5RpcHost.exe (and optionally VbFcgiHost.exe with your custom VbFcgiApp.dll).

    Since I prefer coding in VB6, I have written a small "launcher" application in VB6 that starts the Rc5RpcHost.exe and VbFcgiHost.exe with the appropriate command line parameters. I then created a Systemd startup script that launches this EXE with the appropriate Wine command line. This setup behaves similarly to a Windows service. You can see an example Systemd startup script here: https://blog.skbali.com/2019/03/star...using-systemd/

    I prefer to bind Rc5RpcHost.exe and VbFcgiHost.exe to ports on 127.0.0.1 to ensure they aren't listening to the outside world. Instead we'll configure Nginx to listen to the outside world and pass connections to our backend services. This approach has some advantages such as:

    • SSL connections for the web/VbFcgiHost.

    • Nginx can act as a load balancer by shuffling incoming connections around multiple Rc5RpcHost and VbFcgiHost processes (either in a round-robin or least-connected pattern. I use the least-connected pattern).


    Since we will have 2 types of traffic (RC5 RPC protocol traffic and HTTPS traffic) we will need to configure Nginx to route both kinds of traffic to our backend listeners. We will need to configure Nginx to know where to send both kinds of traffic.

    First we fill configure the RC5 protocol traffic using a "stream" block in /etc/nginx/nginx.conf. The following "stream" block will simply pass TCP/UDP traffic unmolested to a backend RC5 listeners (in Rc5RpcHost.exe). Assuming Rc5RpcHost.exe is listening on 127.0.0.1, ports 22222-22226 Nginx can be configured like this:

    Code:
    stream {
        upstream backendrc5 {
    		# List RC5 backend servers listening in Rc5RpcHost.exe processes
    
    		least_conn;  # use the "least connected" load balancing approach
    
            server 127.0.0.1:22222;
            server 127.0.0.1:22223;
            server 127.0.0.1:22224;
            server 127.0.0.1:22225;
            server 127.0.0.1:22226;
        }
    	
        server {
    		# Frontend listener
            listen 0.0.0.0:80; # Listen on all adapters port 80
            proxy_pass backendrc5;  # And pass all traffic to one of the upstream servers in "backendrc5" 
        }	
    }
    Now the first thing you may notice is that I'm using port 80 (standard HTTP port) for this. It's true that I'm being a bit naughty here by misusing port 80 for non-HTTP traffic, but I do this for a couple of reasons:

    • We'll be serving web traffic later on port 443 (HTTPS) and I only ever want to serve web traffic traffic encrypted so I won't ever be using port 80 for it's standard purpose (unencrypted HTTP).

    • In my experience, there are security appliances, firewalls, etc... that block can non-standard ports. Getting IT departments to open them up just for you can be a painful experience.

    • There are public WIFI hotspots that are highly locked down, sometimes only allowing traffic on port 80 & 443, and maybe 465, 110, 995, 143, 993 (POP, SMTP & IMAP ports). It's not unreasonable that your users might want to use your software at a cafe, so we need to accommodate this.


    To minimize headaches for you and your users, pumping RC5 traffic through port 80 is the only option that works reliably wherever they are connected.

    Ah, but you are quick as a whip - traffic on port 80 isn't encrypted you say! Well, that's true of HTTP traffic, but not necessarily true of RC5 traffic. A port is just a port and will take whatever we throw at it, so just make sure to include a RPCPublicKey.DH file, set the CRpcConnection.Encryption property to TRUE in your VB6 desktop apps and the data will be sent across the wire encrypted.

    At this point we've taken care of everything to get RC5 RPC data moving between your VB6 desktop apps wherever they happen to be running and your Rc5RpcHost.exes running on your VPS!

    For HTTPS/web traffic, we need to configure Nginx to pass traffic from WAN port 443 to our backend listeners hosted in VbFcgiHost.exe processes. Since the primary focus of this thread is Rc5RpcHost.exe, I'll leave that as an exercise to the reader (but I'll be happy to answer any questions you may have).
    Last edited by jpbro; Feb 7th, 2020 at 06:57 PM. Reason: Added implementation notes

  4. #4
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Hi jpbro, thank you for your outstanding work. After I finish my work, I'll test it carefully.

    There are very few materials and tools for web development with VB. Your exploration in this area is extremely creative and practical. Your vbFCGI is the only tool I use to interact with Nginx, just like vbRichClient is the only tool I use to interact with SqliteDB and Cairo. They are all irreplaceable to me. Thank you again, Happy New Year!

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Thank you for the kind words, and I'm glad you've found some of my work useful! Happy New Year to you too - though I guess it's a bit premature for Chinese New Year!

  6. #6
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Your work has been extremely useful to me, especially vbFCGI, which is a neglected diamond. I'm doing some local-machine development work, and once these are done, I need to deploy them to a Linux server, and then I need to use your excellent vbFCGI again.

    In China, we still treat January 1 as the New Year. The "Spring Festival" is a traditional festival of the Chinese people and another new year for the Chinese people.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by dreammanor View Post
    In China, we still treat January 1 as the New Year. The "Spring Festival" is a traditional festival of the Chinese people and another new year for the Chinese people.
    Ahh, excuse my ignorance! I've always heard of something called "Chinese New Year" here, but it must be a misconception (it's showing up as January 25th on my calendar even). So here's a right-on-time Happy New Year to you then!

    Quote Originally Posted by dreammanor View Post
    Your work has been extremely useful to me, especially vbFCGI, which is a neglected diamond. I'm doing some local-machine development work, and once these are done, I need to deploy them to a Linux server, and then I need to use your excellent vbFCGI again.
    It's nice to hear that my work has been useful to others. When I put these things out there, I never really know if anyone is using them at all, so I'm glad that you are! I'm working on some more detailed Linux & Nginx notes that I will be posting here soon, so you might want to keep your eye on this page over the next little while.

    All the best in 2020!

  8. #8
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by jpbro View Post
    Ahh, excuse my ignorance! I've always heard of something called "Chinese New Year" here, but it must be a misconception (it's showing up as January 25th on my calendar even). So here's a right-on-time Happy New Year to you then!
    January 1st is the New Year, and it's also a legal holiday in China, and the law stipulates a 1-day holiday. In order to celebrate the New Year, some companies, institutions, and schools always take three days off on holiday, but need to work or go to school on the following Saturday and Sunday.

    The Spring Festival is the most important holiday for Chinese people, and the law stipulates a 7-day holiday (because many people need to go back to their hometown hundreds or even thousands of kilometers away for the Spring Festival). However, most people always accumulate annual leave and take the annual holiday on the Spring Festival holiday, so that Chinese people can take 2-3 weeks holiday. The Spring Festival is the longest holiday for Chinese people.

    Quote Originally Posted by jpbro View Post
    It's nice to hear that my work has been useful to others. When I put these things out there, I never really know if anyone is using them at all, so I'm glad that you are! I'm working on some more detailed Linux & Nginx notes that I will be posting here soon, so you might want to keep your eye on this page over the next little while.

    All the best in 2020!
    OK, I'll keep watching and testing your Linux & Nginx projects.

    Wish you and your family good luck and good health forever.
    And bless everyone here
    Last edited by dreammanor; Dec 31st, 2019 at 05:30 AM.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by dreammanor View Post
    January 1st is the New Year, and it's also a legal holiday in China, and the law stipulates a 1-day holiday. In order to celebrate the New Year, some companies, institutions, and schools always take three days off on holiday, but need to work or go to school on the following Saturday and Sunday.

    The Spring Festival is the most important holiday for Chinese people, and the law stipulates a 7-day holiday (because many people need to go back to their hometown hundreds or even thousands of kilometers away for the Spring Festival). However, most people always accumulate annual leave and take the annual holiday on the Spring Festival holiday, so that Chinese people can take 2-3 weeks holiday. The Spring Festival is the longest holiday for Chinese people.
    Thanks for the education Looks like we erroneously call the Spring Festival "Chinese New Year" here - I guess because it is based on the lunar new year, and we don't really think of spring as starting until late-March/early-April in these northern climes. I'm always happy to be corrected though!

    The 7-day legal holiday sounds nice though! I think the longest we get is 2 days in a row here (for Christmas Day & Boxing Day) although many non-retail companies are closed or operating on skeleton crews for the week+ around Christmas and New Years Day. I suspect not much productive work gets done at most offices that aren't involved in retail from December 24-January 2.

    Quote Originally Posted by dreammanor View Post
    Wish you and your family good luck and good health forever.
    The very same to you and yours!

  10. #10
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by jpbro View Post
    Thanks for the education Looks like we erroneously call the Spring Festival "Chinese New Year" here - I guess because it is based on the lunar new year, and we don't really think of spring as starting until late-March/early-April in these northern climes. I'm always happy to be corrected though!

    The 7-day legal holiday sounds nice though! I think the longest we get is 2 days in a row here (for Christmas Day & Boxing Day) although many non-retail companies are closed or operating on skeleton crews for the week+ around Christmas and New Years Day. I suspect not much productive work gets done at most offices that aren't involved in retail from December 24-January 2.
    Sorry, I didn't explain clearly. The Spring Festival is the Chinese New Year(Lunar New Year), or it can also be understood that the Spring Festival begins on the first day of the Chinese/Lunar New Year and lasts for 15 days. China's rural areas still maintain the tradition that the Spring Festival must last 15 days. The last day of the Spring Festival is also called the Lantern Festival, and the entire Spring Festival is not over until the Lantern Festival is over.

    In cities, companies or government departments often need to start work on the 8th day of the Spring Festival( Chinese New Year), but company personnel can use annual leave to postpone the date of their starting work. Government personnel can work during the day and continue the Spring Festival with their families at night.

    In fact, the day before the Spring Festival (Chinese New Year's Eve) is the most important day for the Chinese. On this day, the whole family must reunite and have New Year's Eve dinner, give the elderly and children red envelopes, and then happily welcome the Lunar New Year. Many people who are far away from hometown always want to return to their hometown before New Year's Eve to reunite with their families. In ancient times, people sometimes needed to start their go-home journey one or two months in advance.

    Note:
    In the Chinese lunar calendar, spring is from lunar January 1 (the first day of the Lunar New Year, which is January 25, Gregorian calendar this year) to March 30 (that is, April 22, the Gregorian calendar this year).
    Last edited by dreammanor; Dec 31st, 2019 at 02:21 PM.

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    I think I've got it now, thanks!

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    I've added a bunch of notes based on my experiences hosting RC5 RPC servers to Post #3 above. I hope there's some useful information there, but I'll be happy to answer and questions should anyone have them.

  13. #13
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: Multi-Process RPC Listener Host System for RC5

    jbpro, it seems intersting.
    Is it possible for you to send me (by MP) a test project on your server?
    It could be usefull for me, but before setting up everything wich could take some time, I would like first to test the solution and also the speed
    Thanks (if possible)

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Hi Thierry,

    Thanks for your interest in the project

    I think what I will do is create a small demo client-server app and post the source code here for anyone to try. I'll setup a demo server on my end and you can connect to that for testing if you like. It might take me a few days though.

  15. #15
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: Multi-Process RPC Listener Host System for RC5

    Great & good idea.
    Thanks

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    FYI - THE DEMO SERVER HAS BEEN DECOMMISSIONED AS OF FEB 18, 2020

    OK a testable demo is now available.

    I decided to write a very small & simple client-server chat application for anyone to try out.

    Some important notes:

    • This application should be considered a proof of concept only! It is very lightly tested, and is missing robust error handling so it may blow up at any time.

    • This application is not intended to showcase best-practices for writing RC5 apps or chat apps, it's just a simple demo.

    • I've put the server stuff on a very inexpensive ($5/month) server. Performance seems OK in limited testing, but who knows how well it will scale with a lot of connections. I've only got 5 backend RPC hosts running right now, so let me know if things are slow for you.

    • It's possible that the service may go down from time to time too - I'll try to keep an eye on it in case it does, but I have a day job too

    • I'll try to poke my head in to the chat from time to time, but I'm not a big real-time chat person so don't expect me to stick around for long. Let's discuss the inner workings of the software, report bugs, etc... here at the VB forums instead.

    • The application has minimal security features - there's nothing stopping people from impersonating other people (no confirmation of identity), so don't trust anything you read here!

    • Please keep the conversations civil! There's no moderation, and if things start getting out of hand I'll take the demo server down.

    • I'm paying for the demo to stay online and I'll continue to do that for as long as I feel like it, but it will eventually disappear without warning. Try it now before it's gone!


    To get connected, you'll want to start with the sample chat client software, available here:

    DEMO CLIENT APP SOURCE CODE: DemoClientApp.zip

    Name:  RC5ChatClient.jpg
Views: 1205
Size:  26.3 KB

    You'll need the RC5 libraries in App.Path & "\libs" to use it compiled outside of the IDE.

    If you are running the client software inside the IDE, make sure to clear the "Use Developer Mode" option at startup.

    Enjoy!

    FYI - THE DEMO SERVER HAS BEEN DECOMMISSIONED AS OF FEB 18, 2020
    Last edited by jpbro; Feb 18th, 2020 at 09:37 AM. Reason: Added screenshot of client

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    And for those who want to examine the server-side code (or try setting up your own server), here's the source code:

    DemoServerApp.zip

  18. #18
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Very interesting, I tested it and it worked well. I'll do further testing. If there is any problem, I'll report it to you. Thank you, jpbro.

    In addition, I'm thinking about a question: Is it possible to use RC5 to make a chat system with tens of millions of users like WhatsApp? The Chinese population is too large. Even a medium-sized chat system needs to process huge amounts of data.

  19. #19
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: Multi-Process RPC Listener Host System for RC5

    I tried this morning quickly before going to a client, but I hadn't RC5 installed properly.
    But I took quickly a look to the sources.

    Some questions,
    - On the server side, it is a lunix with Wine installed?
    - Communication with the server is done in json?

  20. #20
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Did you test successfully on the local machine?

    In fact, you only need to run ChatClient.exe, you can connect to chatdemo.statslog.com, and type in chat information.
    Last edited by dreammanor; Jan 6th, 2020 at 03:44 AM.

  21. #21
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: Multi-Process RPC Listener Host System for RC5

    dreammanor, I had not time this morning, and came back quite late this evening, so I'll test it more tomorrow morning

  22. #22
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Multi-Process RPC Listener Host System for RC5

    Regarding the installation of RC5, my method is this:

    (1) In IDE mode, vbRichClient5.dll is similar to other Active dlls and requires registration. The specific method is as follows:
    Copy vbRichClient5.dll, vb_cairo_sqite.dll, DirectCOM.dll to a relatively fixed directory (it can be C:\Windows\System32 or C:\Windows\SysWOW64, or other directories, such as C:\RC5 )

    Then register regsvr32.exe C:\RC5\vbRichClient5.dll
    Then you can reference vbRichClient5.dll in VB6 IDE

    After the above steps are successful, you can open ChatClient.vbp and see if vbRichClient5.dll is successfully referenced.

    (2) In Bin mode, assuming your app path is: C:\RC5_Apps\DemoClientApp, you should establish the following path by hand:
    C:\RC5_Apps\DemoClientApp\bin
    C:\RC5_Apps\DemoClientApp\bin\libs

    Then copy vbRichClient5.dll, vb_cairo_sqite.dll, DirectCOM.dll to C:\RC5_Apps\DemoClientApp\bin\libs

    After completing the above work, you can open C:\RC5_Apps\DemoClientApp\ChatClient.vbp and compile ChatClient.exe to the directory C:\RC5_Apps\DemoClientApp\bin, and then run ChatClient.exe.


    (3) In Publishment mode, you only need to copy the entire directory C:\RC5_Apps\DemoClientApp (excluding source code) to the target machine. At this time, you do not need to register vbRichClient5.dll on the target machine. This is what Olaf said Regfree

    In fact, in Bin mode, it is already Regfree. At this time, ChatClient.exe calls C:\RC5_Apps\DemoClientApp\bin\libs\vbRichClient5.dll instead of C:\RC5\vbRichClient5.dll.

    Note:
    C:\RC5\vbRichClient5.dll is only for VB6-IDE.
    Last edited by dreammanor; Jan 6th, 2020 at 04:28 AM.

  23. #23

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by Thierry69 View Post
    I tried this morning quickly before going to a client, but I hadn't RC5 installed properly.
    But I took quickly a look to the sources.
    dreamanor posted some advice above for getting the RC5 libraries installed on your development box (and for how to distribute them without requiring registration) so that would be a good place to start.

    Quote Originally Posted by Thierry69 View Post
    - On the server side, it is a lunix with Wine installed?
    Yes, I've installed the demo server on Linux under Wine on a cheap $5/month VPS provider. You can of course use a Windows system for this too, I just find there's usually a premium to be paid for Windows VPS, so I generally use Linux for this.

    Quote Originally Posted by Thierry69 View Post
    - Communication with the server is done in json?

    So communication from client to server happens using the RC5 binary serialization method (the protocol is proprietary AFAIK). From the programmers perspective, you just call your server-side public class methods with the appropriate paremetters via the vbRichClient5.cRpcConnection.Rpc method. For example:

    Code:
    go_RpcCnn.Rpc "MyServerName.dll", "MyClassName", "MyMethodName", 30, "A string", 12345
    
    ' In the above code 30 is the timeout value in seconds for the call. If a response is not completed in that time, then an error will be raised in your client app
    For results returned to the client from the server, I've gone with JSON (although the JSON data returns to the client over the RC5 binary serialization protocol). This was just a choice I made - you can return Recordset, Collection, or PropertyBag byte content instead if you want. Shipping back JSON should make it easier to develop a web app counterpart though as you can dump it straight back to the browser and use it with your client-side Javascript.

    On the server-side I chose to use Sqlite for the database, but you can use any database engine you like. Basically you can use any non-UI VB6 code/libraries that you want on the server-side.

    Hope that helps.

  24. #24
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    very good job works very well.
    Might make an example of operating the dll server.


    Greetings

  25. #25

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by dreammanor View Post
    Very interesting, I tested it and it worked well. I'll do further testing. If there is any problem, I'll report it to you. Thank you, jpbro.
    Thank you

    Quote Originally Posted by dreammanor View Post
    In addition, I'm thinking about a question: Is it possible to use RC5 to make a chat system with tens of millions of users like WhatsApp? The Chinese population is too large. Even a medium-sized chat system needs to process huge amounts of data.
    I'm not going to pretend to be any where close to knowledgeable enough on chat software or massive scale app developement, so I can't really give you a good answer on this. I've also never used WhatsApp, so I'm not sure what kind of features it has (if it has Video streaming and stuff, then I don't even want to think of what would be required programming-wise).

    But let's assume it's just a text based chat program you are writing - with niceties like emojis, links, etc... but basically just text data going back and forth. We're just pumping bytes around, so I think it could be done in theory. That said you'd have to design a heck of a system in terms of things like:

    - How do you keep track of who's online?

    - How many back-end servers do you need? Where should they be geo-located?

    - How do you route a message that arrives on one server to a user that is connected to another server?

    - Do you hold messages that are sent to users that are offline? How much space will you need to store all of these?

    - At 10million+ users, even logging connections, messages, errors, etc... sounds daunting (to say the least).

    - Should there be PUSH notifications to users? I'm not sure that this is possible with RC5 (though Olaf could chime in if he has time), but right now I'm using a polling method that I don't think would scale too well. As mentioned, the chat app was just a simple app example to show how to communicate with a server and store/return data - it's not supposed to be an example of a "good" chat application, just a proof of concept.

    That's just stuff off the top of my head.

    I guess you could try stress-testing a private server by writing an app that will open a lot of connections and send messages to the server to see when it starts become unusable. Whatever # you get, divide it by 10 million and then see how many servers you would need.

    All that said, take the above with a grain of salt as I have no experience with apps anywhere near that scale.
    Last edited by jpbro; Jan 6th, 2020 at 12:52 PM.

  26. #26

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by yokesee View Post
    very good job works very well.
    Might make an example of operating the dll server.
    Thanks for trying it out, and glad you found it interesting.

    To set up your own server-side stuff, you should compile the Rc5RpcHost.exe from source in the first post, then compile the chat demo server code found in post #17.

    If you are setting up the server on Windows, you will want to copy the RC5 library files, VBPCRE2, Rc5RpcHost.exe, and ChatServer.dll files into a tree that looks like this:

    App.Path (Wherever you want to store your server app).
    App.Path\Rc5RpcHost.exe ' Compiled from source in the first post in this thread
    App.Path\libs\DirectCOM.dll ' Downloaded from vbrichclient.com
    App.Path\libs\pcre2_16.dll ' Downloaded from JPBRO/VBPRCE2 GitHub
    App.Path\libs\vb_cairo_sqlite.dll ' Downloaded from vbrichclient.com
    App.Path\libs\vbRichClient5.dll ' Downloaded from vbrichclient.com
    App.Path\libs\VbPcre2.dll ' Downloaded from JPBRO/VBPRCE2 GitHub
    App.Path\libs\RPCDlls\ChatServer.dll ' Compiled from source in post #17

    You'll then want to start Rc5RpcHost.exe from the command line (or from a helper Service that you will need to write). You will need to tell it how many RPC listeners to start, what IP address to listen to (e.g. 127.0.0.1), and what port to listen to (e.g. 22222). Each spawned listener will listen on the supplied port + the spawn index. So for example, to start 5 RPC listeners on 127.0.0.1 ports 22222 to 22226, you would use the following command line:

    Code:
    rc5rpchost.exe /start 5 /host 127.0.0.1 /baseport 22222
    Note that if you are using Linux/Wine, you should add the /linuxmode switch to your command line.

    You'll then want to download and configure Nginx to stream WAN IP: port 80 traffic to your backend Rc5RpcHost.exe ports as described in post #2.

    Once that is all done, your server should be up and running and the client application can be pointed to the IP address (or host name if you have one) that Nginx is listening on to use the server.
    Last edited by jpbro; Jan 6th, 2020 at 07:56 PM.

  27. #27
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    I have not had much time to test.
    but it does not work I have all the files.
    when I run the command in the cmd shows nothing, no process is not open

    great job
    Greetings

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Do you happen to have DbgView on your dev machine? If so can you run it (or download it then run it) and then try the following command line:

    Code:
    rc5rpchost.exe /start 5 /host 127.0.0.1 /baseport 22222
    Copy & paste the information from DbgView here and I'll try to figure out what's going wrong.

    Thanks!

  29. #29
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    Code:
    00000001	1:59:24	[6236] HDN_ITEMCHANGED 326	
    00000002	1:59:24	[6236] HDN_ITEMCHANGED 327	
    00000003	1:59:24	[6236] HDN_ITEMCHANGED 328	
    00000004	1:59:24	[6236] HDN_ITEMCHANGED 329	
    00000005	1:59:24	[6236] HDN_ITEMCHANGED 330	
    00000006	1:59:24	[6236] HDN_ITEMCHANGED 331	
    00000007	1:59:24	[6236] erster	
    00000008	1:59:27	[6236] HDN_ITEMCHANGED 332	
    00000009	1:59:27	[6236] HDN_ITEMCHANGED 333	
    00000010	1:59:27	[6236] HDN_ITEMCHANGED 334	
    00000011	1:59:27	[6236] HDN_ITEMCHANGED 335	
    00000012	1:59:27	[6236] HDN_ITEMCHANGED 336	
    00000013	1:59:27	[6236] HDN_ITEMCHANGED 337	
    00000014	1:59:28	[6236] erster	
    00000015	1:59:39	[6768] [UnknownSource] Processing command line: /start 5 /host 127.0.0.1 /baseport 22222	
    00000016	1:59:39	[6768] Initializing VBPCRE2.cPcre2	
    00000017	1:59:39	[6768] Loaded pcre2-16.dll. Handle: 1747320832	
    00000018	1:59:39	[6768] Initialized VBPCRE2.cPcre2	
    00000019	1:59:39	[6768] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000020	1:59:39	[6768] [UnknownSource] Initializing empty status array.	
    00000021	1:59:39	[6768] [LoadListenerProcesses] Detected 0 PID listener at port offset #0	
    00000022	1:59:39	[6768] [LoadListenerProcesses] Loading listener at port offset #0	
    00000023	1:59:39	[6768] [CStartup.LoadListenerProcesses] Process launched!	
    00000024	1:59:39	[6768] [LoadListenerProcesses] Detected 0 PID listener at port offset #1	
    00000025	1:59:39	[6768] [LoadListenerProcesses] Loading listener at port offset #1	
    00000026	1:59:39	[6768] [CStartup.LoadListenerProcesses] Process launched!	
    00000027	1:59:39	[6768] [LoadListenerProcesses] Detected 0 PID listener at port offset #2	
    00000028	1:59:39	[6768] [LoadListenerProcesses] Loading listener at port offset #2	
    00000029	1:59:39	[11564] [UnknownSource] Processing command line: /listen /host 127.0.0.1 /baseport 22222 /portoffset 0 /parentproc Rc5RpcHost.exe:6768	
    00000030	1:59:39	[6768] [CStartup.LoadListenerProcesses] Process launched!	
    00000031	1:59:39	[6768] [LoadListenerProcesses] Detected 0 PID listener at port offset #3	
    00000032	1:59:39	[6768] [LoadListenerProcesses] Loading listener at port offset #3	
    00000033	1:59:39	[11564] Initializing VBPCRE2.cPcre2	
    00000034	1:59:39	[11564] Loaded pcre2-16.dll. Handle: 1747320832	
    00000035	1:59:39	[11564] Initialized VBPCRE2.cPcre2	
    00000036	1:59:39	[11564] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000037	1:59:39	[9744] [UnknownSource] Processing command line: /listen /host 127.0.0.1 /baseport 22222 /portoffset 1 /parentproc Rc5RpcHost.exe:6768	
    00000038	1:59:39	[6768] [CStartup.LoadListenerProcesses] Process launched!	
    00000039	1:59:39	[6768] [LoadListenerProcesses] Detected 0 PID listener at port offset #4	
    00000040	1:59:39	[6768] [LoadListenerProcesses] Loading listener at port offset #4	
    00000041	1:59:39	[9744] Initializing VBPCRE2.cPcre2	
    00000042	1:59:39	[9744] Loaded pcre2-16.dll. Handle: 1747320832	
    00000043	1:59:39	[9744] Initialized VBPCRE2.cPcre2	
    00000044	1:59:39	[9744] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000045	1:59:39	[6768] [CStartup.LoadListenerProcesses] Process launched!	
    00000046	1:59:39	[6768] [UnknownSource] Time to load listener processes: 0,062	
    00000047	1:59:39	[6768] [UnknownSource] Listener at port offset #0 is not OK yet. Will test again.	
    00000048	1:59:39	[13288] [UnknownSource] Processing command line: /listen /host 127.0.0.1 /baseport 22222 /portoffset 2 /parentproc Rc5RpcHost.exe:6768	
    00000049	1:59:39	[1384] [UnknownSource] Processing command line: /listen /host 127.0.0.1 /baseport 22222 /portoffset 3 /parentproc Rc5RpcHost.exe:6768	
    00000050	1:59:39	[13288] Initializing VBPCRE2.cPcre2	
    00000051	1:59:39	[13288] Loaded pcre2-16.dll. Handle: 1747320832	
    00000052	1:59:39	[13288] Initialized VBPCRE2.cPcre2	
    00000053	1:59:39	[1384] Initializing VBPCRE2.cPcre2	
    00000054	1:59:39	[1384] Loaded pcre2-16.dll. Handle: 1747320832	
    00000055	1:59:39	[1384] Initialized VBPCRE2.cPcre2	
    00000056	1:59:39	[13288] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000057	1:59:39	[1384] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000058	1:59:39	[12912] [UnknownSource] Processing command line: /listen /host 127.0.0.1 /baseport 22222 /portoffset 4 /parentproc Rc5RpcHost.exe:6768	
    00000059	1:59:39	[12912] Initializing VBPCRE2.cPcre2	
    00000060	1:59:39	[12912] Loaded pcre2-16.dll. Handle: 1747320832	
    00000061	1:59:39	[12912] Initialized VBPCRE2.cPcre2	
    00000062	1:59:39	[12912] [modCmdLine.cmdlineIsValid] Command Line is OK :)	
    00000063	1:59:39	[6768] [Rc5RpcHost] La variable de tipo Object o la variable de bloque With no está establecida: Error #91, in 6YYB7Y3I4MI5F0E19REWJ45II, Line #670	
    00000064	1:59:39	[6768] [CStartup.Start] Error: 91 La variable de tipo Object o la variable de bloque With no está establecida 	
    00000065	1:59:39	[6768] IN: 6YYB7Y3I4MI5F0E19REWJ45II, Line #670 	
    00000066	1:59:39	[6768] Line #370	
    00000067	1:59:39	[6768] [Rc5RpcHost.6YYB7Y3I4MI5F0E19REWJ45II] La variable de tipo Object o la variable de bloque With no está establecida 	
    00000068	1:59:39	[6768] IN: 6YYB7Y3I4MI5F0E19REWJ45II, Line #670 	
    00000069	1:59:39	[6768] Line #370: Error #91, in 6C5DN4AYWBI4EGLN7U70TIKAB, Line #370	
    00000070	1:59:39	[6768] [Rc5RpcHost.6YYB7Y3I4MI5F0E19REWJ45II.6C5DN4AYWBI4EGLN7U70TIKAB] La variable de tipo Object o la variable de bloque With no está establecida 	
    00000071	1:59:39	[6768] IN: 6YYB7Y3I4MI5F0E19REWJ45II, Line #670 	
    00000072	1:59:39	[6768] Line #370 	
    00000073	1:59:39	[6768] IN: 6C5DN4AYWBI4EGLN7U70TIKAB, Line #370: Error #91, Line #30	
    00000074	1:59:39	[6768] [UnknownSource] Error at startup! 91 La variable de tipo Object o la variable de bloque With no está establecida 	
    00000075	1:59:39	[6768] IN: 6YYB7Y3I4MI5F0E19REWJ45II, Line #670 	
    00000076	1:59:39	[6768] Line #370 	
    00000077	1:59:39	[6768] IN: 6C5DN4AYWBI4EGLN7U70TIKAB, Line #370 	
    00000078	1:59:39	[6768] IN: Unknown Method, Line #30 	
    00000079	1:59:39	[6768] modStartup.Main, Line #150

  30. #30

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Thanks! I see there is an Error #91 occurring, so I'll have to figure out why (I'll probably have to do this tomorrow though).

    One question - can you know what version of vbRichClient5.dll you have in the App.Path\bin\ folder?

  31. #31
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    5.0.68, last update

    sorry for disturbing

  32. #32

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    It's no disturbance! I'm happy to learn of bugs so I can fix them, thanks for reporting the problem!

  33. #33

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    I see that Olaf may have fixed a bug in RC5 CArrayList.DeQueue method (where the error is occurring in Rc5RpcHost.exe). Can you try updating to the latest version at vbrichclient.com? It should be 5.0.72 (even though the page text hasn't been updated, the download will be the newer version).
    Last edited by jpbro; Jan 7th, 2020 at 10:33 AM.

  34. #34

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Hi yokesee, I've just been emailing with Olaf, and we think there's a good chance that updating to the latest version now available at vbrichclient.com will fix the issue. Please make sure to do the following:

    1. Replace the vbRichClient5.dll, DirectCOM.dll, and vb_cairo_sqlite.dll in the folder where you currently have it registered and re-register vbRichClient5.dll there.

    2. Replace those same files in the Rc5RpcHost.exe app.path\libs folder (but do NOT register vbRichClient5.dll there).

    3. Recompile Rc5RpcHost.exe and try running it from the command line with "/start 5 /host 127.0.0.1 /baseport 22222"


    If there are still any issues after performing the above steps, please let me know. Thanks!

  35. #35
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    I think if you have already solved, because if the 5 processes appear.
    but I can not connect from the client chat
    I put server address 127.0.0.1 or localhost or 127.0.0.1:22222
    but does not connect to the server.
    for testing in local mode must configure Nginx.

    greetings, very good work you and Olaf.
    sorry for my language

  36. #36

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Hi yokesee,

    Good news that the first part is solved since you are seeing the processes.

    Regarding not being able to connect from the client app - that's actually because it is hardwired to go to port 80 through Nginx (or other reverse proxy). I will update the client demo app so you can specify a port (e.g. 127.0.0.1:22222).

    I should also mention that you can demo the system in debug/development mode without using an actual network connection. This is useful for developing the application out quickly using the VB6 IDE. To do this, you would open the Client app .VBP file, then add the Server app .VBP file to create a project group. When you run the project group in the IDE you can step through code in the client & server app, use edit & continue, etc... just like when you are developing a non-networked vanilla VB6 app. Thought that might be useful information in case you've never tried that before with another RC5 project.

    Thanks again for testing it out!

  37. #37
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    127.0.0.1:22222 in the browser, is running RPCService
    edit the config file execute an Nginx.
    and now when I try to connect to the server from the chat,
    Error receipt ChatServer.dll in the call to CUsers.Knock ()

    If I work in RC5 but few things regfree some modules, but issues client and server is not an interesting topic and useful.

  38. #38

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    I've updated the demo client app in post #16 so it will accept custom port #s. For example, you can now connect to 127.0.0.1:22222 for testing (though you won't be testing the load balancing features of Nginx in this case, just a single connection to a single backend service). This means you won't need 5 listeners running, so you can use a command line like this instead:

    Code:
    rc5rpchost.exe /start 1 /host 127.0.0.1 /baseport 22222

  39. #39

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Multi-Process RPC Listener Host System for RC5

    Quote Originally Posted by yokesee View Post
    127.0.0.1:22222 in the browser, is running RPCService
    edit the config file execute an Nginx.
    and now when I try to connect to the server from the chat,
    Error receipt ChatServer.dll in the call to CUsers.Knock ()
    OK we are getting closer What is the exact error message & number you are seeing? Can you confirm that you've recompiled the ChatServer.dll and placed it in App.Path\libs\RPCDlls folder?

    Quote Originally Posted by yokesee View Post
    If I work in RC5 but few things regfree some modules, but issues client and server is not an interesting topic and useful.
    Sorry, I don't quite understand what you are saying/asking here. The demo does use regfree COM for instantiating all objects. As you get familiar with any new technology/approach there will be some growing pains and things that will need to be worked out. I know it's a bit painful at first, but it sounds like you're very close to having a working environment.

  40. #40
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    503

    Re: Multi-Process RPC Listener Host System for RC5

    thank you very much and works perfect.
    when I have more time, much more testing.
    great job

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width