Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am doing some research related to Java NIO. I need to find some representative
applications that are based on this framework. Please feel free to suggest! The more, the merrier!
Thanks
The Apache MINA Networking framework is built on NIO (and is used by many applications to provide high-performance networking).
Apache MINA is a network application
framework which helps users develop
high performance and high scalability
network applications easily. It
provides an abstract · event-driven ·
asynchronous API over various
transports such as TCP/IP and UDP/IP
via Java NIO.
Apache MINA is often called:
NIO framework · library,
client · server framework · library, or
a networking · socket library.
However, it's much more than that.
Please take a look around the list of
the features that enable rapid network
application development, and what
people says about MINA. Please grab
yourself a download, try our Quick
Start Guide, surf our FAQ or start
join us on our community
I believe JETTY uses continuations to support 5000+ HTTP Comet connections using Servlet 3.0 continuations.
Also you can look at a BlazeDS NIO implementation (basically an opensource LCDS).
http://blogs.webtide.com/athena/entry/asynchronous_blazeds_polling_with_jetty
Netty:
Netty is a NIO client server framework
which enables quick and easy
development of network applications
such as protocol servers and clients.
It greatly simplifies and streamlines
network programming such as TCP and
UDP socket server.
Grizzly, a HTTP connector, makes use of NIO. It's been used in Sun Glassfish Java EE application server and is available in Apache Tomcat Java servletcontainer as well. It not only enables Comet (sort of HTTP push idea), but it also scales damn good, it can go up to ~20.000 concurrent HTTP connections on a single thread instead of ~5.000 concurrent HTTP connections on that much threads.
Rabbit web proxy is using NIO.
But before jumping on the NIO bandwagon, I'd recommend you to read this.
I believe Adobe LCDS runs off Java NIO.
I started an open source project on SourceForge called JInSim that uses nio. I'm no longer an active developer on it, but I'm sure that part is still the same. It's a smaller scale library that allows people to write clients for the auto racing simulator Live For Speed.
JInSim link
Jetty, the popular web application server, can use NIO. Check out the different socket connectors. Jetty can also use continuations for handling asynchronous web requests.
Project Voldemort, a distributed key/value store, can also be configured to use NIO for socket connections and uses parts of the library for reading from it's read-only data store.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to create simple server having low load. The goal is to give a few javascript clients access to some functionality implemented in Java through WebSockets. I seek for best library to use for that - it should be simple, robust etc. Now I consider 3 alternatives
- jWebSocket
- jetty
- netty
What is the best? Or may be something else?
Thanks in advance
I'd go with proven Java servlet servers: Jetty or Resin. The have both been extended to handle WebSockets:
Jetty WebSockets
Resin WebSockets
My personal choice would be Jetty, as it's very simple to use and I've been using it as embedded server in several projects.
There are also some new kids on the block like Atmosphere and jWebSocket, but for servers I prefer to go with a proven solution. Jetty and Resin are also generic Servlet servers, so you can go with one product for all your serving needs.
jWebSocket now includes the Jetty 8.0 engine including SSL and includes many nice-to-haves on top of it. It provides cross-browser and cross-platform compatible clients even more mobile apps e.g. under Android, Symbian and BlackBerry. The server can easily be extended with plug-in and already includes lots of them (e.g. for Authentication/Autorization, JDBC, SMTP, XMPP/Jabber, RPC, Twitter, Filesharing, Chat etc.). Just check it out... http://jwebsocket.org. Looking forward to your feedback.
Regards
Alex
The PlayFramework! is the other very good option.
FYI, Atmosphere run on top of Resin, GlassFish and Jetty. Atmosphere free you from being stuck with one server by giving you Websocket portability amongst Websocket server. It also offer a client library that can be select the best transport in case websocket isn't supported by the browser. So you can't compare Atmosphere with Jetty or Rsin
Take a look at Atmosphere. Here is an article about websocket and atmosphere.
While I value the implementations of JWebsockets and Autobahn a lot, I prefer Atmosphere.
Ramp-Up::
Ramp-Up time is low. Francois Arcand puts a lot of effort into testing and examples, helping everyone to achived quick wins. (And I have no clue why he's able to respond so quickly to any architectural questions I rise. Impressive.)
Maintenance Perspective::
To me, maintainability is fundamental, if a software goes beyond major release version 1.0.0. The project is maintained at a top Maven-POM level with a properly constructed hierarchy. It prevents library incompatability. Libraries are reference at the correct level. That is well done.
Technical/Functional Perspective::
It offers a Java SE client library (wasync) that can either do native websocket communication (onMessage) or build on Jersey REST annotations (#Path). Subsequently this makes it as simple as it gets with the benefit of maintaining an open connection for subscriptions and the popular remote procedure calls (RPC) paradigm. It is a common attempt to merge those two paradigms. See also http://wamp.ws/, which heads for the same approach. Also, the library offers to establish QoS properties like robustness (e.g. in case a client disconnects) and reliability (caching undelivered messages). That is great for professional software to harness.
Maybe you should try Bristleback Server? Using Bristleback, you may choose from several WebSockets engines, like Jetty, Netty and Tomcat. You can have standalone server as well as web application that uses WebSockets (Jetty and Tomcat 7). Bristleback uses Spring Framework. If you have worked with web frameworks like Struts, Stripes or Play!, it will be very easy for you to start. Of course, Bristleback has its own JavaScript client library for even easier development.
Full disclosure: I am one of the co-creators of Bristleback Server.
I would also add vert.x to the list. It can server Websockets and SockJS (websocket emulation when the browser doesn't support them).
Update:
Undertow http://undertow.io also supports websockets.
Follow my blog. I'll be ready for release sometime in the not too far off future. Light-weight has been emphasized through the whole thing - but it's also fast. I don't know yet how well it will ramp up to higher loads. But I've been running the demo for a while now with relatively low load and what I have has been working well. (I'll test heavier loads later and make sure that it can be ramped up.)
http://highlevellogic.blogspot.com/2011/09/websocket-server-demonstration_26.html
If you are looking for infrastructure around message management, user grouping ("rooms"), and data synchronization ("shared variables"), you might want to consider Union Platform:
http://www.unionplatform.com
[Full disclosure: I am one of the co-creators of Union]
Why don't you just write your application on an open standard like JMS, and let the clients sit on the JMS bus as message clients?
The whole point of websockets is to bring any native TCP protocol directly to the client instead of converting it from your back end to http request/response.
Your back end services would talk to a JMS broker like ActiveMQ, and your clients speak AMQP in the browser via a Javascript API that looks just like the JMS API in Java. All you need for that is a websocket gateway, for example Kaazing has such a gateway, all it does is route your JMS TCP traffic out to the web clients over websockets. They also provide fan-out so that you don't overload your JMS bus, i.e. you just use a handful of connections to the broker to offload a million browser client connections.
The bottom line is that you don't need to tie yourself to any specific platform. Stick with standards, that way you have 100% freedom to swap out components as your environment changes.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What's the best method for performance testing Flex applications with a BlazeDS/Java severs backend. We're looking at JMeter but can it be used with the amf the protocol at a more sophisticated level where values in a request can be manipulated?
My Company (UBIK-INGENIERIE) distributes a commercial Flex/AMF Apache JMeter plugin.
You can easily record, variabilize and replay FLEX/AMF based application with standard knowledge of Apache JMeter.
See a tutorial on it:
Performance testing Flex applications
https://www.ubik-ingenierie.com/blog/load-testing-flex-with-jmeter-made-easy/
https://ubikloadpack.com
We are having the same issue. I will definitely look into www.gorillalogic.com for our site.
Another option (which we overlooked) was choosing LiveCycle Data Services ES2 instead of BlazeDS. While BlazeDS met our functional needs, LiveCycle comes with a Load/Stress tool... something that we really could have used.
Here is the comparison chart:
http://www.adobe.com/products/livecycle/dataservices/compare.html
Try Neoload
http://www.neotys.com/
(haven't checked it yet myself to be honnest, but I will do it soon)
The "Java AMF Client" API might help you here. It's a Java API for building and sending AMF requests to the server.
http://opensource.adobe.com/wiki/display/blazeds/Java+AMF+Client
I've also heard good things about Gomez but I believe it's a pay service and will require some overhead to get up and running. But if you're looking for a more comprehensive solution, many people in my company have used it on projects with a Java / BlazeDS backend.
http://www.gomez.com/
Neoload will cover LCDS, BlazeDS, JBoss, WebLogic, WebSphere, PHP, .NET
We chose it as our tool for testing a Flex app after looking at several options.
You can alter the requests and pass in any variables you like. Very easy to use but it's not free.
I have tried both NeoLoad and LoadRunner. We had more success with LoadRunner. The only problem was that we had to manipulate the LoadRunner configuration of the generators (including the machine we scripted with in vugen) to allow enough memory to handle the massive requests that Flex made. We were able to run far fewer vusers on generators that tests Flex than those that tested http since each vuser used more memory. It was about a 10:1 ratio or fewer.
Currently, there is no perfect solution for amf encode/decode in JMeter.
Something you can try:
Find a programmer (good at Java) develop JMeter plugin for amf
encode/decode, according to our experience, it is not hard and our
plugin works fine in the following projects. the plugin should be
able to decode AMF request when you record request by proxy and easy
to customize the parameters within the request.
Use the charles record the amf request, and attach the data package
in JMeter http sampler. it works when the app is not complex.
Use loadrunner or other commercial software if you can afford.
The best answer for automated testing of Flex application is FlexMonkey - www.gorillalogic.com
The tool is open sourced, can be used in CI environments, has over 5,000 users and is supported by Gorilla Logic (Jave, Flex and mobile development consultants).
Check it out and if you would like more information or a demo, let me know.
Chad S.
Gorilla Logic
Is there a demand out there for a small, lightweight, Java 7 based open source project that is geared toward making Cloud services more elegant? I have written several servers in my lifetime, and was curious if there was a need for this.
My thoughts were to keep it simple, lightweight, and use the Java 7 NIO 2 functionality for network communications. I was also thinking of using either a broadcast address for local cloud based communications between servers in a rack solution (MBONE) or a serialization-based communications protocol.
I don't want to use Spring or Tomcat, as they are overweight, and they are written on older Java technology. Furthermore, I don't want to use another Apache project because it's too dependent on Apache technologies. Keywords here are "small", "lightweight", "portable", and "efficient".
Maybe this will even have the potential of being installed and used in mobile devices as background servers, or even mobile cloud networks.
From my own point of view, no.
If I want a lightweight servlet server, I use Jetty.
If I want a more powerful, versatile Web app server, I use Tomcat.
If I want a full J2EE server, I use Glassfish.
All of these are of course highly proven. Memory is cheap enough these days that I'm not very worried about a little bloat. That comes standard with Java apps :)
Also, I'd consider it crazy to deploy server technology on mobile devices. Maybe other people have bright new ideas, I think mobile devices should communicate with central servers.
I would probably not want to use a Java 7 server not based on J2EE, at least the servlet part, unless someone comes up with a really compelling alternative. On the other hand, I wonder how small you could make a compliant server.
Finally, as far as I know, Tomcat already (optionally) supports nio: http://tomcat.apache.org/tomcat-6.0-doc/aio.html .
Strictly a personal opinion from an old curmudgeon.
I'm writing/porting a C++ HTTP event server to Java. I'm wondering what are the best paradigms for implementing comet with Jetty, Tomcat, any other server, or natively.
Threaded
Continuations
NIO
Servlet 3.0
Scalability is an absolute must as I'm developing a new protocol that uses up to 3 concurrent connections per client.
Any help is appreciated.
PS: If possible, I would love to also see some sample code or tutorials..
We've had a lot of success with Caucho Resin's LongPoll features (the majority of the data to our UI comes in over Comet). Caucho has also added support for WebSockets, so if you have an HTML 5 client you can benefit there too.
On Linux they have some custom JNI code that talks directly to epoll, which allows the server to scale well.
Glassfish has native comet support and I thought there was WAR for comet support in tomcat from the Glassfish team. Jetty also seems to be leading the crowd. Am I misunderstanding, but why are you trying to re-implement comet in a Java app Server?
Or you can drop Comet and go WebSockets: http://www.jWebSocket.org
I've been looking into Comet myself the past couple days. My company uses Tomcat in development and WebLogic in production. We'd like to incorporate Comet without shaking up our existing application. I've been impressed with Atmosphere's APIs. It focuses on the server side, allowing for portability while taking advantage of native server features like NIO. They seem to be putting out updates every month.
https://atmosphere.dev.java.net/
What is the functional equivalent of Windows Communication Foundation in Java 6?
WCF offers several communication options. A nice presentation is this white paper by David Chappel. There the following options are described:
Interoperable Communication using SOAP and WS-*
Binary Communication Between WCF Applications
RESTful Communication
Communication using POX, RSS, and ATOM
Communication with Line-of-Business Applications using Adapters
Communication via Message Queues
Communication via Windows Peer-to-Peer Networking
Communication Between Processes on the Same Machine
Custom Communication
Although some options are not relevant to Java (e.g. the second one), it may help you to identify the corresponding functional equivalents in Java.
I don't know what all WCF contains, but JAX-WS (and its reference implementation Metro) might be a good starting point.
Some of the other technologies in J2EE may apply as well.
Apache Axis is a good start for the web service part. If you need the messaging queue check out Apache Qpid other then that you will probably need to ask about the exact problem you are trying to solve in Java.