[OTDev] API 1.1. extensions - Numeric and Nominal data type implemented

Nina Jeliazkova nina at acad.bg
Mon Feb 1 23:01:03 CET 2010


Hi Pantelis,

There is a standard Java class java.util.concurrent.ExecutorService ; it
could be configured to work as a pool of fixed or variable number of
threads.

There is a Restlet TaskService , which is wraps the ExecutorService.
I've found it behaved weird and switched to the standard Java class.

You might look at ambit code at

https://ambit.svn.sourceforge.net/svnroot/ambit/trunk/ambit2-all/ambit2-www/src/main/java/ambit2/rest/AmbitApplication.java
https://ambit.svn.sourceforge.net/svnroot/ambit/trunk/ambit2-all/ambit2-www/src/main/java/ambit2/rest/task

For each asynchronous task, it creates a Callable class, which returns
Reference. Each tasks has an unique identifier (UUID) and the set of
tasks is stored in a ConcurrentMap. There is a timer, which removes
completed tasks few hours after completion. 

Hope this helps,
Nina


chung wrote:
> Hi Nina,
>  I'm trying to make some improvements on the services so except for the
> migration from restlet2 m3 to m7 I was thinking of introducing some
> execution pool (e.g. an ExecutorService or -why not- something
> 'homemade') and establish a queue for the incoming requests (especially
> those characterized as time-consuming and memory-consuming ones). This
> way I will be able to manage all running tasks on the server and make
> some performance improvements I hope. Is there some standard way of
> doing this? Could you suggest some executor or some utility to manage
> the running threads and do you know if there is some way to specify the
> maximum number of running threads for Restlet?
>
> Best Regards,
> Pantelis
>
>
> On Tue, 2010-01-26 at 14:21 +0200, Nina Jeliazkova wrote:
>   
>> Hello All,
>>
>> Following the data type discussions and proposal earlier this month, now
>> support for NumericFeature and NominalFeature are implemented in IDEA
>> services.
>>
>> Please note all features are explicitly declared to be subclass of
>> ot:Feature as well. While this is redundant and can be derived from the
>> ontology with a help of a reasoner, it does make the client
>> implementation somewhat easier.
>>
>> Examples from CPDBAS dataset at 
>> http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/9
>>
>> <http://ambit.uni-plovdiv.bg:8080/ambit2/feature/12122>
>>       a       ot:Feature , ot:NominalFeature ;
>>       dc:identifier
>> "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/12122"^^xsd:anyURI ;
>>       dc:title "ActivityOutcome_CPDBAS_SingleCellCall" ;
>>       ot:acceptValue "inactive" , "active" ;
>>       ot:hasSource
>> <http://ambit.uni-plovdiv.bg:8080/ambit2/reference/11847> ;
>>       ot:units "" ;
>>       =       ot:ActivityOutcome_CPDBAS_SingleCellCall .
>>
>>
>> <http://ambit.uni-plovdiv.bg:8080/ambit2/feature/12124>
>>       a       ot:Feature , ot:NumericFeature ;
>>       dc:identifier
>> "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/12124"^^xsd:anyURI ;
>>       dc:title "STRUCTURE_MolecularWeight" ;
>>       ot:hasSource
>> <http://ambit.uni-plovdiv.bg:8080/ambit2/reference/11847> ;
>>       ot:units "" ;
>>       =       ot:STRUCTURE_MolecularWeight .
>>
>>
>> Bug reports are of course welcome at the usual place
>>
>> http://sourceforge.net/tracker/?group_id=191756
>>
>> Best regards,
>> Nina
>>     
>>>   
>>>       
>>>>     
>>>>         
>>> 1) Feature data types:
>>> Proposal (based on Pantelis suggestions and Protege guide) at
>>> http://opentox.org/data/documents/development/RDF%20files/Datatypes.
>>> Updated opentox.owl at
>>> http://opentox.org/data/documents/development/RDF%20files/OpenToxOntology/view
>>>
>>>   
>>>       
>> _______________________________________________
>> Development mailing list
>> Development at opentox.org
>> http://www.opentox.org/mailman/listinfo/development
>>
>>     
>
>
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
>   




More information about the Development mailing list