Independent of the member-member or member-client communications, the method writePortable() of the classes that implement Portable should be consistent. This means, the fields listed under the method writePortable() should be in the same order for all involved members and/or clients.

Let's consider the following Employee class:

class Employee implements Portable {
    private String name;
    private int age;

    public Employee() {

    public Employee(int age, String name) {
        this.age = age; = name;

    public int getFactoryId() {
        return 666;

    public int getClassId() {
        return 2;

    public void writePortable(PortableWriter writer) throws IOException { 
        writer.writeUTF("n", name);
        writer.writeInt("a", age);

    public void readPortable(PortableReader reader) throws IOException {
        name = reader.readUTF("n");
        age = reader.readInt("a");

    public int getAge() {
        return age;

As you see in the above example, first the name and then the age is written. This order should be preserved in other members or clients.