I am relatively new to XMPP and Jabber protocol. I am using Ubuntu 12.0 LTS OS. I need to find out various XMPP / Japper message formats that a client needs to send to an ejabberd IM server.
Please let me know what is the easiest way to know them - like chat, shat group, file sharing etc.
Is there any standard library (with example) avaiable on Internet. I prefer to use Python for such a purpose. My aim is to develop a command line tool that can connect to ejabberd server and dump various message formats that client needs to send to an Xmpp/Jabber server.
Thanks in advance
For getting started with XMPP in Python, I recommend the SleekXMPP library. It provides a lot of features, and makes using XMPP very easy. The documentation is good, and it has many simple examples.
While Lloyd is correct about the protocol documentation he links to, I strongly believe that you should get started by using a ready-made library instead of trying to create everything yourself from scratch. You can do that later, if you want, once you understand XMPP more.
All you need to know is here: http://xmpp.org/xmpp-protocols/xmpp-extensions/
For python I believe the current favourite is sleepxmpp: https://github.com/fritzy/SleekXMPP/wiki
For a list of libraries see: http://xmpp.org/xmpp-software/libraries/
Related
I have a requirement of building an chat app using XMPP protocol.I already installed the open-fire and configured MySQL database, i am successfully able to send and receive messages over XMPP. But as per the requirement i want to customized the XMPP and their database, so can anybody guide me how to do that?
Look at the openfire plugin development if you want to extend the functionality of the openfire server. In case if you want to change the openfire server itself, start putting hands in to the source code and read the API spefication docs (perhaps around the defaultauthprovider, hybridauthprovider for databases stuff, not really sure if this can help you).
I am making a chat system and am new to xmpp technology.For server I am confused among ejabbered , openfire or tigase.I don't know erlang.And am good at java.
I am looking in a case where I have to change a user roster again and again everytimes a user logged in.And that too completely.So I am thinking to control user roster by myself and not by xmpp server.Morever I want to control what to do when a user went idle/busy. And many more.And for security it will be great if it can be done on server side rather than client side.
so how should I customize the xmpp server.And as I need to customise a lot which server should I use?Based on how easy its to learn them and customise them?
I have done similar kinds of customization in Tigase. I will recommend you to choose Tigase if and only if you are looking for high scalability . For Tigase scalability look at Scaling Tigase XMPP server on Amazon EC2 . The other part of Tigase is you need to dig into the code on your own there isn't much help available else than Tigase offical website.
In openfire you can get much community support in term of blogs and tutorials as compared to Tigase. But openfire isn't salable as Tigase. Also Openfire has a wide range of plugins available.
One more thing about Tigase is that Tigase maintains in memory rosters once user gets login.
We used Vysper (http://mina.apache.org/vysper-project/) as our XMPP server for custom clients, actually have it within an OSGi bundle so can hot deploy it.
It has needed some updates and XEP work when we needed something more detailed, but has been a great server to get started with.
My App needs to connect to and grab data from a MySQL database sitting on a server. I've successfully interfaced with local SQLITE databases in my Apps, but this is the first time I've had to interface with a remote MySQL database.
I understand this process involves:
1) the iPhone App sending this request to the server
2) some sort of API gets executed and it does the actual "talking" to the Database on the server, and then it returns the query results as XML (or JSON.)
3) the iPhone then parses the returned information and uses it however it needs to.
What I need help with is step # 2 - the API. I don't know PHP, I don't know PERL - do I really have to learn one of these just to write an API? I thought that this iphone-to-remote-MySQL task would be so commonplace that such API's would already be out there, available freely - but I'm not really seeing anything.
I know Objective-C really well - but should I be using XML or JSON for this? Should I be learning PERL or PHP?
any tips or advice would be highly appreciated.
It's hard to give you a definite answer without knowing more precisely what you are looking at, but it sounds like your web service/API part should be quite light. In this case, it should be quite easy to write it in any language. If you know Objective-C well, it should be very easy to pick up some PHP or Ruby.
You mention PHP and Perl. The good thing I see with PHP is that it's available on any hosting service. For instance, with PHP you can make MySQL queries in a few lines of code.
Otherwise, if the web service lives on a machine that you own or if you have more flexibility, it might be easier to write something using Ruby and a small framework like Sinatra.
Regarding using XML or JSON to serialize the data, this will depend on what type of data your API returns. Generally, JSON will be much simpler and the support is good on both side:
- With Ruby, you can see how easy it is to use JSON here: http://flori.github.com/json/
- With Objective-C, you would use NSJSONSerialization available starting with iOS5.
Well you can talk to remote MySQL server using Objective C client directly from iphone
as show here
i am sapna.and we have to develop an application in an iphone having features:-
Identifies a unique user and captures profile.
Admin module / configuration module to assist user define the data points and their bound values.
Support of upto 250 data points to monitor, and monitor upto 50 on the client side
Provide tabbed interface with not more than 10 points of data grouped in a single tab / tag
Output to be generated in text and graphical form
Support iphone features of touch etc
Web service to retrieve point data from the database.
we have learnt that mac os and iphone sdk is required.now for data transfer what is reqiured ? is it API.or web services.what is reqiured.what topics ahoulkd be studied for developing this project.i am fully new to this domain.waiting for your reply.
HTTP rest requests are very easy, and can be architected as non-blocking on the client side. The iPhone has minimal support for XML and JSON is far easier (IMHO) using one of the json libraries such as those here.
You may want to use the deviceID as the unique user identifier (depends on your definition of unique I guess)
To learn iPhone programming, I can highly recommend the CS193P course available (at the moment) on iTunesU.
For web transfers, you can do HTTP REST very easily so I would architect your server side to talk very simple HTTP. There is built-in support for XML, but you will have to parse results from the server manually.
For Tab UI support, you can just look at the examples included in the SDK, it's not difficult.
For graphical output, you will want to create your own UIViews that override the draw function. You will have to learn the CoreData API in order to produce high-quality renderings.
If you are new to this, and are more familiar with C# or even Java, I highly recommend looking at the MonoTouch system.
First of all u need a Mac based system and the iPhone SDK installed. I think you are trying to make an iphone version of the web application. it will be better for you to download the MAMP(Macintosh Apache MySQL PHP) Server and install it to debug your application. its simply the mac version of WAMP and LAMP. (hope you are familiar with PHP).
You can then configure you MAMP for debugging and once the debug is complete you can host these PHP files to the actual server.
Remember, you need to get the results from the server in the XML format. and you need to write code to parse the XML you generated at the server.
Hope this information is helpful.
I want to connect to a remote database(MySQL or SQL Server or Oracle) via internet from my native iphone app. I can't find any API or Framework in System to add. does any one know how to connect to a remote Database? pleased help me. Thank you very much
I'm not an iPhone programmer, but I would suspect you want some abstraction going on.
Instead of trying to make a native database connection work, consider writing some service layer that talks to the database on the back-end, and speaks HTTP to your client application.
Plenty of very good reasons for this. Security concerns chief among them.
One way to do it would be to setup an HTTPS server that wraps your requests. Submit your queries via HTTPS POST. The server setup would be pretty basic and it gives you the chance to do any post-processing before sending it over the wire.
The best alternative is to use webservices to access the information stored remotely.
Bye.
Disclaimer : Shamelessly plugging my own product :)
We've built an online system called Kumulos that allows iOS and OSX developers to build and host online databases in the cloud, while easily creating custom API methods for accessing it. It even builds all the Objective-C bindings for you.
Its really really easy to use and its free while in Beta. We'd love some honest developer feedback :)
Check it out here