
Next point your browser to and add “IBM” and “AAPL” symbols, you would then see quotes for both symbols, e.g. Note, that the web server will be continuously running, so you can open a separate shell before typing above command.Ĭreate two separate shells and type following command in first shell:Įrl -pa ebin deps/exmpp/ebin/ deps/lhttpc/ebin/ deps/yaws/ebin -boot start_sasl -run quote_publisher start AAPLĮrl -pa ebin deps/exmpp/ebin/ deps/lhttpc/ebin/ deps/yaws/ebin -boot start_sasl -run quote_publisher start IBMĪbove commands will start Erlang processes, that will poll Yahoo Quotes every second and publish the quotes on the node AAPL and IBM respectively.
Ejabberd sucks code#
Though, the web code including Srophe library and Javascript can be run directly in the browser, but you can start Yaws to serve the application as follows:Įrl -pa ebin deps/exmpp/ebin/ deps/lhttpc/ebin/ deps/yaws/ebin -boot start_sasl -run web_server start To build all sample code and dependent libraries Git clone sample code depends on exmpp, lhttpc, jsonerl, and yaws modules so after downloading the code, checkout dependent modules usingĪbove commands will checkout dependent modules in deps directory.īefore building, ensure you have make and autoconf tools installed, then replace with your in docroot/index.html and src/quote_utils.hrl. I have stored all code needed for this example on, that you can checkout using: As, we will be using PubSub protocol, you can discover available nodes or topics using General->Service Discovery from the menu, e.g.
Ejabberd sucks password#
You can then login using with password consumer.
Ejabberd sucks install#
After you download, you can install and specify your local hostname as a server, e.g. You can debug XMPP communications using a jabber client such as Psi, which you can download. Sudo /Applications/ejabberd-2.1.3/bin/ejabberdctl register consumer consumer Sudo /Applications/ejabberd-2.1.3/bin/ejabberdctl register producer producer We will be creating two users: producer and consumer, where the former would be used for publishing stock quotes and latter would be used for subscribing quotes on the web side, i.e., and you would be able to see available nodes, users, etc. The ejabbered comes with a web baesd admin tool, that you can access using Applications/ejabberd-2.1.3/bin/ejabberdctl startĪs, I am using Mac, the actual path on your machine may be different. Once installed, you can start the ejabbered server using For this tutorial, we will be running ejabberd on a single. You will be asked your host name, admin account/password and whether ejabberd would be running in a clustered environment. I will describe a simplified implementation of the quote server using Yahoo Quotes.ĭownload Ejabberd and go through the installation wizad. Recently, I have been building a stock quote server at work that publishes financial data using using Ejabberd, XMPP, PubSub, Exmpp and Bosh on the server side and Strophe library on the web application front.
Ejabberd sucks software#

OCActiveObjects: ActiveObject based O/R Mapping framework for iPhone development.Applying Adaptive Object Model using dynamic languages and schema-less databases.Dynamic Inheritance and Composition using Object Extension Pattern.PlexRBAC: an open source project for providing powerful role based security (II).PlexRBAC: an open source project for providing powerful role based security (I).A few recipes for reprocessing messages in Dead-Letter-Queue using ActiveMQ.Favorite fifteen tips from "Rework" book by Jason Fried and DHH.Building a stock quote server in Erlang using Ejabberd, XMPP, Bosh, Exmpp, Strophe and Yaws.A few lessons from Seth Godin's book Linchpin: Are You Indispensable?.NoSql databases bring "Stored Procedures" back in fashion.Implementing a Single Sign-on solution for Wordpress (PHP) and Rails applications using Central Authentication Service (CAS).Popular blogs entries from my blog ( sitemap):
