public static void main(String[] args) {
		System.setSecurityManager(new SecurityManager());
		
		try {
			server = new Server();
			server.is_secondary();
			server.connect_db();
			server.connect();
			System.out.println(db.getUsers().toString());
			System.out.println(db.getFriendships().toString());

			
			
			while(true) {
				if(server.getBackupServer() != null) {
					try {
						server.getBackupServer().ping();
					} catch(Exception ex) {
						System.out.println("backupServer not responding!");
						server.resetBackupServer();
					}
				}
				else {
					try {
						server.connectBackupServer();
						server.getBackupServer().ping();
						if(server.initRequested)
							server.initBackupServer();
					} catch(Exception ex) {
						System.out.println("no backupServer found");
						server.resetBackupServer();
					}
				}
				
				System.out.println("Users registered: " + Arrays.toString(server._userStore.keySet().toArray(new String[0])));
				Thread.sleep(2000);
			}
			
		} catch(Exception ex) {
			System.out.println(ex.getMessage());
		}
		
	}