True that Imesh, for scenarios with heavy traffic.

Initially what we had was an implementation based on MQTT (via ActiveMQ).
Some concerns with that was the amount of dynamic memory available in the
Arduino which is a max of 2MB. So with a publisher to send messages to the
queue and a subscriber to receive it took quiet a lot of space. Moreover,
anything even close to 1.5MBs causes glitches and resets when run.
We will have an MQTT based implementation after refining the code to stay
within an acceptable amount of memory usage.

However, the HTTP based implementation was done as a POC to indicate our
support for HTTP. We are in the process of moving to XMPP as the accepted
transport protocol since we learnt that HTTP is IP-bound. This beats the
purpose of remotely communicating with devices in different IP networks. We
only learnt it in the process of continuous workshops some of which were
setup outside the WSO2-Network.

Moving to XMPP, overcomes this limitation with a central server handling
the accounts related to each of its connected devices.


Thanks Very Much.

-------------------------------------
*Shabir Mohamed*
*Software Engineer*
WSO2 Inc.; http://wso2.com
Email: [email protected] <[email protected]>
Mobile: +94 77 3516019 | +94 71 6583393

On Thu, Aug 20, 2015 at 9:26 AM, Imesh Gunaratne <[email protected]> wrote:

> It might be better to use a message broker with MQTT to receive messages
> instead of running a HTTP server. Since Arduino is single threaded running
> a HTTP server in it might cause problems.
>
> On Tue, Aug 4, 2015 at 6:19 PM, Shabir Mohamed <[email protected]> wrote:
>
>> Hi,
>>
>> I've written an Arduino Agent to connect and push device data
>> (Temperature, Bulb Stats and etc) to our IoT platform. You can find the
>> code at [1]
>>
>> The Agent connects to the internet via a wifi-shield mounted on top of
>> it. A similar version of the same has been written for ethernet-sheilds as
>> well [2].
>>
>> The agent basically has two components:
>>
>> *     1. PushClient*
>> *     2. HttpServer*
>>
>> The *PushClient* connects to our IoTPlatform and pushes device data at
>> pre-set time intervals.
>> The *HttpServer* is initialised at startup and is continuously checked
>> for any incoming messages in the loop() method of the arduino. The purpose
>> of the HttpServer is allow control signals (ex: switching a bulb or buzzer)
>> to be sent to the Arduino.
>>
>> Your comments as to how we could improve this implementation is highly
>> appreciated.
>>
>> [1]
>> https://github.com/wso2-dev/device-cloud-agents/tree/master/FireAlarmWifiAgent
>> [2]
>> https://github.com/wso2-dev/device-cloud-agents/tree/master/FireAlarmEthernetAgent
>> -------------------------------------
>> *Shabir Mohamed*
>> *Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> Email: [email protected] <[email protected]>
>> Mobile: +94 77 3516019 | +94 71 6583393
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to