Comments (11)
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
What would be the benefits? I don't use it because I am not familiar with them and I want to keep this library lighweight. Java's Socket is perfectly fine I think.
AFAIK those frameworks are useful for server architectures, which need to handle several thousand connections, but this scenario is unlikely for a client.
Also, non-blocking IO would likely increase the complexity.
from babbler.
Original comment by Julien Herr (Bitbucket: [Julien Herr](https://bitbucket.org/Julien Herr), ).
Yes, I understand the lighweight argument.
And you right about the server needs too. But does it mean it won't be a "good" idea to build a XMPP server or proxy (from/to another protocol by example) with babbler?
The most benefits I see for this kind of framework is to use non-blocking IO without "complexity". But I'm not enough familiar with them to determine if it could be a good or bad idea (that's why I asked).
FYI, Async-http-client is a http client which has an netty and grizzly implementation (but right, its main goal is to be async).
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
It's not intentend to act as a server or proxy, it's only a client library.
Theoretically you could use the xmpp-core project and build your own server/proxy, I guess.
It has only the "model" classes, which are mapped to XML and which are shared between server and client, e.g. Message, Presence, ...
The whole business logic needed for a server is not part of this project, though.
from babbler.
Original comment by Julien Herr (Bitbucket: [Julien Herr](https://bitbucket.org/Julien Herr), ).
Ok! If I understand well there is no use case where a "client" will be connected to multiple servers?
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
You can do that of course. E.g. Adium client allows for multiple concurrent accounts. But the amount of concurrent sessions is usually only a few, if at all.
In this case you can connect each session in its own thread.
I can only hardly imagine a client, which wants to manage thousands of concurrent connections to different servers.
The connect() and login() methods are blocking methods anyway. Doing this asynchronously would mean a lot of work, a whole new concept and probably also a lot of more complexity to the user of these methods.
from babbler.
Original comment by Julien Herr (Bitbucket: [Julien Herr](https://bitbucket.org/Julien Herr), ).
So, it seems my idea wasn't so good after all! Just a sledge hammer to kill a ant :p
Thank for you feedback :)
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
Maybe one day, far in the future, we can reconsider this ;-)
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
I told you, maybe one day this issue will be reconsidered.
After 3 years, that day has finally come!
Implementing NIO support was a lot of work, but I finally did it:
a9ce40d (among many other commits).
There will be a new connection method using NIO (Netty) starting with version 0.8.0.
from babbler.
Original comment by Julien HERR (Bitbucket: [Julien HERR](https://bitbucket.org/Julien HERR), ).
I'm not playing with xmpp anymore but it's awesome!!! Great job :)
Did you show perf improvments?
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
I didn't do real performance tests. I've created 100 concurrent sessions with blocking and non-blocking IO and stopped the time, but both approaches performed very similar.
That doesn't surprise me, afaik NIO doesn't perform faster, it just safes resources (threads).
from babbler.
Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).
A Netty implementation is available since 0.8.0
from babbler.
Related Issues (20)
- Customized websocket code HOT 3
- Unable to use xmpp-websocket-client from Java module HOT 1
- Timeout while waiting on advertised authentication mechanisms HOT 1
- Add support for see-other-host HOT 1
- DataForm (NodeConfiguration, etc) toBuilder or something similiar
- How to correctly embed Babbler into third-party application? HOT 9
- cannot enable stream management HOT 9
- SSL problems result in an exception that seems to be a circular-referenced-suppressed exception
- SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports
- Java 11: Run into JAXBException HOT 1
- JAXB default annotated classes not implemented
- Connection issues since 18f0f9a50504 HOT 1
- Consider placing application data to a more appropriate path on linuxes HOT 2
- The method setNode(String) is undefined for the type EntityCapabilitiesManager HOT 3
- Failed to connect ejabberd to external component HOT 2
- addInboundMessageListener is not trigerred when sending/receiving a message HOT 13
- sending files to offline users HOT 1
- File transfers are not available since 0.9 HOT 2
- addInboundMessageListener on ChatRoom not working since upgrade from 0.7.4
- XEP-0107 update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babbler.