real time web and mobile application with erlang & ruby programming language

22
Real-time web/mobile app. Real-time systems Presented by Bunlong VAN https://geekhmer.github.io

Upload: bunlong-van

Post on 22-Apr-2015

228 views

Category:

Technology


2 download

DESCRIPTION

Real time web and mobile application with Erlang & Ruby programming language

TRANSCRIPT

Page 1: Real time web and mobile application with Erlang & Ruby programming language

Real-time web/mobile app. Real-time systems

Presented by Bunlong VAN

https://geekhmer.github.io

Page 2: Real time web and mobile application with Erlang & Ruby programming language

The Disclaimer

Page 3: Real time web and mobile application with Erlang & Ruby programming language

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

Page 4: Real time web and mobile application with Erlang & Ruby programming language

Tech Stack

Page 5: Real time web and mobile application with Erlang & Ruby programming language

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...

Page 6: Real time web and mobile application with Erlang & Ruby programming language

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.

Page 7: Real time web and mobile application with Erlang & Ruby programming language

Websocket? (Con.)

• On server, Websocket support in: On server, Websocket support in:

Page 8: Real time web and mobile application with Erlang & Ruby programming language

Websocket? (Con.)

Page 9: Real time web and mobile application with Erlang & Ruby programming language

Front-end MVC Framework

Page 10: Real time web and mobile application with Erlang & Ruby programming language

You got ur Erlang in my Ruby

Page 11: Real time web and mobile application with Erlang & Ruby programming language

Companies using Erlang

Page 12: Real time web and mobile application with Erlang & Ruby programming language

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

Page 13: Real time web and mobile application with Erlang & Ruby programming language

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

Page 14: Real time web and mobile application with Erlang & Ruby programming language

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

Page 15: Real time web and mobile application with Erlang & Ruby programming language

Web server

Erlang

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

Mapping

Ruby/Rails

Processing

Page 16: Real time web and mobile application with Erlang & Ruby programming language

How many connections?

No

No

No

No

NoNo

Page 17: Real time web and mobile application with Erlang & Ruby programming language

Overflow connections

Web server

Erlang

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

AgentAgentAgent

Mapping

Ruby/Rails

Page 18: Real time web and mobile application with Erlang & Ruby programming language

Have solution?

Proxy serverProxy server

Web serverWeb server

Web serverWeb server

Web serverWeb server

Web serverWeb server

Page 19: Real time web and mobile application with Erlang & Ruby programming language

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

Page 20: Real time web and mobile application with Erlang & Ruby programming language

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

Page 21: Real time web and mobile application with Erlang & Ruby programming language

Question?

Page 22: Real time web and mobile application with Erlang & Ruby programming language

Thank you