real time web and mobile application with erlang & ruby programming language
DESCRIPTION
Real time web and mobile application with Erlang & Ruby programming languageTRANSCRIPT
Real-time web/mobile app. Real-time systems
Presented by Bunlong VAN
https://geekhmer.github.io
The Disclaimer
Real-time application?
• Make the web/mobile 'The live web/mobile'
• Update info. on web/mobile without delay & page refreshes
• Enable users to receive info. As soon as it is published
Tech Stack
Websocket?
• Websocket is a new standard for realtime communication
the web & mobile app.
• Websocket enables the server to push data to the
connected clients.
• Multi-user app.Multi-user app.• Real-time app.Real-time app.• App where live data is needed, like stock market app...App where live data is needed, like stock market app...
Websocket? (Con.)
• On web, Websocket support in browser such as Chrome, On web, Websocket support in browser such as Chrome, Firefox, Opera.Firefox, Opera.• On mobile, Websocket support in iOS & Android.On mobile, Websocket support in iOS & Android.• Websocket client on Web use javascripot for requesting to Websocket client on Web use javascripot for requesting to websocket server.websocket server.
Websocket? (Con.)
• On server, Websocket support in: On server, Websocket support in:
Websocket? (Con.)
Front-end MVC Framework
You got ur Erlang in my Ruby
Companies using Erlang
Erlang
• ScalableScalable• ConcurrencyConcurrency• DistributedDistributed• NetworkingNetworking
• Unfamiliar syntaxUnfamiliar syntax• Hard to learnHard to learn• Less documentLess document• Much harder to find developersMuch harder to find developers
Ruby
• Rapid developmentRapid development• Familiar syntaxFamiliar syntax• Human readable codeHuman readable code• Nice codeNice code• FlexibleFlexible• Easy to find developersEasy to find developers
• No Multi-CoreNo Multi-Core• No native threadsNo native threads• Interpreted scriptInterpreted script
What if we can combine the best of both?
• MessagingMessaging• NetworkingNetworking• ScalabilityScalability• DistributionDistribution
• Rapid developmentRapid development• DSL/concise syntaxDSL/concise syntax• Ease of use/installationEase of use/installation
Web server
Erlang
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
Mapping
Ruby/Rails
Processing
How many connections?
No
No
No
No
NoNo
Overflow connections
Web server
Erlang
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
AgentAgentAgent
Mapping
Ruby/Rails
Have solution?
Proxy serverProxy server
Web serverWeb server
Web serverWeb server
Web serverWeb server
Web serverWeb server
Chat System – Registration
Bunlong Linda Dara Nita Ah Vy
Chat Room [ ]0.01, 0.02, 0.03, 0.04 , 0.05
0.01 0.02 0.03 0.04 0.05
Chat System – Sending Message
Bunlong Linda Dara Nita Ah Vy
Chat Room
“Hello” “Hello” “Hello”
[ ]0.01, 0.02, 0.03, 0.04 , 0.05
“Hello”“Hello”
0.01 0.02 0.03 0.04 0.05
Question?
Thank you