airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Gunathilake <glah...@gmail.com>
Subject Re: How to add a new Jobsubmission
Date Thu, 07 Aug 2014 01:54:22 GMT
Hi Saminda,

Thanks Saminda for the response.

I think thrift is not really meant to do these kind of things (supporting
crud operations and exposing a data-structure as a service). Using thrift
for everything is more important for us and allowing multiple languages is
more important then we have to stick to these limitations and live with it.


Lahiru

On Wed, Aug 6, 2014 at 12:29 AM, Saminda Wijeratne <samindaw@gmail.com>
wrote:

> Hi Lahiru,
>
> I understand your pain. You guessed it correct. All these inconveniences
> are due to limitations in thrift where it doesn't support inheritance and
> polymorphism. We'd be glad for a better approach which thrift would also
> support. :)
>
>

>
> On Tue, Aug 5, 2014 at 12:32 AM, Lahiru Gunathilake <glahiru@gmail.com>
> wrote:
>
>> Hi All,
>>
>> Please bear with me for my less knowledge about thrift, I have following
>> questions about thrift models  in app-catalog when I tried to add a new
>> jobSubmission to computeResourceModel.
>>
>> We have few JobSubmissionProtocols and I wanted to add a new protocol. I
>> am not sure why we have defined each struct separate, why can't we have
>> inheritance(my guess is thrift doesn't support).
>>
>> When I added the new type I realized I have to add a new method in
>> Airavata.java to store that new type. Each Job Submission protocol has to
>> be saved first and have to implement a new method to add  that. For me this
>> seems little odd. We have methods
>> like addSSHJobSubmissionDetails, addLocalSubmissionDetails. This is a very
>> big change because I have to again add a new method to Airavata thrift
>> service and add an implementation to AiravataServerHandler. When I look in
>> to these objects they cannot be re-used among compute resources because
>> they have very much machine specific details like(ssh port etc), so a
>> single SSHJobSubmission object shouldn't be shared among different hosts,
>> in that case why do we have to save them separate and get an ID and set
>> that ID to computing resource.
>>
>> And there is another class ComputeResourceImpl and it has the same set of
>> methods to add each and every object then I have to add another method to
>> that and invoke that in the AiravataServerHandler.java. Can someone please
>> tell me why do we have to invoke registry 4 times to save a
>> computingResource, why can't I just set everything to the computing
>> Resource and save with a single operation ? What are the reasons we have
>> operations to save each atomic things in computingResources and give
>> computingResourceId for each component.
>>
>> For all these questions, the only answer is that thrift doesn't support
>> inheritance,then I do understand... otherwise we can improve it. As a CPI
>> user I feels this is too complex and very difficult to develop and modify a
>> single thing in CPI I have to change so many places.
>>
>> Regards
>> Lahiru
>> --
>> System Analyst Programmer
>> PTI Lab
>> Indiana University
>>
>
>


-- 
System Analyst Programmer
PTI Lab
Indiana University

Mime
View raw message