I have developed my web application by using Java EE framework EJB 3, at front using JSF.
Now I plan to add chat tool to my web application. All online users can chat with each other.
Can you please guide me which tool I should use to Integrate it with Java EE to develop my chat application? I also appreciate if you provide code or any link.
1- You have to install a pre developed Chat server. There is many available solutions I advice you to choose Ejabberd ( http://www.ejabberd.im/ ). It's a chat server implemented using Erlang and is considered as a highly scalable server. It's the same as facebook chat server, note that facebook used at the beginning only one server to handle all its chat traffic all over the world.
2- You have to integrate a js chat client that will communicate with the chat server. There is also a cool open source solution for that called ijab ( http://code.google.com/p/ijab/ ). You have just to configure it to connect with your server.
3- To add friends and manage interactions between users, you can use a java jabber library and there are many. This library will be used to connect to ejabberd server. You can choose one of the java clients but there are many.
You'll encounter many problems in the configuration of chat so don't under estimate it
Link: Building a centralized connection-oriented Java Chat Server. This tutorial also provides a good overview on socket/network programming.
Related
I am not able to find any implementation of a WS or WSS web socket server created in a Java Swing desktop application.
I am planning to govern multiple clients using a local server, imagine chat room on a local LAN, but I do not wish to host/run Tomcat or Jetty etc to host the server, I want it to be a Java Swing application that I can copy paste on any machine to make it the server and it can have the same chat features.
UPDATE:
Found some very useful topic : Java - Send Message to all Clients
Will follow this.
I am no expert in this realm, but this might help…
Wikipedia maintains a list of WebSocket implementations, both client and server.
You may be interested in the open-source Atmosphere Framework. It supports working with WebSocket but I am not clear if it actually is a server implementation.
Perhaps check open-source projects like Tomcat or Jetty or WildFly to see if their WebSocket implementation might be modularized sufficiently to plug into your app.
I am new to programming with SDK so I wanted to check what is the best way to have an automated interaction between my Java application and Lync.
I did some research online and found this link were you can download and start using the SDK with visual studio. but I want to use Eclipse IDE to do the programming.
SDK download link - https://www.microsoft.com/en-in/download/details.aspx?id=36824
Sandesh Jadhav
This depends a little bit what you wish to perform and which application you wish to write as there exists multiple Lync / Skype for Business SDKs. Based on your posting it looks like you aren´t really sure where to start, so let me create a summary here where you can choose the right SDK from.
With Skype for Business (former known as Lync) you have multiple options to choose from. However it depends if you wish to build an Server or an Client application:
(Source from Screenshot here)
UCWA (is a RESTful Web API that acts on behalf of a single Skype for Business user)
UCMA (is a .NET SDK that provides rich control over a Skype for Business server deployment. It enables applications to automatically route calls and messages, provide automatic responses (IVR or chat bots), record conversations etc.)
Skype for Business / Lync Server SDK
Skype for Business Client (Desktop) API / Lync client managed API
Skype for Business App SDK (designed to work with your iOS and Android app)
Skype Web SDK (set of JavaScript Web APIs and HTML controls that enable you to build web experiences that seamlessly integrate a wide variety of real-time collaboration)
However it depends what you wish to perform and for example if your java application is some kind of mobile one for example.
Depending on your needs you might also have a look into the "Microsoft Bot Framework".
Scenario:
I want to add messaging feature to an eclipse plugin and a web application. Clients are eclipse users, and web application users. Whenever a client posts a message to the server with a specific topic, the web application users browsing that topic should immediately be aware of the incoming message.
What are the current java technologies that handle this scenario? I am searching a clean API, solution.
PS. The system has already spring dependencies, the server is Tomcat 7
You can use XMPP via Smack on the Eclipse client and use an existing web based chat client, or browser friendly XMPP client library for your web interface.
Since you are posting to a topic, I would suggest using either the multi user chat or pubsub extensions of XMPP.
You might want to have a look at the Eclipse Communication Framework: http://www.eclipse.org/ecf/
We have an existing distributed application used by a small company to manage their customers.
The server side component is deployed in the cloud as a simple Java app that manages a connection to a MySQL database.
The client side is implemented as a Java Swing application deployed using JNLP and communicates with the server side using RMI.
This has worked quite well for us so far, but recently we've been looking at how our customers could access the application from mobile devices, tablets (both iOS and Android) as well as from the desktop.
At the minute I'm thinking we should be looking into developing RESTful web services on the server side to manage access to the MySQL database. On the client side, we could use Googles GWT to provide a quick and easy solution for accessing the services from all platforms. Going forward we could implement native iOS / Android apps to access the web services.
Am I am the right track here? Does anyone have any better approaches? Does anyone have any recommendations as to what tools I should be looking at?
The key thing I am interested in is being able to access the server side from any platform. I really don't want to have to implement separate server side implementations for each
Sounds like you are on the right track with the RESTFul web services. If you go this route, you should be covered for the backend. As long as your frontend can do http requests and handle JSON data you will be fine.
Going forward we could implement native iOS / Android apps to access the web services.
It is possible to design a mobile app for deployment on both android and iOS, this could save time on the development effort. To do that you could use, for example PhoneGap, which creates an abstraction layer over the phone hardware, along with something like jQuery Mobile, in which the UI is developed in HTML5 and javascript, and the same code is deployed via PhoneGap on both devices.
PhoneGap: http://phonegap.com/
jQuery Mobile: http://jquerymobile.com/
if there is some other option that lets you deploy the same frontend on android, iOS, AND the desktop, i would go with that, so that you only have one code base for the frontend.
I think your solution (GWT/HTML5) client talking to a server-side "business" layer is a good multi-client solution. RESTful web services are unneccesary in the context of what you have described since the GWT implmentation would take care of the comms between client and server:
GWT client <---> Server (GWT) <---> Database
If you are using a different client implementation (such as iOS), then RESTful services will be very handy indeed (and you wouldn't use GWT):
iOS client <---> Server (RESTful endpoints) <---> Database
HTML5 is becoming provides a decent compromise between broad applicability (many clients) and rich client features. I have seen an article in the past about using PhoneGap and GWT together which sounded like a good strategy for working with GWT (which I like) and gaining access to device-dependent capabilities. All whilst working in an environment where you can (Java-)debug even client code (incredibly useful GWT feature).
Hii,
I want to built a web based chat using j2ee at backend logic.i want to implement the similar way the gmail do,so that performance of application doesnr degrade.please suggest what type of architecture shoul i follow.load of application would be high.
Use what Google used: GWT. They spent years on making it fast and easy to use.
The Jetty web container has a demo chat application which uses Ajax as the gmail chat does and which is not too complicated to learn.
It appears somebody has a Jetty running on http://64.164.6.244:9090/test/chat/chat.html, so you can see what it looks like before downloading and running it yourself.