EPC Cloud: Simplifying the Internet of Things Thanks to Web Patterns: HTML 5 Websockets (Part 2/3)

Part 1: Cloud & REST | Part 2: HTML5 WebSockets | Part 3: Physical Mashups

In a recent post, we were explaining how in a project common to MIT and ETH Zurich, we simplified deployments of IoT applications based on the EPC Global standards.

We operated this simplification by applying four of the Web of Things patterns: Cloud Computing, RESTful Interface, Real-Time Web and Physical Mashups.

In the first related post we described how we used Cloud Computing and RESTful Interfaces. It is now time to talk a little bit more about one of the other pattern: the Real-Time Web.

Real-Time Web: HTML 5 WebSockets to Enable Near Real-Time Applications

html5-websockets
Early on, experts of the RFID domain asked us to enable mobile or Web clients access to the raw data directly pushed by RFID readers. The challenge here is that the Web was designed mainly as a client-pull architecture, where clients can explicitly request (pull) data and receive it as a response (we have a paper about the matter, here!). This makes uses-cases where near real-time communication is required rather challenging. As an example, a typical use-case is one in which we would like to push events that are being recorded by an RFID reader directly to a mobile browser application for monitoring purpose.

Here, the “Real-time Web”, one of the most recent blueprints of the Web, can be leveraged. The Real Time Web encompasses several new techniques that can be used to push events directly to browsers. We focus on two of these here. The first one, called Comet (also called HTTP streaming or long-polling) is based on the concept of long-lasting HTTP connections and keep-alive messages. While this is supported by most browsers and HTTP libraries, it works by using an existing loop-hole. More recently, Websockets (part of the HTML5 drafts) were proposed. Websockets propose duplex communication with a single TCP/IP connection directly accessible from any compliant browser through a simple Javascript API. The increasing support for HTML5 in Web and Mobile Web browsers makes it a very good candidate for pushing data on the Web.

tpusher-logoFor the EPC Network, we created tPusher, a service that combines a RESTful API with a Web-socket and Comet server. Using
a RESTful API, clients can subscribe to RFID event notifications for a particular reader by using a URL such as:

http://.../t-pusher/reader/READER_ID


This initiates a Websocket connection with the server on which RFID events recorded by READER_ID will be pushed.

Our implementation is based on the great Atmosphere framework. Atomosphere is a Java abstraction framework for enabling push support on most Java Web servers. One of the advantages of this approach is to be able to deploy tPusher on recent Web Servers such as Grizzly, which are highly optimized to push events on the Web because of their usage of non-blocking threads for each client. In order to support browsers or other clients that do not support HTML5 Websockets yet, we use a client-side abstraction Javascript library called Atmosphere JQuery Plugin which falls back to a Comet connection in case Websockets are not supported by the client.

To better understand the impact of tPusher in the context of RFID apps let us talk about our demonstration: When setting up RFID readers or maintaining existing deployments it is valuable to have a direct feedback of the tags observed by a particular reader in order to monitor the manufacturing process or to debug the readers. In the current implementations of the EPC software stack this would require to use and configure a (expert) monitoring tool such as the Fosstrak LLRP Commander on a desktop computer. Thanks to the RESTful interface to the Real-Time Web capability of tPusher, the tags observed by any reader can now be directly pushed to any browser or HTTP library.

We developed as Mobile Web page that can display them in a user-friendly manner. The page uses HTML5, Javascript with the Atmosphere JQuery Plugin. All code required for such a page to subscribe to events pushed by readers through tPusher and display them fits within 5 lines of Javascript. The code is shown below:


// called whenever an event is pushed :
function callback(response )
{alert(response.responseBody + response.transport) ;}
// subscription to the events of reader "exit1 "
$.atmosphere.subscribe (
"http://EPC_CLOUD_APPLIANCE/t-pusher/reader/exit1" ,
callback , $.atmosphere.request =
{transport : "websocket" }) ;

Add some bits of Sencha Touch HTML and CSS and you get a nice, user friendly mobile Web application within a few hours of work. The app does not require any installation (just access a URL!) and works accross mobile Web browsers (e.g., iPhone Webkit, Android Webkit / Firefox mobile, etc.)
epc-mobile-monitor.

In a next post we will talk about the last pattern: Physical Mashups.

For those who can’t wait, you can already sneak into the presentation of the full project below.

You may also like...

167 Responses

  1. Uybojd says:

    generic allergy pills allergy pills for adults do you need a prescription

  2. Mywpkk says:

    strong dangerous sleeping pills phenergan 25mg generic

  3. Efrxiv says:

    prescription heartburn medication names order allopurinol online

  4. Csdiqy says:

    isotretinoin brand brand accutane 10mg buy accutane 20mg without prescription

  5. Tpmrgf says:

    strongest over the counter sleep aid modafinil drug

  6. Aquvmx says:

    order amoxil 1000mg generic amoxil 1000mg generic order amoxil 250mg online cheap

  7. Ncrkmo says:

    buy azithromycin sale order generic zithromax 250mg buy zithromax 250mg sale

  8. Axntue says:

    oral azithromycin buy azipro 250mg pills azithromycin 250mg over the counter

  9. Csboaj says:

    buy omnacortil tablets order generic omnacortil 40mg buy prednisolone 10mg generic

  10. Bpghwf says:

    amoxicillin 250mg pill amoxil price cheap amoxicillin generic

  11. Iekxjs says:

    buy albuterol online cheap purchase ventolin inhalator online cheap order albuterol inhalator without prescription

  12. Zqowtk says:

    synthroid 150mcg us levothyroxine canada synthroid online

  13. Oirorh says:

    buy clomiphene buy serophene pill clomid 100mg cheap

  14. Puede utilizar un software de gestión para padres para guiar y supervisar el comportamiento de los niños en Internet. Con la ayuda de los siguientes 10 software de administración de padres más inteligentes, puede rastrear el historial de llamadas de su hijo, el historial de navegación, el acceso a contenido peligroso, las aplicaciones que instalan, etc.

  15. Ymvaok says:

    buy cheap generic zanaflex order tizanidine online tizanidine sale

  16. Tojdih says:

    order rybelsus 14mg without prescription order rybelsus pill semaglutide 14mg canada

  17. Very good post.Really looking forward to read more. Great.
    My website: русский порно массаж

  18. Ptmfvf says:

    buy deltasone 20mg sale purchase prednisone pill prednisone 20mg pill

  19. Mktdek says:

    rybelsus 14 mg us rybelsus 14 mg cheap order rybelsus

  20. Qpmqka says:

    isotretinoin 20mg for sale order accutane 40mg generic accutane 20mg cheap

  21. Very good post.Really looking forward to read more. Great.
    My website: видео изнасилование

  22. Vnmljk says:

    albuterol inhalator cheap oral albuterol buy generic albuterol

  23. Dgrokk says:

    amoxil 1000mg over the counter amoxil 250mg without prescription buy amoxil 500mg for sale

  24. Ahejmj says:

    brand augmentin 1000mg amoxiclav canada buy clavulanate without prescription

  25. Ncocjg says:

    cheap zithromax azithromycin us azithromycin 500mg uk

  26. Ympbqd says:

    levoxyl price synthroid where to buy cheap generic levothroid

  27. Sesozi says:

    where to buy omnacortil without a prescription buy cheap prednisolone buy prednisolone 10mg generic

  28. Wmwpjc says:

    cost serophene buy clomiphene without prescription cost clomiphene 50mg

  29. Lqqsdn says:

    gabapentin 800mg cheap gabapentin 100mg tablet buy gabapentin 800mg online cheap

  30. La mejor aplicación de control parental para proteger a sus hijos – monitoriza en secreto GPS, SMS, llamadas, WhatsApp, Facebook, ubicación. Puede monitorear de forma remota las actividades del teléfono móvil después de descargar e instalar apk en el teléfono de destino. https://www.mycellspy.com/es/

  31. Dxpkbs says:

    order lasix lasix 100mg drug furosemide 40mg for sale

  32. Zxyfqe says:

    sildenafil online order buy viagra online pfizer viagra

  33. Jwhuhz says:

    purchase acticlate online cheap buy doxycycline without prescription buy generic doxycycline online

  34. Ucpfvs says:

    free spins no deposit casino gambling casinos free roulette games

  35. Lmrtfn says:

    buy generic levitra order generic levitra 10mg vardenafil usa

  36. Okaxtm says:

    pregabalin for sale online generic pregabalin 150mg order pregabalin sale

  37. Mttizn says:

    order plaquenil generic generic hydroxychloroquine 200mg buy hydroxychloroquine 400mg without prescription

  38. Woghkr says:

    aristocort over the counter purchase aristocort order triamcinolone 10mg pill

  39. Mibohi says:

    guaranteed cialis overnight delivery usa cialis pill order tadalafil 40mg generic

  40. Dnhayk says:

    cost clarinex 5mg desloratadine pills clarinex 5mg generic

  41. Hdvuax says:

    purchase cenforce generic cenforce 100mg cheap cost cenforce 100mg

  42. Ljxaie says:

    order generic claritin 10mg where can i buy loratadine order claritin

  43. Kkqihl says:

    aralen 250mg cost chloroquine 250mg brand chloroquine online order

  44. Ejsmvq says:

    priligy 60mg usa buy priligy no prescription cytotec pills

  45. Oitbbk says:

    order glucophage 1000mg generic buy metformin 500mg pills metformin over the counter

  46. Gjpqjd says:

    order glucophage 1000mg pills glucophage where to buy order glycomet 500mg

  47. Lhipnl says:

    order orlistat pills diltiazem 180mg tablet order diltiazem 180mg generic

  48. Yxphjg says:

    atorvastatin 40mg us purchase atorvastatin sale lipitor for sale

  49. Hhywth says:

    norvasc 5mg pills norvasc 10mg over the counter amlodipine order

  50. Hgjwcg says:

    zovirax us zyloprim brand order allopurinol pills

  51. Cdlnbj says:

    lisinopril 5mg oral lisinopril where to buy buy lisinopril 2.5mg online

  52. Wpexdy says:

    buy rosuvastatin 10mg generic crestor order buy zetia without a prescription

  53. Jmxcvh says:

    brand prilosec 10mg omeprazole 10mg over the counter prilosec 20mg over the counter

  54. Guyuer says:

    buy generic domperidone online tetracycline medication buy tetracycline 500mg online cheap

  55. Rgpztu says:

    buy generic metoprolol 50mg lopressor 100mg drug lopressor 100mg uk

  56. Insidx says:

    cyclobenzaprine drug buy lioresal no prescription ozobax order

  57. Ciktuz says:

    buy toradol without prescription colcrys uk cost colcrys 0.5mg

  58. Jewfjw says:

    buy atenolol 100mg sale purchase atenolol atenolol for sale

  59. Fbxlki says:

    buy methylprednisolone 8mg methylprednisolone pills depo-medrol buy

  60. Zxhloh says:

    inderal 10mg pills inderal 20mg uk plavix price

  61. Hjgduf says:

    writing essays for money paper writing websites pay for term paper

  62. Nnlllu says:

    methotrexate 2.5mg canada warfarin over the counter coumadin order

  63. Ycidkn says:

    meloxicam 7.5mg canada meloxicam tablet celecoxib sale

  64. Ekdois says:

    reglan 10mg oral metoclopramide 10mg tablet hyzaar online

  65. Ctazvo says:

    buy generic tamsulosin online buy flomax 0.2mg generic celebrex 100mg without prescription

  66. Kasvzo says:

    esomeprazole drug buy generic esomeprazole for sale topiramate 100mg generic

  67. Ubgegf says:

    zofran 4mg for sale aldactone 25mg cheap spironolactone for sale

  68. Wbkpjh says:

    sumatriptan 50mg ca imitrex order online buy levaquin 250mg online cheap

  69. Dqycfe says:

    cheap zocor 10mg valtrex for sale online order valtrex pill

  70. Kgdnby says:

    how to get avodart without a prescription buy ranitidine 150mg pills zantac tablet

  71. AviGhana says:

    play aviator: https://aviatorghana.pro/ aviator game bet

  72. CasBrasil says:

    cassino pin up https://pinupcassino.pro/ pin up aviator

  73. CasBrasil says:

    pin up bet https://pinupcassino.pro/ aviator oficial pin up

  74. CasBrasil says:

    pin-up casino login https://pinupcassino.pro/ pin up cassino online

  75. Lfwsot says:

    finasteride 1mg us propecia sale order diflucan online

  76. Irgmkq says:

    buy cipro 1000mg online – keflex 125mg canada amoxiclav for sale online

  77. Hrkyco says:

    buy ciprofloxacin generic – buy bactrim 960mg buy clavulanate without prescription

  78. Znbkja says:

    buy cheap ciprofloxacin – doryx tablet erythromycin usa

  79. Ejkuhe says:

    metronidazole 200mg without prescription – buy amoxicillin online cheap azithromycin 250mg cost

  80. Tshwnt says:

    ivermectin 6mg over counter – sumycin 500mg cheap sumycin price

  81. Jsvhzn says:

    valacyclovir 1000mg tablet – order starlix zovirax over the counter

  82. Iqsvqm says:

    ampicillin brand order vibra-tabs order amoxicillin sale

  83. Kefbdl says:

    order metronidazole 400mg sale – buy cefaclor cheap zithromax 500mg canada

  84. Tolnla says:

    order lasix pills – lasix oral buy capoten 25 mg without prescription

  85. Vlkpat says:

    glucophage 1000mg us – bactrim 480mg uk order lincocin 500 mg without prescription

  86. Iwqhlo says:

    zidovudine over the counter – buy avapro for sale allopurinol us

  87. Vxepib says:

    clozaril pill – amaryl 4mg ca order famotidine generic

  88. Bxdvpv says:

    seroquel 50mg over the counter – purchase eskalith generic buy eskalith tablets

  89. Xayldp says:

    order anafranil for sale – buy cheap aripiprazole order doxepin 75mg

  90. Ofwsdr says:

    order generic atarax 25mg – order generic endep 25mg buy endep 10mg generic

  91. Cvyuti says:

    buy clavulanate pills – how to get clavulanate without a prescription order ciprofloxacin 1000mg generic

  92. Oysazt says:

    buy amoxicillin sale – erythromycin 500mg us buy cipro generic

  93. Bkghrj says:

    buy zithromax online – sumycin brand buy ciplox 500 mg generic

  94. Tbvxsc says:

    where can i buy cleocin – brand chloramphenicol chloramphenicol price

  95. Kxdmcg says:

    buy ivermectin 12 mg online – buy aczone without a prescription purchase cefaclor sale

  96. Nldrze says:

    albuterol brand – advair diskus inhalator usa generic theo-24 Cr 400 mg

  97. Szyxum says:

    order medrol sale – brand azelastine buy astelin generic

  98. Evszre says:

    buy generic desloratadine 5mg – aristocort pills albuterol canada

Leave a Reply

Your email address will not be published. Required fields are marked *