Further Progress in JSXC

It’s been really a long time since I wrote my last blog. Now let’s see what has been done in these last 7 days.

So, when JSXC was finalized, I and Ranvir started figuring out what should be done and how it should be done. So, the first thing we come up with is to solve this issue : https://github.com/jsxc/jsxc/issues/150 . According to this issue, the chat application doesn’t save the history in the server but saves it as a cache in the browser and thus causes loss of the chat history on trying to access the application from different system or different browser.

Now, to solve this problem, we actually have to add XEP-313 feature to our app. And the great thing is that we don’t need to do it from scratch as there is already an implementation of this feature present in the strophe.js library. Strophe.js is an XMPP library for JavaScript. More information about it can found in here -> http://strophe.im/strophejs/ . The feature can be added to project using the strophe.mam.js file which can be found in here -> https://github.com/strophe/strophejs-plugins/tree/master/mam . Now, the only thing to do is to add this feature using the functions provided by this library.

But here comes the real problems, the project in whole is a collection of complex and big files and adding this feature will affect the core of this chat application. So, we started to converse with the real developer of JSXC and he guided us to make a new pull request by making some changes in the files which would make the project ready for using the mam plugin and new policy for it will be discussed in there. Here is the link to pull request -> https://github.com/jsxc/jsxc/pull/432 . Currently, we are discussing on how it should be used in the app and when we have to use it.

We have also changed our default remote directory for SunehaG web client. Here is the link -> https://github.com/singh1114/jsxc/tree/sunehaG . All the work regarding the SunehaG web client will be done in the sunehaG branch and work regarding the mam feature will be done in the feature-mam branch.


JSXC – Our Final Web Client

As in my last blog, I told about discussing the final client from JSXC, Candy, Converse and Kaiwa. So, on last Saturday, we discussed on some matters like simplicity in program, developer’s help, programming language need and how much work to be done on the client. And by comparing all the clients, we came to conclusion that we should use JSXC and move on with it.

Here are some links that are related to JSXC:

Currently, our main objective is to add message archive management (XEP 313) feature to JSXC. After attaining it, further features will be added like user images (XEP 84) and last message editing (XEP 308).

Moving For a Final Call

Today, I started with the aim that I will finish every client work and will create a clear picture of the lacking features in clients. So, I started with Kaiwa and found some problems:

  1. No bookmarks: It literally doesn’t support XEP-48 which is the basic in most clients.
  2. No Support for file transfer.
  3. Most of all, the developers are not responding to any issue since 2015. So, no one has a clear idea of the issues it generates.

So, after finding the bugs in Kaiwa, I went on to Converse and Candy on which Ranvir has worked previously to explore more about them. I found following problems in Converse:

  1. It shows all the rooms to the users for joining, even the ones which the user is not supposed to.
  2. No support for adding avatar.
  3. No support for file attachments.

and for candy:

  1. No avatar.
  2. No file transfer.
  3. No carbon copy.
  4. Doesn’t support MAM ( Message Archive Management )

I have to say that the android client conversations which our SunehaG app is using is really a great app as it is using all the latest features of XMPP and is constantly being updated.

Now, our aim is to choose a web client which will be most compatible with our android app. So, I have listed down the main features of conversations and compared the major web clients according to it.

Conversations Features JSXC Kaiwa Converse Candy
XEP-48 : Bookmarks ✔* ✔*
XEP-84 : Avatar
XEP-234 : Jingle File Transfer
XEP-280 : Carbon Copy
XEP-313 : Message Archive Management
Project Status Active Inactive Active Active
✔*: It shows that the feature has not been implemented fully.

Now, I think that we should schedule a meeting to discuss the final web client.

Welcome to Kaiwa

Today, I installed Kaiwa on my system and came to know some facts about it:

  • It was made specially for prosody server but now it can be used with many other XMPP server which uses websocket or bosh server.
  • It is written in node.js ( which I don’t know – need to learn )
  • Looks like it shows problem in Chrome browser for some users. ( need to explore )
  • It has to be run manually every time using node. ( Ranvir told me that there are some tools which could automate this task )
  • There are some new variables which I need to learn like muc, wss and startup.
  • It has no wiki. ( That’s the most disturbing part )

I figured out some values for the muc and wss variables and made it to work. But there is one problem that it is showing all the rooms in the bookmarks tab. I need to check it on the server which the SunehaG app is using.

Leaving JSXC

Today, while reading all about XMPP extensions. I found out that the JSXC client uses XEP-0136 for message archiving which was added to XMPP in 2010. According to which, every client saves its history on the local system and no message archive is saved on the centralised server. This extension generated problems for the systems which doesn’t allow the web apps to save their data on local storage. Also, this was the main reason for showing different history on different browsers on same system.

To solve the above problem, XMPP added new extension, XEP-0313 (Message Archiving Management) in 2016. It allows the users to store their messages in a central archive on their server. It allows them to record conversations that take place on clients that do not support local history storage, to synchronise conversation history seamlessly between multiple clients, to read the history of a MUC room, or to view old items in a pubsub node.

Now, this feature has been added as an future enhancement on JSXC github repository. So, looks like we have only two options left: 1. Write the code to add this feature to JSXC or 2. Move on to another client. Since, Ranvir showed me another client on which he was working for some time, Kaiwa. It’s working but with lots of problems. And for writing code to add this feature will require me to learn object-oriented JavaScript first which will take so much time and I don’t have that. Thus, I have decided to move on to Kaiwa.

New clients and JSXC update

Today, I first of all updated my jsxc repository as it was 16 commits behind from the original repository and to my surprise it solved one of my problems. Problem was that when you bookmark a group and logout and then login from other browser, the group shown in the bookmark needed to be joined again.

I also tried some new clients:

  1. SparkWeb : It doesn’t support ejabberd (really hard to find this information).
  2. Trillion : It’s not open source.
  3. XMPPwebchat : It’s no longer maintained.
  4. Tigase web client : It only supports tigase web server.

So, no luck today 😦 . May be next time.

Recollecting old work

Today, I restarted Sunehag web client project on which I was working since mid-october and had to put it on hold due to exams. Now, exams are over, so I can again start my work on it.

I recollected all the works that has been done by me, Ranvir and Tamandeep. Following are the up to now result:

  • Let me first list all the goals of the web client:
    • should support ejabberd.
    • Login using just college id without need to mention server name.
    • should have group and private chat option.
    • to have static groups.
    • to be able to add, delete, block contact.
    • should be able to bookmark contact or group.
    • should support attachments.
  • We have tried some clients which are listed at http://xmpp.org/software/clients.html . Below are the list of clients which we tried and what problems we faced in them:
    Client Cons
    • no chat history
    • interface not satisfying

    Yet to explore more..

    • Doesn’t support attachments.
    • Shows all the groups even the ones which were not supposed to.
    • Didn’t worked for mobile platform.
    • Doesn’t show chat history
    • Doesn’t show bookmarked groups by the app.
    • Bosh server configuration didn’t work. So, can’t be checked.
    • Project no longer maintained
  • Out of the working clients, we chose JSXC because:
    • Support integration into any website.
    • Nice interface.
    • Works best with most browsers.
    • Active developers group.

    We started debugging the problem and still we are.