SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
EventSource emulation
A labs.ericsson.com enabler
https://labs.ericsson.com/apis/eventsource/
EventSource emulation

 EventSource is an API for receiving push messages “server-
 sent events” that is currently being standardized and
 implemented natively in browsers.
 The EventSource emulation enabler allows you to use the
 EventSource API already now in browsers that do not yet
 support server-sent events.
 Additionally, the enabler proxy allows you to set up your own
 server that provides a regular event-stream that will work
 with a native implementation of EventSource.




                                                            2
Why EventSource emulation?
 The EventSource emulation enabler
 provides a simple API for receiving
 pushed messages to web applications
 that you can use already today.

 Once more browsers implements the
 EventSource functionality natively,
 your web application will then start
 using the native implementation
 automatically.



                                        3
EventSource client example
 To use the enabler, simply include the enabler
 JavaScript as such:
 <script src="http://eventsource.labs.ericsson.net
 /ESProxy/library/?key=YOUR_API_KEY"></script>

 Use the EventSource constructor to start receiving
 events from your server:
 var es = new EventSource(“http://example.org/event-stream”);

 Add an event listener to the EventSource object to
 handle incoming events:
 es.addEventListener(“server-time”, function (evt) { alert(“time on
 server is:” + evt.data); }, false);

 The EventSource specification is available here:
 http://dev.w3.org/html5/eventsource/



                                                                      4
EventSource server example
 A simple PHP script can be used to serve the client
 with an appropriate event-stream:
 <?php
 header("Content-Type:text/event-stream");
 while(true) {
     echo "event: server-timen";
     $time = time();
     echo "data: $timen";
     echo "n";
     flush();
     sleep(3);
 }
 ?>




                                                       5
6

Weitere ähnliche Inhalte

Was ist angesagt?

Top open source tools to consider for web service performance testing
Top open source tools to consider for web service performance testingTop open source tools to consider for web service performance testing
Top open source tools to consider for web service performance testingAlisha Henderson
 
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...RightScale
 
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014Amazon Web Services
 
Windows Applications in the Cloud
Windows Applications in the CloudWindows Applications in the Cloud
Windows Applications in the CloudRightScale
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkJulien SIMON
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIsKaren Immanuel
 
Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIFilip W
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in ActionAndrei Rusu
 
Berkshelf Tutorial : Better Way to Create and Manage Chef Cookbooks
Berkshelf Tutorial : Better Way to Create and Manage Chef CookbooksBerkshelf Tutorial : Better Way to Create and Manage Chef Cookbooks
Berkshelf Tutorial : Better Way to Create and Manage Chef CookbooksMamun Rashid, CCDH
 
AWSSummitDevSecOpsCodeContestReport
AWSSummitDevSecOpsCodeContestReportAWSSummitDevSecOpsCodeContestReport
AWSSummitDevSecOpsCodeContestReportdaisuke awaji
 
Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent eventsPiotr Karbownik
 
RBC Mod 1: Making a New Rails App
RBC Mod 1: Making a New Rails AppRBC Mod 1: Making a New Rails App
RBC Mod 1: Making a New Rails Appameedahc
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesGennaro Spagnoli
 
Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsAmazon Web Services
 
Creating A Vba Function Library For Use In QTP/VBSCRIPT
Creating A Vba Function Library For Use In QTP/VBSCRIPTCreating A Vba Function Library For Use In QTP/VBSCRIPT
Creating A Vba Function Library For Use In QTP/VBSCRIPThsupadrasta
 
Improve monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsNilesh Gule
 

Was ist angesagt? (20)

HTBYOOFIYRHT RubyConf
HTBYOOFIYRHT RubyConfHTBYOOFIYRHT RubyConf
HTBYOOFIYRHT RubyConf
 
Top open source tools to consider for web service performance testing
Top open source tools to consider for web service performance testingTop open source tools to consider for web service performance testing
Top open source tools to consider for web service performance testing
 
Site opsys
Site opsysSite opsys
Site opsys
 
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
 
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014
(DEV304) What’s New in the AWS SDK for .NET | AWS re:Invent 2014
 
Rack
RackRack
Rack
 
Windows Applications in the Cloud
Windows Applications in the CloudWindows Applications in the Cloud
Windows Applications in the Cloud
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic Beanstalk
 
Panoramic view of web APIs
Panoramic view of web APIsPanoramic view of web APIs
Panoramic view of web APIs
 
Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web API
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in Action
 
Berkshelf Tutorial : Better Way to Create and Manage Chef Cookbooks
Berkshelf Tutorial : Better Way to Create and Manage Chef CookbooksBerkshelf Tutorial : Better Way to Create and Manage Chef Cookbooks
Berkshelf Tutorial : Better Way to Create and Manage Chef Cookbooks
 
AWSSummitDevSecOpsCodeContestReport
AWSSummitDevSecOpsCodeContestReportAWSSummitDevSecOpsCodeContestReport
AWSSummitDevSecOpsCodeContestReport
 
Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent events
 
Using ajax in mule
Using ajax in muleUsing ajax in mule
Using ajax in mule
 
RBC Mod 1: Making a New Rails App
RBC Mod 1: Making a New Rails AppRBC Mod 1: Making a New Rails App
RBC Mod 1: Making a New Rails App
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
 
Grow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push NotificationsGrow and Retain Users with Analytics and Push Notifications
Grow and Retain Users with Analytics and Push Notifications
 
Creating A Vba Function Library For Use In QTP/VBSCRIPT
Creating A Vba Function Library For Use In QTP/VBSCRIPTCreating A Vba Function Library For Use In QTP/VBSCRIPT
Creating A Vba Function Library For Use In QTP/VBSCRIPT
 
Improve monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss tools
 

Andere mochten auch

Andere mochten auch (6)

Grahpical style irene
Grahpical style ireneGrahpical style irene
Grahpical style irene
 
Semnul Crucii
Semnul CruciiSemnul Crucii
Semnul Crucii
 
SEMPO Webinar AdWords PLAs 2013
SEMPO Webinar AdWords PLAs 2013SEMPO Webinar AdWords PLAs 2013
SEMPO Webinar AdWords PLAs 2013
 
OvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programmingOvertheAir 2010 html5 impact on application programming
OvertheAir 2010 html5 impact on application programming
 
Closing The Loop On Mobile Search Marketing [Webinar]
Closing The Loop On Mobile Search Marketing [Webinar]Closing The Loop On Mobile Search Marketing [Webinar]
Closing The Loop On Mobile Search Marketing [Webinar]
 
Using wikis for pd
Using wikis for pdUsing wikis for pd
Using wikis for pd
 

Ähnlich wie Event Source On Labs

Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha
 
Events: The Object Oriented Hook System.
Events: The Object Oriented Hook System.Events: The Object Oriented Hook System.
Events: The Object Oriented Hook System.Nida Ismail Shah
 
PWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service WorkerPWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service Workerjungkees
 
Scala API - Azure Event Hub Integration
Scala API - Azure Event Hub IntegrationScala API - Azure Event Hub Integration
Scala API - Azure Event Hub IntegrationBraja Krishna Das
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 ConferenceRoger Kitain
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015Stuart
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitDanilo Poccia
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...Robert Nyman
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Amazon Web Services
 
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...Dan Farrelly
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service WorkerMuhammad Samu
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitDanilo Poccia
 
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...Amazon Web Services
 
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayMigrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayAmazon Web Services
 
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar SeriesConfiguration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar SeriesAmazon Web Services
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19Vivek chan
 

Ähnlich wie Event Source On Labs (20)

Server Sent Events
Server Sent EventsServer Sent Events
Server Sent Events
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Events: The Object Oriented Hook System.
Events: The Object Oriented Hook System.Events: The Object Oriented Hook System.
Events: The Object Oriented Hook System.
 
PWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service WorkerPWA Roadshow Korea - Service Worker
PWA Roadshow Korea - Service Worker
 
Asp.net tips
Asp.net tipsAsp.net tips
Asp.net tips
 
Scala API - Azure Event Hub Integration
Scala API - Azure Event Hub IntegrationScala API - Azure Event Hub Integration
Scala API - Azure Event Hub Integration
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 
It and ej
It and ejIt and ej
It and ej
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
 
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
An Auto-Documenting Event-Driven Architecture Using Async API and Inngest - A...
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service Worker
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
 
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
Configuration Management with AWS OpsWorks  by Amir Golan, Senior Product Man...
 
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayMigrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
 
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar SeriesConfiguration Management with AWS OpsWorks - November 2016 Webinar Series
Configuration Management with AWS OpsWorks - November 2016 Webinar Series
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 

Mehr von Tor Björn Minde

Mehr von Tor Björn Minde (19)

Web background service on labs
Web background service on labsWeb background service on labs
Web background service on labs
 
Ericsson Labs at SotM 2010
Ericsson Labs at SotM 2010Ericsson Labs at SotM 2010
Ericsson Labs at SotM 2010
 
Network Probe On Labs
Network Probe On LabsNetwork Probe On Labs
Network Probe On Labs
 
Mobile Sensor Actuator Gateway On Labs
Mobile Sensor Actuator Gateway On LabsMobile Sensor Actuator Gateway On Labs
Mobile Sensor Actuator Gateway On Labs
 
Ericsson Labs 100322
Ericsson Labs 100322Ericsson Labs 100322
Ericsson Labs 100322
 
Converting Media On Labs
Converting Media On LabsConverting Media On Labs
Converting Media On Labs
 
Mobile Identification On Labs
Mobile Identification On LabsMobile Identification On Labs
Mobile Identification On Labs
 
Face Detector On Labs
Face Detector On LabsFace Detector On Labs
Face Detector On Labs
 
Web Connectivity On Labs
Web Connectivity On LabsWeb Connectivity On Labs
Web Connectivity On Labs
 
3D Landscape on Labs
3D Landscape on Labs3D Landscape on Labs
3D Landscape on Labs
 
Mobile Location On Labs
Mobile Location On LabsMobile Location On Labs
Mobile Location On Labs
 
Streaming Media On Labs
Streaming Media On LabsStreaming Media On Labs
Streaming Media On Labs
 
Ericsson Labs OTA09 090925
Ericsson Labs OTA09 090925Ericsson Labs OTA09 090925
Ericsson Labs OTA09 090925
 
Web Location On Labs
Web Location On LabsWeb Location On Labs
Web Location On Labs
 
Ericsson Labs 090702
Ericsson Labs 090702Ericsson Labs 090702
Ericsson Labs 090702
 
Mobile Maps On Labs
Mobile Maps On LabsMobile Maps On Labs
Mobile Maps On Labs
 
SMS On Labs
SMS On LabsSMS On Labs
SMS On Labs
 
Mobile Java Push On Labs
Mobile Java Push On LabsMobile Java Push On Labs
Mobile Java Push On Labs
 
IMS framework On Labs
IMS framework On LabsIMS framework On Labs
IMS framework On Labs
 

Kürzlich hochgeladen

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Kürzlich hochgeladen (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Event Source On Labs

  • 1. EventSource emulation A labs.ericsson.com enabler https://labs.ericsson.com/apis/eventsource/
  • 2. EventSource emulation EventSource is an API for receiving push messages “server- sent events” that is currently being standardized and implemented natively in browsers. The EventSource emulation enabler allows you to use the EventSource API already now in browsers that do not yet support server-sent events. Additionally, the enabler proxy allows you to set up your own server that provides a regular event-stream that will work with a native implementation of EventSource. 2
  • 3. Why EventSource emulation? The EventSource emulation enabler provides a simple API for receiving pushed messages to web applications that you can use already today. Once more browsers implements the EventSource functionality natively, your web application will then start using the native implementation automatically. 3
  • 4. EventSource client example To use the enabler, simply include the enabler JavaScript as such: <script src="http://eventsource.labs.ericsson.net /ESProxy/library/?key=YOUR_API_KEY"></script> Use the EventSource constructor to start receiving events from your server: var es = new EventSource(“http://example.org/event-stream”); Add an event listener to the EventSource object to handle incoming events: es.addEventListener(“server-time”, function (evt) { alert(“time on server is:” + evt.data); }, false); The EventSource specification is available here: http://dev.w3.org/html5/eventsource/ 4
  • 5. EventSource server example A simple PHP script can be used to serve the client with an appropriate event-stream: <?php header("Content-Type:text/event-stream"); while(true) { echo "event: server-timen"; $time = time(); echo "data: $timen"; echo "n"; flush(); sleep(3); } ?> 5
  • 6. 6