IDK PRC Remote API Development Tips
These development tips apply to any application that uses
the PRC.
- You must configure ALI or Ensemble to send a login token to
any pagelet that uses the PRC. In ALI, the login token option
is on the Advanced Settings page of the Web Service editor. In Ensemble,
this option is on the CSP tab in Resource configuration.
- Perform expensive processing outside the interface method,
in a separate thread, or use back-end caching such that the interface
method can respond in a timely fashion. For example, an Active
Directory Authentication Source Identity Service might employ user
signatures to minimize reads/writes from the AD database during remote
calls like IProfileProvider.attachToUser. The IDK
PRC manager interfaces generally make remote calls. PRC object interfaces
are normally local accessors/mutators and do not make remote calls
(with the exception of store methods). Avoid unnecessary, repeated
use of manager interface methods and maximize your application’s use
of PRC object methods. Avoid looping remote calls wherever possible.
Maintaining local copies of PRC objects can improve your application’s
performance but be aware that your local state may not match the server
state if another application modifies server state after you receive
your local copy. For example, a portlet using PRC Collaboration to
display the current user’s personal Collaboration project area corresponding
to “Username-Project” ensures that IProjectManager.queryProjects is used once. The resulting IProject object can
be cached by the portlet per user session rather than performing a
query on every portlet refresh. The user’s project is never deleted,
so the local caching is “safe.”