[AG-DEV] SendEvent of SharedAppClient doesn't work

Christoph Willing c.willing at uq.edu.au
Sun Jul 6 19:49:42 CDT 2008


On 07/07/2008, at 10:19 AM, Florian Birnthaler wrote:

> Hi Chris,
>
> Thanks for the answer.
> So it is currently not possible to send lists or tuples to the event
> channel?

Florian,

Yes, I believe thats correct.


> But this must have been possible before, right? Because this is  
> used in
> some of the Access Grid tutorials.
>
> For example in the Shared PDF:
> self.sharedAppClient.SendEvent("changePage", (self.id, self.pageNr))
>
> I think this was for AG 2.4.


ZSI (the underlying framework which is "at fault" here) wasn't used  
until AG3, which is why the earlier AG2 code (including those  
tutorials) was able to use tuples etc.


> As a workaround I put the tuple together as a string with a
> separator-sequence between the different values and send that single
> string which will be split again after receiving.
> Is there hope that sending tuples or lists will be possible soon  
> again?


There is definitely that hope. Unfortunately it depends on upstream  
software (ZSI) which isn't under the AG developers' control. Perhaps  
there's an alternative to ZSI?


BTW, there is a "Townhall" style meeting every month; the Asia  
Pacific session is usually 11am (Auckland time) on the first Friday  
of the month. Its always run by one of the ANL team and although not  
specifically targeted at developers, the AP session often drifts in  
that direction. While you wouldn't want to wait a month for these  
meeting just to ask specific development questions, it would be a  
good forum to raise more general issues such as ZSI alternatives. I'd  
encourage you to attend if you can find the time.


chris



> -----Original Message-----
> From: Christoph Willing [mailto:c.willing at uq.edu.au]
> Sent: Friday, 4 July 2008 6:59 p.m.
> To: Florian Birnthaler
> Cc: ag-dev at mcs.anl.gov
> Subject: Re: [AG-DEV] SendEvent of SharedAppClient doesn't work
>
>
> On 04/07/2008, at 10:45 AM, Florian Birnthaler wrote:
>
>> Hello,
>>
>> I have a strange problem with the SendEvent-method of the
>> SharedAppClient.
>> If I send a string or a number it works without a problem. The
>> number/string is perfectly received by the method that I  
>> registered as
>> the event handler.
>> But if I send a tuple or a list I receive a dictionary with the keys
>> being some weird strings and their values being the elements of the
>> tuple/list.
>
>
> Florian,
>
>
> I'm pretty sure that ZSI can only deal with simple types so (for now
> at least) you'll have to break your dictionary (whatever) into simple
> types something like this (from __EnterVenue() in
> AccessGrid.VenueClient.py, which immediately follows a comment about
> this "feature" of zsi):
>     self.venueState = VenueState(uniqueId=state.uniqueId,
> name=state.name, description=state.description, uri
> =state.uri, connections=state.connections, clients=state.clients,
> data=state.data, eventLocation=evtLocation, tex
> tLocation=state.textLocation, dataLocation = state.dataLocation,
> applications=state.applications, services=state.
> services)
>
>
> chris
>
>
>> Here is an example of some debug messages:
>>
>> DEBUG: sending SetView event: ('testString1', 'testString2')
>> DEBUG: SetView event received: {'Eoa8a390': u'testString1',
>> 'Eoa8a3b8':
>> u'testString2'}
>>
>> I don't chance the events in any way, after I send them. There
>> seems to
>> be something wrong with the serialized data that is sent over to the
>> event channel. I used the Python debugger to get deeper into the
>> SendEvent-call and found out that this SOAP envelope was created:
>>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-
>> ENV:Header><
>> /SOAP-ENV:Header><SOAP-ENV:Body><Eo33f9a80
>> xmlns:ns1="http://www.accessgrid.org/v3.0"
>> xsi:type="ns1:EventDescription"><ns1:channelId
>> xsi:type="xsd:string">82664eb22bc448ef7711328383d23793</
>> ns1:channelId><n
>> s1:senderId
>> xsi:type="xsd:string">82664eb22bc44a6852b8726be95ce316</
>> ns1:senderId><ns
>> 1:data><Eoaa7f98 xsi:type="xsd:string">testString1</ 
>> Eoaa7f98><Eoaa7fc0
>> xsi:type="xsd:string">testString2</Eoaa7fc0></ns1:data><ns1:eventType
>> xsi:type="xsd:string">SetView</ns1:eventType></Eo33f9a80></SOAP-
>> ENV:Body
>>> </SOAP-ENV:Envelope>
>>
>> Here you can already see those strange numbers. But I don't know what
>> they mean or how to get rid of them. Because in my event handler
>> method
>> T just want to receive the original tuple or list. I searched for a
>> solution in the web, but unfortunately I didn't find anything.
>> Does someone have an idea how to fix this?
>>
>> Cheers,
>> Florian
>>
>
> Christoph Willing                        +617 3365 8350
> QCIF Access Grid Manager
> University of Queensland
>
>
>
>

Christoph Willing                        +617 3365 8350
QCIF Access Grid Manager
University of Queensland







More information about the ag-dev mailing list