thekid/rfc — Issue #62: RFC 0062: HA-JNDI
Author: thekid
Created: 2011-10-09 14:49:20+00:00
State: open

Scope of Change
====
The ability to pass a list of servers to the Remote API will be added.

Rationale
====
Load balancing and failover.

Functionality
====

Current
----
The suggested functionality can be implemented currently as follows:

```php
printStackTrace();
exit(1);
}

$home= &$remote->lookup('xp/demo/IteratorDemo');
?>
```

Proposed
----
The new functionality would make this transparent, so one would not have
to differ whether there are one or many remoting servers:

```php
printStackTrace();
exit(1);
}

$home= &$remote->lookup('xp/demo/IteratorDemo');
?>
```

Notes
----
* Initially, a random value is used to determine which one of the given
servers the connection should be made to. This is not real load-
balancing!

* If connecting to jboss01 fails, jboss02 will be used (the other way
around respectively).

Security considerations
====
n/a

Speed impact
====
- Minimalistic for round-robbing load balancing

Dependencies
====
n/a

Related documents
====
- http://unittests.xp-framework.net/?net.xp_framework.unittest.remote.RemoteTest
Unittest verifying new functionality

Comments
====
- friebe, Mon Jun 26 10:33:49 CEST 2006
More ideas using Remote::forName():

```php

```

- friebe, Mon Jun 26 11:19:24 CEST 2006
Maybe an extra flag could be added as follows:

```php

```
In this case, no random value would be used - rather, the connection would always
go to jboss01, and only if that fails, jboss02 would be used.

- friebe, Fri Jun 30 09:48:25 2006
Initial implementation comitted, needs further testing but should be
available soon.