[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [wsn] Use of WS-RF and WS-N for a simple use case I have
Prasad You can do exactly what you describe using WS-BaseNotification. In fact it is a good use case for the "implied resource pattern" about which there has been a lot of recent discussion. The implied resource pattern involves a single web service that fronts a number of "instances" or "resources". Each instance has a different End Point Reference (EPR). These EPRs all share a common address (the address of the fronting web service) but also contain an opaque element (or set of elements) that act as an identifier for the instance in question. The fronting web service can permit clients to subscribe to notifications from these underlying instances by supporting the message exchanges defined in the WS-BaseNotification's NotificationProducer interface. A client constructs a subscribe request in the usual fashion (i.e. as if there were only one resource) and sends it to the fronting service, but it inserts the identifier element(s) - called ReferenceProperties - from the EPR of the intended target resource into the (SOAP) header of the request message. This way a) Each instance has its own set of subscriptions, independent of the other instances that are managed by the same service (this is the function you are asking for) b) The instances are free to choose whatever format they like for their identifiers c) The body of the WS-BaseNotification subscribe request message does not have to contain an "instance identifier". It's because of c) that we call this the "implied resource pattern" (an explicit resource pattern would be one where the request body contained an explicit identifier). Separating the identifier from the request message body has two advantages i) It means we don't have to prescribe a particular element name or type for the identifier in the WS-BaseNotification spec ii) The message body looks the same whether the NoticationProducer is fronting multiple dynamic resources, or whether it only ever has one resource (the so-called Singleton resource pattern) In a similar fashion WS-ResourceProperties allows to query or set the properties of a given instance by inserting the identifier element(s) from the EPR into the header of the appropriate request message. Regards Peter Niblett Prasad Yendluri <pyendluri@webmet hods.com> To wsrf@lists.oasis-open.org, 13/07/2004 00:20 wsn@lists.oasis-open.org cc Subject [wsn] Use of WS-RF and WS-N for a simple use case I have Hi, My apologies for cross-posting here but, it seemed this question is relevant to both teams. I have a use case where the resources come into existence dynamically and terminate after sometime (e.g. like an instance of a class, a unix process etc.). I would like to host a Web service that would front these instances and permits clients to subscribe to notifications on the status of these instances. All instances share common property types including an "instance-id" type. However the number and actual instance-ids of these is not known in advance, and change with time. The Notifications should identify the instance-id of the entity the notification is for, and a list of properties (types) and their values. The clients also need to have the option to subscribe to notifications on a specific instance(s) by supplying their instance-ids (e.g. for long running ones) (based on previous call like getInstanceList()). Subscribing to Notifications via Topics does not seem to give me the granularity or of an instance-id type dynamism that I am looking for above. Is that correct or did I not understand certain aspect of WS-RF or WS-N that facilitates this? To utilize WS-RF and WS-N for my use case how would I go about defining the resource properties and the topics (and the associated messageTypes?). How do I specify an instance-id in my subscription? Thanks, Prasad
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]