[Clas12_software] bos2evio as a clara service.

gurjyan at jlab.org gurjyan at jlab.org
Fri Nov 4 17:13:52 EDT 2011


Hi Sebastian, the current version of the clara defines a service such that it has only one execute service method, i.e. single algorithm. You are right if we configure algorithm we fix the service functionality. The suggestion of 2.3.1 is to clone or run multiple services in a container. The new version, that I am planning to release before Christmas will allow named inputs and outputs, meaning that services will have different algorithms (execute-methods) for different named inputs. -vardan  
Sent on the Sprint® Now Network from my BlackBerry®

-----Original Message-----
From: Sebastián Mancilla <smancill at jlab.org>
Date: Fri, 4 Nov 2011 16:42:08 
To: Vardan Gyurjyan<gurjyan at jlab.org>
Cc: Johann Goetz<jgoetz at ucla.edu>; Gagik Gavalian<gavalian at jlab.org>; Dennis Weygand<weygand at jlab.org>; <clas12_software at jlab.org>; BMK Nefkens<bmknefkens at gmail.com>
Subject: Re: bos2evio as a clara service.

Hi

I have a design question about these kind of "feeder" services that read
files and return events.

I understand that the idea of CLARA is to deploy the services in containers
(in a node), and everyone can request the service, in any time, i.e, the
service can be requested by multiple users in parallel, and those
executions do not interfere with each other.

But when a service is configured to read an specific input file (like this
one or the EventService.java), the capacity to support multiple users in
parallel is lost, because the service is locked to read a certain file, and
other users who want to read different files cannot do it without
reconfiguring the service (and interfering with the current user).

How should this situations be handled? If another user needs to use the
service to get the events that he wants, he has to deploy it in a different
container? Or the CLARA CService interface will be updated to know the ID
of the user requesting a service (and therefore a service will be able to
handle parallel configurations for several users)?


Best regards

On Fri, Nov 4, 2011 at 2:17 PM, Vardan Gyurjyan <gurjyan at jlab.org> wrote:

> Hi Johann,
> How you envision implementing 1-a and 2-a functionalities?
> My suggestion would be using service-configure mechanism of the framework.
> What you think?
> -vardan
>
> Johann Goetz wrote:
>
>> Hi guys,
>> I have converted the bos2evio program to a CLARA service. It currently
>> uses a mixture of the old and new CLARA libraries. I tagged it as version
>> 1.1 of the bos2evio project on the repository. It ships with all
>> dependencies except SCons and gcc. It compiles fine but may not work too
>> well (read: proven correct, but untested).
>>
>> After some discussion with myself, Gagik and Vardan, the future plans for
>> this program/service are:
>>    1) ship bank definitions in XML with EVIO buffer
>>        a) requester can ask not to receive bank definitions
>>        b) requester should be able to compare bank definitions XML string
>> with md5sum or similar to see if he needs to re-parse the XML
>>    2) ship more than one event
>>        a) requester should be able to specify number of events or maximum
>> size for buffer
>>    3) configuration to tell it which bos files to read
>>
>> This program is very much NOT thread-safe because of the bosio library
>> underneath. I am not sure what to do about that.
>>
>> checkout and compiling should be straightforward. The last command uses
>> the newer SCons in the CUE in /apps and  "-j16" tells scons to parallelize
>> the build to 16 threads:
>>
>> svn co https://clas12svn.jlab.org/**repos/clas12/bos2evio/tags/**
>> bos2evio_1.1<https://clas12svn.jlab.org/repos/clas12/bos2evio/tags/bos2evio_1.1>bos2evio
>> cd bos2evio
>> /apps/scons/bin/scons -j16
>> build/bin/bos2evio-service -h
>>
>> Generic options:
>>  -h [ --help ]                         produce help message.
>>  -q [ --quiet ]                        quiet mode.
>>  -v [ --verbose ]                      verbose mode.
>>  -b [ --bankdefs ] arg (=/u/home/clasg12/test/**
>> bos2evio/external/bankdefs)
>>                                        directory containing bank
>> definition
>>                                        XML files.
>>
>> CLARA Options:
>>  --clara-host arg (=localhost)     The name of the CLARA host.
>>  --clara-name arg (=ClaraPlatform) The name of the CLARA platform.
>>
>> CLARA service name: BOS to EVIO Service
>> author: Johann Goetz
>> version: 0.1
>>
>> This service reads in BOS files and waits for input of type
>> string with value of "next" and returns a single event
>> converted into the EVIO format. The EVIO buffer is prepended
>> with a 32bit unsigned int of value 0x12345678 which can be
>> used to determine if swapping is neccessary.
>>
>> --
>> Johann T. Goetz, PhD. <http://sites.google.com/site/**theodoregoetz/<http://sites.google.com/site/theodoregoetz/>
>> >
>> jgoetz at ucla.edu <mailto:jgoetz at ucla.edu>
>>
>> Nefkens Group, UCLA Dept. of Physics & Astronomy
>> Hall-B, Jefferson Lab, Newport News, VA
>> Office: 757-269-5465 <tel:757-269-5465> (CEBAF Center F-335)
>> Mobile: 757-768-9999 <tel:757-768-9999>
>>
>>
>


-- 
Sebastian Mancilla Matta
Est. Ingenieria Civil Informatica UTFSM
Valparaiso - Chile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/clas12_software/attachments/20111104/44d3496b/attachment-0002.html>


More information about the Clas12_software mailing list