Forum Discussion

patrickmamaid_1's avatar
patrickmamaid_1
Icon for Nimbostratus rankNimbostratus
Dec 29, 2008

A logon implementation for my application

Hey guys, so I've created my app and I can log in and everything, Force down, Enable pool members etc..

I would like to improve its login speed.

I have not really found a good way to test credentials against bigip other than

doing a pool list or similar, and then when it succeeds application state is now set to

LOGGED IN

but this is slow and would take up significant bandwidth if there would be more clients connecting

I need some suggestions..

I know my implementation is not the best:

  
    
  //an outside method invokes a call to init() when username&password is recieved from usr.  
 private boolean init() {  
   interfaces.initialize(S_BIGIPPROD_MIT, L_BIGIPPORT, username, password);  
   connected = checkLogin();  
   return connected;  
 }  
    
    
    
    
  //tests the login.. there should be a better way to do this..  
 public boolean checkLogin() {  
    
   //try and get the list of pool  
   LocalLBPoolPortType t = null;  
   try {  
      t = interfaces.getLocalLBPool();  
   } catch (Exception ex) {  
      connected = false;  
   }  
    
   if (t != null) {  
    
      String x[] = null;  
      try {  
         x = t.get_list();  
      }  
      catch (RemoteException ex) {//login faliure  
           connected = false;  
           return false;  
      } 
    }  
    connected = true;  
    return true;  
 }  
  

2 Replies

  • The get_version() method in each of the interfaces is probably the most light weight. It returns a string that is hard coded into the server software. You could also use the System.SystemInfo.get_uptime() which returns a integer but there is some processing that occurs to get this uptime so either one is probably equivalent.

     

     

    -Joe