Hi InoshP,

Before explaining the above scenario I'll explain the process of payload
generation when a request for new operation comes to the CDM core.

1. CDM Core bundle will detect its device platform using the operation code
2. Validate the operation against the supported device operations
3. Send the operation request to the device-platform bundle for converting
it to a *device-specific payload*
4. Put the converted payload into the *OUT* queue

We have two options when it comes to your scenario.
1. Create a new payload including the previous operation & new operation
2. Create another payload. So that 2 payloads will be stored in the *OUT *
queue.

IMO the best option would be 1, since the second option will consume more
memory in the queue & more bandwidth of the device because it has to take 2
payloads.
For supporting the option 1, we have the following options.

1. Device platform bundle will take the platform-specific payload in the
queue & merge it with the new operation
In this case, the overhead of the device platform bundle will be much
higher because it must know how to convert back the *platform-specific
payload* to the *platform-independent* form. This will make writing a new
device-platform bundle a tedious task because of the complexity of payload
transformation logic. So I'm -1 on this option.

2. We'll use a platform-independent format for saving the payload into the
queue which can be easily merged with new operations. This
platform-independent payload will be converted when the device contacts the
CDM server for pending operations.
This is much more easier method than the first option. But this will affect
the number of concurrent devices CDM can support due to the on-demand
conversion of payloads. On the other-hand this method will reduce the
resource consumption & avoid unnecessary payload transformations.
Further-more this will reduce the complexity of CDM core because there is
no need to get the payload corresponding to the operation from the
device-platform bundle & put it into the OUT queue.

3. Save the platform-independent payload format along with the
platform-specific payload in the queue.
This method will increase the resource consumption because we need more
memory to keep the platform-independent payload & platform-dependent
payload in the OUT queue. But this will increase the number of concurrent
devices CDM can support because the payload is readily available when the
device contacts the server.

I'm +1 for both 2nd and 3rd options. WDYT?

Thanks,

Best Regards,

Lakshitha Harshan
Software Engineer
Mobile: *+94724423048*
Email: hars...@wso2.com
Blog : http://harshanliyanage.blogspot.com/
*WSO2, Inc. :** wso2.com <http://wso2.com/>*
lean.enterprise.middleware.

On Mon, Nov 3, 2014 at 3:47 PM, Inosh Perera <ino...@wso2.com> wrote:

> Hi Harshan,
> If for example, a message to a device is already in the queue and when
> monitoring happen, a similar payload is generated. How is it handled when
> it comes to communication between out queue and device platform bundle?
>
> Regards,
> Inosh
>
> On Mon, Nov 3, 2014 at 3:20 PM, Harshan Liyanage <hars...@wso2.com> wrote:
>
>> Hi,
>>
>> Please find the attached proposed device operations flow of CDM. Your
>> suggestions & feedback is highly appreciated.
>>
>>
>> Thanks,
>>
>> Best Regards,
>>
>> Lakshitha Harshan
>> Software Engineer
>> Mobile: *+94724423048*
>> Email: hars...@wso2.com
>> Blog : http://harshanliyanage.blogspot.com/
>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>> lean.enterprise.middleware.
>>
>
>
>
> --
> Inosh Perera
> Software Engineer, WSO2 Inc.
> Tel: 0785293686
>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to