Announcement

Collapse
No announcement yet.

addEntitlement()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • addEntitlement()

    Is there a way to use the addEntitlement() function against 2 different web sites in case 1 of the sites is down?

    I know that I could do this through the HTTP() function but for some reason the HTTP() function is flaky while the addEntitlement() appears to work okay - which seems odd because the HTTP() and addEntitlement() function you'd think would make the same underlying call to the web...

    In fact I'm still waiting for a reply to the difference between the addEntitlement() and HTTP() functions for some clues as to why one might work and the other not?


    Thanks!
    Standing on the shoulders of giants.

  • #2
    As far as I know the only way to do it would be using HTTP() since addEntitlement only supports one URL.

    Chris

    Comment


    • #3
      Solution...

      Yes you can do this, but you have to install your own version of a protection device for EFS. You'll also need multiple hosting accounts and a SYNCing ability...

      I've built this for one of my clients and he has it running on three servers (triple backup). If you want to try to do this, let me know..

      B
      Brad Matheny
      eSignal Solution Provider since 2000

      Comment


      • #4
        Thanks for the replies.

        Brad: Do you do it through the HTTP() function like Chris suggests or through a DLL?
        Standing on the shoulders of giants.

        Comment


        • #5
          Entitlement backup..

          No.. We did it with our own custom entitlement code (that runs on your server) and a utility that creates redundant backup of web sites.. Then, we built a "data syncing" solution so this customer could enter the user data into one server and it would be automatically copied/updated to the other servers..

          So, this client.
          A. Purchased my custom entitlement script
          B. Installed it on his main web server
          C. Then requested the redundancy (after his ISP has problems)

          Then, we..
          D. Installed the entitlement script onto another server
          E. Setup the initial redundancy solution and tested it.
          F. Built the data syncing solution.

          Lastly, he wanted another backup - so we built a third server just like the second.

          So, if it first server drops connection for more than 30 seconds, the second one kicks in. If that second server stops connections too, then the third server kicks in..

          Just so you know, all three servers are setup in vastly different geographical locations.

          This is the best way to do it, but there is a cost associated with this solution.
          Brad Matheny
          eSignal Solution Provider since 2000

          Comment


          • #6
            Wouldn't it be much simpler to use HTTP() and cycle through the 3 servers and look at each entitlement file and if any 1 of them gives a green light then auth the study?
            Standing on the shoulders of giants.

            Comment


            • #7
              Not really...

              This client had 4+ different product, maintained subscription clients and needed something that would not occupy all of his time messing with files and uploading to different servers.. He also ran a trading firm..

              So, for him, paying to have it mostly automated was no big deal..

              Doing it with HTTP is a viable solution, although, given his situation...

              a. he would have had to maintain 4 different user files on three different servers
              b. He would have had to upload the new information nearly every day (as he is actively promoting his tools)
              c. He also wanted a web site backup - which he would not have received with the HTTP only solution...

              When you get right down to it, if you have time to mess with servers and files - go for the HTTP solution. If you want to get it done and have it be mostly automated - then you will need a solution like I built for this client.

              It's up to you?? I figure he decided his time would be better spent building his business and working with his clients than messing with client enablement every day.

              B
              Brad Matheny
              eSignal Solution Provider since 2000

              Comment


              • #8
                I thought about that structure before for the maintenance of the auth files but when querying the auth files from an EFS script you essential cycle through 3 servers and query each file until you get an auth ACK otherwise you deny access to the EFS right? And the way that you do that is through HTTP() or by a call to a DLL which uses essentially the same underlying HTTP query code as the HTTP() function in EFS...?
                Standing on the shoulders of giants.

                Comment


                • #9
                  Solution...

                  In part - you are correct...

                  I've built my own custom server side enablement solution (you can check it out at www.efs-tools.com). It uses the same standard addEntitlement() function that the esignal solution uses. It just points to a new location and my custom solution does the rest..

                  The addEntitlement feature is designed to use HTTP to access the information, but it also links into the EFS script to enable/disable the activation of your EFS.

                  For Stand-alone-applications (like my MTS and MDVW applications), we've improved my enablement system to allow system ID specific applications. So, if I sold a product to you, it would default to 1 system ID. If you wanted to run the application on more than one PC, I could increase your #. Everytime you use the applications, it re-verifies your system ID.

                  But, rather than going through all of this with you - what are you trying to accomplish?? Are you in business or are you doing this as a hobby? The bottom line is you can try the HTTP, but I think it will be a pain in the neck for you..

                  B
                  Brad Matheny
                  eSignal Solution Provider since 2000

                  Comment


                  • #10
                    Re: Solution...

                    Originally posted by Doji3333
                    In part - you are correct...

                    ...It uses the same standard addEntitlement() function that the esignal solution uses. It just points to a new location and my custom solution does the rest...
                    So in the EFS you still call the addEntitlement() function which points to your server - this in turn queries the other 3 servers using a script on the server called by addEntitlement()?

                    There is an elegant and simple solution to this (IMO) using HTTP() in place of addEntitlement(). The reason that I'm quizzing what you're doing is that I have been having problems with the HTTP() function.

                    During my initialization code I made 1 call to addEntitlement() and 1 call to HTTP(). The addEntitlement() call obviously auths the EFS and the HTTP() call loads a handful of holiday dates. Both calls go out to a web server one after the other during the init of the EFS. Problem is that while the addEntitlement() call always succeeds in reaching the server the HTTP() call frequent fails to reach the same server.

                    So I've asked a couple of times on this forum what the difference is in the code behind the addEntitlement() and HTTP() functions but still haven't receive a response from eSignal.

                    That is why I am exploring different solutions and trying to understand why yours would be superior or simpler to use.
                    Standing on the shoulders of giants.

                    Comment


                    • #11
                      more info..

                      yeah, I know of that problem and when there is no solution in sight - find another solution that works (I think this is a RULE for programmers in some book somewhere)....

                      Here's the deal.. I use a single server (I actually have access to many)... I have many products (EFS). I was not real happy with using the fileshare to maintain lists of people and I was not happy with modifying my code with new expiration dates everytime I sold an application. Yeah, I was not happy and figured there had to be a better way..

                      So I contact one of my other programmers and asked about this problem... They played with the addEntitlement() routine in esignal and decided they could build a better solution using mysql and PHP. I told them of my needs and they build the initial proto-type (to handle multiple products and unlimited users)..

                      Then, I figured other people were experiencing the same problems I was, so I have my programmer build it into a "service" and added support for "Trial Subscriptions" and "multiple user accounts"... This became the initial release of the EFS-TOOLS solution..

                      Recently, because I've been developing more stand-alone applications, we built a routine in C-sharp and C to access the MENT Enablement product, but added "machine specific IDs"... This way, I can control who uses my applications on WHICH machines. So I can allow a user 1 machine or 100 (up to me).

                      The redundancy we built for my client was based on his needs and we used a "url switching service" to handle monitoring the URL availability. It was easier to use this utility than build our own. So, then we installed the entitlement application all three servers and built the data-syncing solution.

                      Now, I know this is alot of data, but without handing you the code - this is how I did it..

                      B
                      Brad Matheny
                      eSignal Solution Provider since 2000

                      Comment


                      • #12
                        Thanks for the info Brad.

                        I'm not looking for the code to do that on the web server - I already have it all - also in C#.

                        The flaw that I see in the way that you've implement the addEntitlement (if I've understood you correctly) is that the initial query goes to 1 server before the 3 redundant servers. If the initial server is not available then you can't get through to the other 3 anyway... right?

                        Assuming that's the case, I'm looking for a solution where the client machine queries multiple servers directly from the EFS. I don't want to add a DLL to the solution because that adds another thing to go wrong when the DLL is missing from the directory... but I will if I have to. It would be far easier to use HTTP() if I could rely on it.

                        Here is how I would implement it. This may give you some ideas:
                        1. During EFS init, open a file called authservers.txt
                        2. If authservers.txt is missing then create it and write to the file a list of default servers.
                        3. Check the date on the first line of the authserver.txt file, if more than (say) 1 week old then set flag A.
                        4. Query each auth server's auth file to see if this username is entitled.
                        5. As soon as entitlement confirmed break loop.
                        6. If flag A is set then continue loop of all auth servers and check for a list of updated auth servers.

                        So, here you have the EFS keeping a local copy of the list of auth servers and any auth server can have an updated list of other auth servers so that when you add or remove an auth server the client machines will automatically update themselves and won't go querying old (no longer in existence) servers.

                        One of the problems with this is the initial list of auth servers that's hard coded into the EFS. If all of them become out-dated then it won't work. So that is solved by using the checkVersion() function and allowing the EFS to update itself by checking its version number against a server. Problem here is that if you have a lot of EFS' then you have to change all of them so better to use the auto updating authserver.txt list.
                        Standing on the shoulders of giants.

                        Comment


                        • #13
                          solution..

                          "The flaw that I see in the way that you've implement the addEntitlement (if I've understood you correctly) is that the initial query goes to 1 server before the 3 redundant servers. If the initial server is not available then you can't get through to the other 3 anyway... right?"

                          Nope - that is what the URL switching utility is for. It monitors all of the servers and automatically switches to backup servers of any of the main servers fail.

                          So.. Imagine www.myserver1.com is the main server and myserver2 and 3 are the backup servers..

                          We've set it up so that if myserver1 fails, it switches automatically and goes to myserver2. If myserver2 fails, then off to #3. We could have as many servers as needed in this routine.

                          It's all automatic and there is no need to make multiple calls to HTTP or addEntitlement().

                          Assuming HTTP works for you, your solution should work. Why don't you give it a try and see how it goes..
                          Brad Matheny
                          eSignal Solution Provider since 2000

                          Comment


                          • #14
                            My problem is that HTTP() is too flaky at the moment.

                            Where is your URL switching utility? On the client computer?
                            Standing on the shoulders of giants.

                            Comment

                            Working...
                            X