Hi,
>> Right, having limited logic at the client side will be the good choice.
>> The intention why i proposed the second solution is if you have any variables
that are declared globally (i meant the usual 'global' property of OOPS concept)
which are exposed in the functions and are used by multiple clients at the same
time. Any kind a variables that you are using at the server side code which are
shared across the clients during simultaneous calls. Taking you example, you have
to make a remote call to a database or something else. Is your remote call or
database is capable of managing simultaneous calls? If so, then for your case the
1st solution suits. Like you have mentioned, keeping the huge number of clients
on hold will not suit your case.
FMS maintains a unique ID for every client connected to the server which is
called 'clientID'. This value might not be unique across the clients connected to
different fmsCore processes, but it is definitely unique for clients within a
core process. SO using this ID you are sure you can find the right client.
Now back to the first solution... let us take simple example of 3 clients
connecting to the server simultaneously... how do they process the server side
code.
application.onConnect = function(clientObject){
clientObject.method_1(){
//clientObject.method_2();
}
clientObject.method_2(){
//clientObject.method_2();
//so on
}
clientObject.method_1();
application.acceptConnection(clientObject);
//or application.rejectConnection(clientObject);
}
}
All the 3 clients are connecting to the server at the same time. They all call
onConnect method with reference to their client objects. So the method_1,
method_2 which are defined at the server side is instantiated for all the 3
clients. SO they have their own methods to works with. So inside these methods,
if we have statements that make remote calls, all the 3 clients will make the
remote calls simultaneously. SO your database should be able to handle multiple
clients simultaneously. If so, then this approach will suit your case. So any
operation that we perform will be on client Object, hence that makes the
difference in interacting the FMS server with its right client.
Where did you get secure.asc file from? I am not sure about such a file in fms. Was it installed along with FMS or it is your custome asc file for your application?
Regards,
Janaki L