how to develop similiar app like whatsapp?
If you imply similarity in scale, then this might be helpful http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html. You can also read the sources of https://github.com/esl/MongooseIM and https://github.com/processone/ejabberd. But know that they are not pretty, especially the latter with lots of nested
cases all over the place, which make the code hard to follow.
If not, then you can look at many articles making chat apps on the internet, including several with phoenix/elixir.
Well, this is a bit vague.
Could you please tell us what you have already tried, what ideas you have, etc?
Doing so might be a lot more helpful and easier for us to point you to the right direction.
One of my suggestions, and as @idiot said above, would be to search for articles, blog posts or maybe GitHub repositories which have chat applications written in Python or Ruby. As these programming languages are similar in syntax to Elixir, I believe it will be fairly easy to “translate” the code / flow of the application into Elixir or Phoenix.
This will also be a good way to evolve your Elixir skills and face a bit of a challenge.
Good luck mate!
Most definitely not. The structure and organization of a competent Erlang/Elixir implementation would look nothing like the Python/Ruby version.
And I did not say that you have to copy it line by line, that would be obviously impossible.
Most web applications work very similarly despite using different technology stacks, and thus it is not hard to implement an existing one in a new stack just by reading through the available source code.
In Erlang/Elixir you only need a web server if you intend to use a browser.
Also Ruby/Python web server frameworks are not typically based on OTP design principles.
This is not true - although Elixir’s syntax looks familiar, under the hood it is very different; Languages like Ruby are not concurrent, fault-tolerant or distributed in the way that BEAM languages are.
I was actually thinking about this earlier - in Ruby, I would be concerned about app design, for instance, a blog has a post and many comments etc and that is the sort of thing you mostly concern yourself with in languages like that. But in Elixir, you are more of a systems architect - where you think about how the software will work in a distributed environment, concurrently and able to recover from faults and crashes. It’s a whole different paradigm
It will become clearer to you as you read more about the language
Yeah as others have noted, this is fundamentally incorrect. There is no comparable feature in Ruby or Python to Elixir’s processes, and thus they’re gonna reach for Redis or similar technologies to do stuff you would do within Elixir itself.
If you need any proof of this, consider Phoenix PubSub / Channels vs Rails ActionCable. Completely different architectures.
The learning curve with Erlang/Elixir typically goes through three distinct phases:
- Sequential programming - the same type of “programming” you’d expect in Python or Ruby (only functional )
- Concurrent programming - using the concurrency primitives spawn, send, receive to divide work into units (BEAM processes) that work together to get something done. But because of the emergence of the various edge cases that keep coming up that you don’t want to be dealing with again and again you move on to
- Developing OTP applications. Basically you are using battle-tested code templates (behaviours) for BEAM processes to build your own applications. And OTP applications work together to solve a larger problem
Phoenix is an OTP application, Ecto is an OTP application and your code is an OTP application working together with them. Now the Phoenix team has arranged it that simple web-applications can be implemented just within Phoenix - but the primary recommendation is to keep your application separate from Phoenix in order to have the opportunity to grow.
Storing logic / functions
I’ve been thinking the same recently too (particularly as I’ve been going through @sasajuric’s book (which I’m loving btw) and this is how I have been exposed to it all).
Also been toying with the idea of switching the last point (when speaking about Elixir in a more general manner) to simply say that Elixir/Erlang comes with a built in framework that makes things you commonly do with processes, easy. (Still need to read more about it all tho - currently 80% of the way through EIA, whoo hoo!)
Thanks ac-lucusta-singula! I am looking to build chat app for my business. I dont have any knowledge in coding but i need smart place to build an chat app…
If this is for your business, you should look to integrate an existing chat service. Building a chat service for a business without any code knowledge does not seem wise to me.
We can definitely get you on your way, but from a business perspective it seems like a strange thing to spend time on if it isn’t already a core competency.
Thanks Benwilson! I agreed with your point. Its not necessary to have coding knowledge and Am looking for something like readymade solution pack to build a chat app.
If you just want to talk to your customers look into integrating something like https://www.intercom.com/ onto your website. Integration is relatively painless and the service is well designed. If you do actually need to build a custom chat application, you will find all the pieces you need in elixir / phoenix.
Big thanks to all who suggested the ideas and thoughts. Analysed many ways and now using the solution**Contus Fly** to build my chat application.
The big tasks that go into building chat app include backend development, frontend and web app, design, native platforms, and quality assurance.
Having thus listened essential chat app features, the approximate starting costs for Chat App development is can range from anywhere between $30,000 to $55,000, to up to $120,000. These costs are dependent on your team’s hourly rates.
The process of building the app itself can take up to 1400 hours by a team of experienced developers (integrating a messaging functionality can take up to 150 man hours on its own, and multimedia transmission taking a bare minimum of 100 hours, for example).