SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
Building Real-Time Apps With
Symfony2
Antonio Perić-Mažar, Locastic
24.10.2015 Symfony Camp Ukraine
@antonioperic
About me
• Antonio Perić-Mažar, 

mag. ing. comp.
• CEO @ Locastic
• Software developer, Symfony2
• Sylius Contributor :)

• www.locastic.com
• antonio@locastic.com
• twitter: @antonioperic
@antonioperic
Who we are?
• Locastic (www.locastic.com)
• Web and mobile development
• UI/UX design
• Located in Split, Croatia
@antonioperic
@antonioperic
What is RTA?
A real-time application (RTA) is an application
program that functions within a time frame that
the user senses as immediate or current. The
latency must be less than a defined value,
usually measured in seconds. Whether or not a
given application qualifies as an RTA depends on
the worst-case execution time (WCET), the
maximum length of time a defined task or set of
tasks requires on a given hardware platform. The
use of RTAs is called real-time computing (RTC).
@antonioperic
@antonioperic
Use Cases
• Videoconference applications, VoIP
• Data Visualisations, Location tracking
• Online gaming, multi-user collaboration
• Community storage solutions
• Some e-commerce transactions
• Chatting, IM (instant messaging)
• Notifications & Signalling
• Activity Streams
• …
@antonioperic
Use Cases
Real-Time == UX
etc.
@antonioperic
Understanding RTA
• History of Realtime
• LiveConnect
• Http Based solutions
• Comet
@antonioperic
HTTP
• A client requests a webpage from a server.
• The server calculates the response
• The server sends the response to the
client.
@antonioperic
Webhooks
•server only

•low update rates 

•uni-directional - from publisher to consumer
(server to server)

•avg. latency

•high. efficiency (for servers)
@antonioperic
Polling
@antonioperic
Polling
• A client requests a webpage from a server
using regular HTTP (see HTTP above).
• The requested webpage executes JavaScript
which requests a file from the server at
regular intervals (e.g. 0.5 seconds).
• The server calculates each response and
sends it back, just like normal HTTP
traffic.
@antonioperic
Polling
• server or client
• low update rates
• batched bi-directional
• high latency
• low efficiency
@antonioperic
Long Polling
@antonioperic
Long Polling
• A client requests a webpage from a server using regular HTTP
(see HTTP above).
• The requested webpage executes JavaScript which requests a
file from the server.
• The server does not immediately respond with the requested
information but waits until there's new information
available.
• When there's new information available, the server responds
with the new information.
• The client receives the new information and immediately
sends another request to the server, re-starting the process.
@antonioperic
Long Polling
• server or client
• avg. update rates
• batched bi-directional
• avg. latency
• avg. efficiency
@antonioperic
HTML5 Server Sent Events
(SSE) / EventSource
@antonioperic
HTML5 Server Sent Events
(SSE) / EventSource
• A client requests a webpage from a server using regular
HTTP
• The requested webpage executes javascript which
opens a connection to the server.
• The server sends an event to the client when there's
new information available.
• Real-time traffic from server to client, mostly that's
what you'll need
• You'll want to use a server that has an event loop
• Not possible to connect with a server from another
domain
@antonioperic
HTML5 Server Sent Events
(SSE) / EventSource
• client (pushing)
• good update rates
• unidirectional
• good latency
• good efficiency
@antonioperic
WebSockets
@antonioperic
WebSockets
• A client requests a webpage from a server using regular http (see
HTTP above).
• The requested webpage executes JavaScript which opens a connection
with the server.
• The server and the client can now send each other messages when
new data (on either side) is available.
• Real-time traffic from the server to the client and from the client
to the server
• You'll want to use a server that has an event
• With WebSockets it is possible to connect with a server from
another domain.
• It is also possible to use a third party hosted websocket server, for
example Pusher or others. This way you'll only have to
implement the client side, which is very easy!
@antonioperic
WebSockets
• TCP, fully duplex single connection
• server or client (client mostly)
• bi-directional
• high update rates
• low latency
• high efficiency
@antonioperic
Streaming
• make connection, keep it open, as soon as we have
updates push it to client
• server or client
• high updated rates
• uni-directional
• low latency
• high efficiency
• business decisions, trading, unidirectional you can
only push it from server to client, single
persisting connection 
• look as servers and event as standard
@antonioperic
WebRTC
• server or client (normally client2client)

• high update rates

• bi-directional

• low latency

• high efficiency

• audio or video generally peer2peer
@antonioperic
Communication patterns
• Simple messaging
• Pub/Sub
• RPC/RMI
• Data Sync
@antonioperic
Simple Messaging
• No abstraction. Just messages
• Fits well with HTTP and REST
• Many persist connections
@antonioperic
Pub/Sub
• Subscribe and publish on channels
• Multiplexed. Single connection.
• Clearity partitions complex data
• Dedicated Endpoint
• Required SDK
@antonioperic
RPC/RMI
• Call API Methods
• SDK Required
• Hides network activity from developer
@antonioperic
Data Sync
• Interact with, and synchronise, data
structures
• Dedicated endpoint + Protocol
• New Paradigm
• SDK Required
• Hides network activity from developer
@antonioperic
How to pick technology?
• First: Are the only real time solutions in
NodeJS?
@antonioperic
How to pick technology?
• First: Are the only real time solutions in
NodeJS?





NO!
@antonioperic
Solutions by language
• PHP: ReactPHP, Ratchet, dNode-php, phpDaemon
• Java: Netty, Jetty
• JavaScript (Node.JS): Faye, Socket.IO (Engine.IO),
Primus.io
• .NET (C#): SignalR, XSockets
• Python: Lots of options built on Tornado
• Ruby: em-websocket, Faye
• Language agnostic: most hosted services
@antonioperic
Solutions by language
j.mp/realtime-tech-guide
@antonioperic
PHP?
• Apache is not built for Real-Time
• PHP is not build for Real-Time
• Real-Time is not impossible with PHP
@antonioperic
PHP RTA
• Self hosted PHP solution
• Self hosted Side-by-Side solution
• Hosted solution
@antonioperic
Self hosted PHP
• tightly coupled
• two stacks:
• sync stack
• async stack
@antonioperic
@antonioperic
PHP Self Hosted solutions
• React (PHP)
• Event-driven, non-blocking I/O with PHP.
• Ratchet (Built on React PHP)
• WebSockets, WAMP, PubSub samples. No HTTP
Fallback
• dnode-php (RPC/RMI)
• phpDaemon
• Lots of examples. Most docs in Russian.
@antonioperic
@antonioperic
PHP Self Hosted solutions
Pros:
• PHP
• Simple integration
• Standards-based
• WAMP/Autobahn
• JS, Android, iOS &
more
Cons:
• No HTTP fallback
• Low-level abstractions
• Different programming
style
• You need to scale
@antonioperic
@antonioperic
PHP + Faye Self Hosted
solutions
Pros:
• PubSub
• Connection fallback
• Redis support is build in
• Simple integration
Cons:
• Not PHP?
• You need to scale
@antonioperic
Other side by side solutions
• Socket.IO
• SockJS
• SignalR
• see real time tech guide for more
@antonioperic
@antonioperic
PHP + Hosted solutions
Pros:
• Simple and powerful
• Instantly scalable
• Managed & Dedicated
• Direct integration into
Symfony
Cons:
• 3rd party reliance
@antonioperic
What we build?
• Real time dashboards ford Google Adwords
analytics
• Symfony2, AngularJS, RabbitMQ
• First version was with Polling
• Second version moving to hosted solution
- Pusher
@antonioperic
Other hosted solutions
• PubNub
• Realtime.co
• Firebase
• Simperium
• see real time tech guide for more
@antonioperic
References
• Phil @Leggetter 

- Head of Developer Relations at @pusher. Realtime Web Technology Evangelist.

• Real-time Tech Guide
• React (PHP)
• Ratchet (PHP)
• Faye (Node/Ruby)
• Pusher
• LopiPusherBundle
• github.com/leggetter/realtime-symfonyexamples
@antonioperic
Thank you!
@antonioperic
QA





follow me on twitter:
@antonioperic

Contenu connexe

Tendances

Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyKyle Drake
 
Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011leo lapworth
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in LispVladimir Sedach
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris Tankersley
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocketsametmax
 
Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2Vinci Rufus
 
SANS DFIR Prague: PowerShell & WMI
SANS DFIR Prague: PowerShell & WMISANS DFIR Prague: PowerShell & WMI
SANS DFIR Prague: PowerShell & WMIJoe Slowik
 
The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with SwooleAlbert Chen
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkFabio Tiriticco
 
Obfuscating The Empire
Obfuscating The EmpireObfuscating The Empire
Obfuscating The EmpireRyan Cobb
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaJames Falkner
 
Ruby 1.9 Fibers
Ruby 1.9 FibersRuby 1.9 Fibers
Ruby 1.9 FibersKevin Ball
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problemJose Galarza
 
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversTatsuhiko Miyagawa
 
Bash-ing brittle indicators: Red teaming mac-os without bash or python
Bash-ing brittle indicators: Red teaming mac-os without bash or pythonBash-ing brittle indicators: Red teaming mac-os without bash or python
Bash-ing brittle indicators: Red teaming mac-os without bash or pythonCody Thomas
 
Realtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsRealtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsTom Sheffler
 
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOS
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOSWalking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOS
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOSCody Thomas
 

Tendances (20)

Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
 
Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2
 
SANS DFIR Prague: PowerShell & WMI
SANS DFIR Prague: PowerShell & WMISANS DFIR Prague: PowerShell & WMI
SANS DFIR Prague: PowerShell & WMI
 
The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with Swoole
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Obfuscating The Empire
Obfuscating The EmpireObfuscating The Empire
Obfuscating The Empire
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and Java
 
Ruby 1.9 Fibers
Ruby 1.9 FibersRuby 1.9 Fibers
Ruby 1.9 Fibers
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problem
 
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and serversPlack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and servers
 
Bash-ing brittle indicators: Red teaming mac-os without bash or python
Bash-ing brittle indicators: Red teaming mac-os without bash or pythonBash-ing brittle indicators: Red teaming mac-os without bash or python
Bash-ing brittle indicators: Red teaming mac-os without bash or python
 
Realtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsRealtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn Websockets
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOS
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOSWalking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOS
Walking the Bifrost: An Operator's Guide to Heimdal & Kerberos on macOS
 
About Clack
About ClackAbout Clack
About Clack
 
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
 

En vedette

Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Phil Leggetter
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondPhil Leggetter
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfonyAlvaro Videla
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSAntonio Peric-Mazar
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueGleicon Moraes
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating SystemDr. Pankaj Zope
 
Conception et réalisation d'une application de gestion intégrée au sein de la...
Conception et réalisation d'une application de gestion intégrée au sein de la...Conception et réalisation d'une application de gestion intégrée au sein de la...
Conception et réalisation d'une application de gestion intégrée au sein de la...Addi Ait-Mlouk
 

En vedette (9)

Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & Beyond
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfony
 
Drupal8 for Symfony Developers
Drupal8 for Symfony DevelopersDrupal8 for Symfony Developers
Drupal8 for Symfony Developers
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
 
Past Simple
Past SimplePast Simple
Past Simple
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Conception et réalisation d'une application de gestion intégrée au sein de la...
Conception et réalisation d'une application de gestion intégrée au sein de la...Conception et réalisation d'une application de gestion intégrée au sein de la...
Conception et réalisation d'une application de gestion intégrée au sein de la...
 

Similaire à Building Real-Time Apps With Symfony2 and PHP

SignalR With ASP.Net part1
SignalR With ASP.Net part1SignalR With ASP.Net part1
SignalR With ASP.Net part1Esraa Ammar
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web APIAurimas Niekis
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with LumenKit Brennan
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 
ReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsPriyanka Aash
 
Stateful Stream Processing at In-Memory Speed
Stateful Stream Processing at In-Memory SpeedStateful Stream Processing at In-Memory Speed
Stateful Stream Processing at In-Memory SpeedJamie Grier
 
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulLet's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulSwanand Pagnis
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with PythonSkoobe
 
End user-experience monitoring
End user-experience monitoring End user-experience monitoring
End user-experience monitoring Site24x7
 
Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...Andrés Colón Pérez
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusReal-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusDinusha Kumarasiri
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeFastly
 
SignalR for ASP.NET Developers
SignalR for ASP.NET DevelopersSignalR for ASP.NET Developers
SignalR for ASP.NET DevelopersShivanand Arur
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with PythonAnton Caceres
 
Measuring latency from the browser
Measuring latency from the browserMeasuring latency from the browser
Measuring latency from the browserAgustín Formoso
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 

Similaire à Building Real-Time Apps With Symfony2 and PHP (20)

SignalR With ASP.Net part1
SignalR With ASP.Net part1SignalR With ASP.Net part1
SignalR With ASP.Net part1
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Real time web
Real time webReal time web
Real time web
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
ReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security BugsReproNow—Save Time Reproducing and Triaging Security Bugs
ReproNow—Save Time Reproducing and Triaging Security Bugs
 
Stateful Stream Processing at In-Memory Speed
Stateful Stream Processing at In-Memory SpeedStateful Stream Processing at In-Memory Speed
Stateful Stream Processing at In-Memory Speed
 
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulLet's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with Python
 
End user-experience monitoring
End user-experience monitoring End user-experience monitoring
End user-experience monitoring
 
Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...Building Modern Digital Services on Scalable Private Government Infrastructur...
Building Modern Digital Services on Scalable Private Government Infrastructur...
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusReal-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service Bus
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
 
SignalR for ASP.NET Developers
SignalR for ASP.NET DevelopersSignalR for ASP.NET Developers
SignalR for ASP.NET Developers
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with Python
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Measuring latency from the browser
Measuring latency from the browserMeasuring latency from the browser
Measuring latency from the browser
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 

Plus de Antonio Peric-Mazar

You call yourself a Senior Developer?
You call yourself a Senior Developer?You call yourself a Senior Developer?
You call yourself a Senior Developer?Antonio Peric-Mazar
 
Using API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonyconUsing API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonyconAntonio Peric-Mazar
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Antonio Peric-Mazar
 
Are you failing at being agile? #digitallabin
Are you failing at being agile? #digitallabinAre you failing at being agile? #digitallabin
Are you failing at being agile? #digitallabinAntonio Peric-Mazar
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Antonio Peric-Mazar
 
A year with progressive web apps! #webinale
A year with progressive web apps! #webinaleA year with progressive web apps! #webinale
A year with progressive web apps! #webinaleAntonio Peric-Mazar
 
The UI is the THE application #dpc19
The UI is the THE application #dpc19The UI is the THE application #dpc19
The UI is the THE application #dpc19Antonio Peric-Mazar
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrbAntonio Peric-Mazar
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUAntonio Peric-Mazar
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friendsAntonio Peric-Mazar
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Symfony4 - A new way of developing web applications
Symfony4 - A new way of developing web applicationsSymfony4 - A new way of developing web applications
Symfony4 - A new way of developing web applicationsAntonio Peric-Mazar
 
Build your business on top of Open Source
Build your business on top of Open SourceBuild your business on top of Open Source
Build your business on top of Open SourceAntonio Peric-Mazar
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Lessons learned while developing with Sylius
Lessons learned while developing with SyliusLessons learned while developing with Sylius
Lessons learned while developing with SyliusAntonio Peric-Mazar
 
Drupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPDrupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPAntonio Peric-Mazar
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Antonio Peric-Mazar
 
Maintainable + Extensible = Clean ... yes, Code!
Maintainable + Extensible = Clean ... yes, Code! Maintainable + Extensible = Clean ... yes, Code!
Maintainable + Extensible = Clean ... yes, Code! Antonio Peric-Mazar
 

Plus de Antonio Peric-Mazar (20)

You call yourself a Senior Developer?
You call yourself a Senior Developer?You call yourself a Senior Developer?
You call yourself a Senior Developer?
 
Using API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonyconUsing API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonycon
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...
 
Are you failing at being agile? #digitallabin
Are you failing at being agile? #digitallabinAre you failing at being agile? #digitallabin
Are you failing at being agile? #digitallabin
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19
 
A year with progressive web apps! #webinale
A year with progressive web apps! #webinaleA year with progressive web apps! #webinale
A year with progressive web apps! #webinale
 
The UI is the THE application #dpc19
The UI is the THE application #dpc19The UI is the THE application #dpc19
The UI is the THE application #dpc19
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMU
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friends
 
Progressive Web Apps are here!
Progressive Web Apps are here!Progressive Web Apps are here!
Progressive Web Apps are here!
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Symfony4 - A new way of developing web applications
Symfony4 - A new way of developing web applicationsSymfony4 - A new way of developing web applications
Symfony4 - A new way of developing web applications
 
Build your business on top of Open Source
Build your business on top of Open SourceBuild your business on top of Open Source
Build your business on top of Open Source
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Lessons learned while developing with Sylius
Lessons learned while developing with SyliusLessons learned while developing with Sylius
Lessons learned while developing with Sylius
 
Drupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHPDrupal8 for Symfony developers - Dutch PHP
Drupal8 for Symfony developers - Dutch PHP
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)
 
Maintainable + Extensible = Clean ... yes, Code!
Maintainable + Extensible = Clean ... yes, Code! Maintainable + Extensible = Clean ... yes, Code!
Maintainable + Extensible = Clean ... yes, Code!
 

Dernier

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Building Real-Time Apps With Symfony2 and PHP

  • 1. Building Real-Time Apps With Symfony2 Antonio Perić-Mažar, Locastic 24.10.2015 Symfony Camp Ukraine
  • 2. @antonioperic About me • Antonio Perić-Mažar, 
 mag. ing. comp. • CEO @ Locastic • Software developer, Symfony2 • Sylius Contributor :)
 • www.locastic.com • antonio@locastic.com • twitter: @antonioperic
  • 3. @antonioperic Who we are? • Locastic (www.locastic.com) • Web and mobile development • UI/UX design • Located in Split, Croatia
  • 5. @antonioperic What is RTA? A real-time application (RTA) is an application program that functions within a time frame that the user senses as immediate or current. The latency must be less than a defined value, usually measured in seconds. Whether or not a given application qualifies as an RTA depends on the worst-case execution time (WCET), the maximum length of time a defined task or set of tasks requires on a given hardware platform. The use of RTAs is called real-time computing (RTC).
  • 7. @antonioperic Use Cases • Videoconference applications, VoIP • Data Visualisations, Location tracking • Online gaming, multi-user collaboration • Community storage solutions • Some e-commerce transactions • Chatting, IM (instant messaging) • Notifications & Signalling • Activity Streams • …
  • 9. @antonioperic Understanding RTA • History of Realtime • LiveConnect • Http Based solutions • Comet
  • 10. @antonioperic HTTP • A client requests a webpage from a server. • The server calculates the response • The server sends the response to the client.
  • 11. @antonioperic Webhooks •server only •low update rates  •uni-directional - from publisher to consumer (server to server) •avg. latency •high. efficiency (for servers)
  • 13. @antonioperic Polling • A client requests a webpage from a server using regular HTTP (see HTTP above). • The requested webpage executes JavaScript which requests a file from the server at regular intervals (e.g. 0.5 seconds). • The server calculates each response and sends it back, just like normal HTTP traffic.
  • 14. @antonioperic Polling • server or client • low update rates • batched bi-directional • high latency • low efficiency
  • 16. @antonioperic Long Polling • A client requests a webpage from a server using regular HTTP (see HTTP above). • The requested webpage executes JavaScript which requests a file from the server. • The server does not immediately respond with the requested information but waits until there's new information available. • When there's new information available, the server responds with the new information. • The client receives the new information and immediately sends another request to the server, re-starting the process.
  • 17. @antonioperic Long Polling • server or client • avg. update rates • batched bi-directional • avg. latency • avg. efficiency
  • 18. @antonioperic HTML5 Server Sent Events (SSE) / EventSource
  • 19. @antonioperic HTML5 Server Sent Events (SSE) / EventSource • A client requests a webpage from a server using regular HTTP • The requested webpage executes javascript which opens a connection to the server. • The server sends an event to the client when there's new information available. • Real-time traffic from server to client, mostly that's what you'll need • You'll want to use a server that has an event loop • Not possible to connect with a server from another domain
  • 20. @antonioperic HTML5 Server Sent Events (SSE) / EventSource • client (pushing) • good update rates • unidirectional • good latency • good efficiency
  • 22. @antonioperic WebSockets • A client requests a webpage from a server using regular http (see HTTP above). • The requested webpage executes JavaScript which opens a connection with the server. • The server and the client can now send each other messages when new data (on either side) is available. • Real-time traffic from the server to the client and from the client to the server • You'll want to use a server that has an event • With WebSockets it is possible to connect with a server from another domain. • It is also possible to use a third party hosted websocket server, for example Pusher or others. This way you'll only have to implement the client side, which is very easy!
  • 23. @antonioperic WebSockets • TCP, fully duplex single connection • server or client (client mostly) • bi-directional • high update rates • low latency • high efficiency
  • 24. @antonioperic Streaming • make connection, keep it open, as soon as we have updates push it to client • server or client • high updated rates • uni-directional • low latency • high efficiency • business decisions, trading, unidirectional you can only push it from server to client, single persisting connection  • look as servers and event as standard
  • 25. @antonioperic WebRTC • server or client (normally client2client) • high update rates • bi-directional • low latency • high efficiency • audio or video generally peer2peer
  • 26. @antonioperic Communication patterns • Simple messaging • Pub/Sub • RPC/RMI • Data Sync
  • 27. @antonioperic Simple Messaging • No abstraction. Just messages • Fits well with HTTP and REST • Many persist connections
  • 28. @antonioperic Pub/Sub • Subscribe and publish on channels • Multiplexed. Single connection. • Clearity partitions complex data • Dedicated Endpoint • Required SDK
  • 29. @antonioperic RPC/RMI • Call API Methods • SDK Required • Hides network activity from developer
  • 30. @antonioperic Data Sync • Interact with, and synchronise, data structures • Dedicated endpoint + Protocol • New Paradigm • SDK Required • Hides network activity from developer
  • 31. @antonioperic How to pick technology? • First: Are the only real time solutions in NodeJS?
  • 32. @antonioperic How to pick technology? • First: Are the only real time solutions in NodeJS?
 
 
 NO!
  • 33. @antonioperic Solutions by language • PHP: ReactPHP, Ratchet, dNode-php, phpDaemon • Java: Netty, Jetty • JavaScript (Node.JS): Faye, Socket.IO (Engine.IO), Primus.io • .NET (C#): SignalR, XSockets • Python: Lots of options built on Tornado • Ruby: em-websocket, Faye • Language agnostic: most hosted services
  • 35. @antonioperic PHP? • Apache is not built for Real-Time • PHP is not build for Real-Time • Real-Time is not impossible with PHP
  • 36. @antonioperic PHP RTA • Self hosted PHP solution • Self hosted Side-by-Side solution • Hosted solution
  • 37. @antonioperic Self hosted PHP • tightly coupled • two stacks: • sync stack • async stack
  • 39. @antonioperic PHP Self Hosted solutions • React (PHP) • Event-driven, non-blocking I/O with PHP. • Ratchet (Built on React PHP) • WebSockets, WAMP, PubSub samples. No HTTP Fallback • dnode-php (RPC/RMI) • phpDaemon • Lots of examples. Most docs in Russian.
  • 41. @antonioperic PHP Self Hosted solutions Pros: • PHP • Simple integration • Standards-based • WAMP/Autobahn • JS, Android, iOS & more Cons: • No HTTP fallback • Low-level abstractions • Different programming style • You need to scale
  • 43. @antonioperic PHP + Faye Self Hosted solutions Pros: • PubSub • Connection fallback • Redis support is build in • Simple integration Cons: • Not PHP? • You need to scale
  • 44. @antonioperic Other side by side solutions • Socket.IO • SockJS • SignalR • see real time tech guide for more
  • 46. @antonioperic PHP + Hosted solutions Pros: • Simple and powerful • Instantly scalable • Managed & Dedicated • Direct integration into Symfony Cons: • 3rd party reliance
  • 47. @antonioperic What we build? • Real time dashboards ford Google Adwords analytics • Symfony2, AngularJS, RabbitMQ • First version was with Polling • Second version moving to hosted solution - Pusher
  • 48. @antonioperic Other hosted solutions • PubNub • Realtime.co • Firebase • Simperium • see real time tech guide for more
  • 49. @antonioperic References • Phil @Leggetter 
 - Head of Developer Relations at @pusher. Realtime Web Technology Evangelist.
 • Real-time Tech Guide • React (PHP) • Ratchet (PHP) • Faye (Node/Ruby) • Pusher • LopiPusherBundle • github.com/leggetter/realtime-symfonyexamples