From ea0bedf5b5839f802f19e918c57b825f8b15a2cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20=C5=A0kr=C3=A1bal?= Date: Wed, 27 Jul 2005 11:54:16 +0000 Subject: [PATCH] More about using API --- org.glite.lb.proxy/doc/README | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/org.glite.lb.proxy/doc/README b/org.glite.lb.proxy/doc/README index 086b210..97ee74a 100644 --- a/org.glite.lb.proxy/doc/README +++ b/org.glite.lb.proxy/doc/README @@ -34,12 +34,35 @@ proxy (but they are still available on the LB server). >>A timeout should be set also, after which job should be purged from LB proxy. This has to be done by external purge client. << +Using API +========= LB proxy uses same API functions for consumer and producer as LB does except the function names are postfixed with 'Proxy'. I.e. edg_wll_SetLoggingJob() has its own LB proxy variant edg_wll_SetLoggingJobProxy(). +For LB proxy comunication are used two separated local unix sockets. One for +consumer other for producer API calls. Their values are set when the LB context +is initialized according to unix enironment variables EDG_WL_LBPROXY_STORE_SOCK +(producer API) and EDG_WL_LBPROXY_SERVE_SOCK (consumer API). If these variables +are not set, default values are used (producer: "/tmp/lb_proxy_store.sock", +consumer: "/tmp/lb_proxy_serve.sock"). After all you can overwrite them with +edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_STORE_SOCK, "path_to_store_socket"); +and +edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_SERVE_SOCK, "path_to_serve_socket"); + Other important difference is in edg_wll_SetLoggingJobProxy(), where it is not neccessary to give the sequence code parameter. If user do not specify it, LB proxy gets the actual one from its database. The 'user' attribute of this call should be the user certificate DN string. If not set, it is set from the unix environment by default. + +For example you could use: +char *user = "/O=CESNET/O=Masaryk University/CN=Jiri Skrabal"; +edg_wll_SetLoggingJobProxy(ctx, jobid, NULL, user, EDG_WLL_SEQ_NORMAL); + +Only very different LB Proxy call is the 'RegisterJob'. The current +implementation of RegisterJobProxy() talks both to the LB server +bypassing interlogger, and to the LB proxy at once. So for job +registration you should supply the user's credentials to the +context in the same way as it was done until now. The other proxy calls +don't need it. -- 1.8.2.3