I know to some of you it might sound ancient but I am currently developing an fat client using Swing for the user interface and Spring as a framework behind the scenes.
Is there any good tutorial explaining how to launch, initialize and shot-down a Swing application?
I saw there is a JSR 296 but it seems to be very old and not maintained any more.
Is there someone who could help me?
As you correctly guessed JSR 296 has failed its purposes and since 2009, when it was announced that it wouldn't have been included in JDK 7, its development has been put on hold. Several forks emerged, and I've worked with most of them, including projects based on a Swing/RESTful architecture.
The best option IMHO is currently represented by Netbeans Platform, a generic framework for Swing applications that can leverage most of the components written to build the Netbeans IDE itself. The documentation is really complete and if you're already familiar with desktop development you'll find it pretty easy to learn.
For what concern the interface with a server component I would create a set of RESTful API using Spring, or even a set of simple servlets. I recommend you to use an ORM like JPA or Hibernate; you'll get caching, pooling and schema flexibility for free. On the fat client side I usually build a REST client using Apache HTTPComponents. The use of HTTP make it easy to overcome firewalls, and security mechanism that are usually built to allow at least internet traffic.
The last hint I can provide is to use JSON for the payload you intend to exchange over the HTTP connection between the client and the server. JSON is compact, text based, and it can be converted easily from and to POJOs (Plain Old Java Objects) using GSON.
Can somebody please compare these two websocket servers. I have to select one of them; I need an expert opinion due to newbie in multiplayer "online" gaming. I would probably have the flash client. What challenges I could face using one over other.
thanks in advance.
Full disclosure: I work for Kaazing and I have not used jWebSocket myself.
A couple of quick points:
0) Production vs. Beta
Kaazing is production-quality software. The download link on the jWebSocket web page points me to a beta version of the product.
1) Client Technologies
Kaazing provides WebSocket libraries for multiple client technologies (JavaScript, Java, .NET/Silverlight, and Flash), It looks like jWebSocket provides JavaScript and Java. You mention you would need a Flash client and AFAIK only Kaazing provides that. jWebSocket uses Flash for emulation (see the next point).
Note: Kaazing now provides AngularJS, ReactJS, Objective-C (iOS), Xamarin (.NET with support for iOS and Android), Java, .NET, and Android clients. However support for SilverLight and Flash have been deprecated.
2) Emulation (for browsers that do not support WebSocket)
jWebSocket requires Flash, Kaazing does not.
Note that Flash emulation for secure WebSocket (wss://) requires you to open a separate port for the Flash x-domain policy file. In many enterprises this is a non-starter.
3) Protocol Support
Kaazing offers a wide range of higher-level protocols on top of WebSocket: JMS (can run against any back-end JMS message broker), STOMP, AMQP, XMPP, etc. I don't know what jWebSocket does in this space.
4) Enterprise Deployment
It is easy to configure the Kaazing WebSocket Gateway in conjunction with existing Directory services (LDAP). It supports Single Sign-On, and the gateway can easily be clustered for HA purposes (again, not quite sure what jWebSocket does here.)
Please take a look at the documentation for these features:
Security configuration:
Using the Gateway to Support High Availability
Secure Network Traffic with the Gateway
5) Open Source
jWebSocket is open source, Kaazing has both an open source Community Edition and an Enterprise Edition.
Hope this helps for now!
I am a jWebSocket developer, we are currently working in the first production version of jWebSocket, I will just mention some advantages of jWebSocket:
- Multiple clients ( JavaScript, C#, Java OS, BlackBerry, Android, GWT(In process), and some others ).
- Multiple WebSocket engines, just switch and run in the configuration, among them (Grizzly-GlassFish, Tomcat, TCP, NIO...) in order to become jWebSocket more widely used and make applications easier to be migrated.
- NFC and SmartCards, Arduino and other technologies.
- A very variated set of Demos in the client side (Games, Chat, sms, WebSocket-Captcha, Sencha, Jquery & jQuery Mobile plugIns, Arduino, Smartcard, SessionStorage, SSH-Remote Shell Control RT in the web, a Ping Pong Game demo, Channels to create full client side applications without need a server side plug-ins, etc... )
We have been working during a long time in a new Documentation, a new Web Site and a new Production release of jWebSocket for our community, jWebSocket is a project created by people from all the world who dedicate their free time to contribute and create a really usable product to be used by all the opensource community. We are trying to give our best to the community.
I wouldn't establish a comparison between Kaazing and jWebSocket, they both have different communities, goals and LICENSES.
For a gaming platform you might want to check out http://www.pubnub.com/. I met their CTO at a developer conference and for your stated purpose, you might just win big with not having to manage the infrastructure on your own. Check out their http://www.pubnub.com/customers/showcase for details on who is using their infrastructure and for what purpose.
For me, the main point is Kaazing has a proprietary license and it's payed. jWebSocket is LGPL and free. If you are developing an application with an ROI that allows you to pay for a service like Kazzing, I think it is a good option (like pubnub.com and pusher.com), but if you want to build a complete solution and host it or you want to contribute with OS community to create a new websocket alternative, jWebSocket is an excellent option.
There are two things I would add to Peter's comment, one is that Kaazing's emulation solution exposes identical APIs to the native WebSocket APIs, so you only have to learn WebSocket not some other proprietary API. You can check out the demos and the doc that Peter referred to for more information.
Secondly, Kaazing just announced the availability of Kaazing WebSocket Gateway AMIs on Amazon EC2 - http://kaazing.com/cloud
Best,
Jonas
I've been working with jWebSockets for the past 3 months or so, and this is the first I hear of Kaazing.
I will describe how I feel about jWebSocket so far to the best of my ability in the hope that it will help.
Setting up the developing environment and getting started wasn't easy but developing using it is rather comfortable. The entire system makes sense and it is quite easy to understand. You program with Java on the server side and js on the client using json based tokens, it makes it very easy to send and receive data.
It is however very lacking in support. There are a lot of missing documentation and the support forum is nearly dead. There is payed support from the developers but I've never tried it.
There are a lot of open source demos that you can use to understand and get started. Most of them were working smoothly. Something I cannot say about kaazing after a brief visit to their demo site.
In the few months I've been working with jWebSocket I've yet to encounter a single bug, The system works smoothly and my only disappointment is the lack of support and documentation.
If you are looking for a pure open source project, look at the Atmosphere Framework. License is Apache 2.
-- Jeanfrancois (creator of Atmosphere)
jWebSocket is a good framework and support almost all servers. It has support of jetty too. Only problem with jWebSocket is slow development and zero support. Websocket specification are changing very rapidly and jWebSocket releases are very slow. I would prefer to wait and watch jWebSocket framework for some time.
I would like to implement a client-server architecture using JXTA. Also the configuration of the server part will be 3 - tier. Does anyone know a good place to get this project started?
Thanx in advance.
JXTA deals with p2p connectivity. This is the opposite of client-server approach.
From what I understand, you want to create a p2p network composed out of 2 nodes.
You can reach the site of JXSE (Java implementation of JXTA protocol) at http://jxse.kenai.com/Tutorials/Tutorials.html
Also, as far as I know, Oracle dropped its support for the JXTA project and the community intends to move it to Apache Software Foundation under the name Chaupal (there is a project on Google Code under this name: http://code.google.com/p/chaupal/).
I used JXTA for a personal project and it proved quite a beast (difficult to use and lots of bugs). I managed to do a simple p2p network. That was version 2.5.
Now it is 2.7 and I read it has improved. I couldn't find any tutorials for 2.7 though...
There are several excellent hosted services for error notification and processing in the Ruby world, such as hoptoad and exceptional.
I'd like to find a similar service for Java. I don't want to install a separate log monitoring system like Nagios because this is for a product that gets installed by customers and I need to keep things simple.
I know there's a log4j-to-hoptoad integration called frog4j, but it hasn't been revved for nearly a year. Are there any other alternatives? I'd prefer to find a hosted service that supports java directly, or a more actively maintained 3rd party tool.
PS - I'm on Grails if there's something Grails-specific.
Thanks!
I work on Bugsnag and we fully support Java and have an OSS provider for Java which is located on GitHub.
I am not sure if this is what you are looking for but it seems pretty decent.
You can use LogDigger Connector library to capture Java web application errors. Standard version is free and collects request-level data and logs. (With Pro version you can track user actions and have the recent usage history included with the error report.)
Notifications can be send via email, collected using RSS or you can implement your own mechanism.
There's a built-in web interface to review error reports so you don't need an external service.
Very frequently I see error reporting GUIs in commercial software. This includes the whole gamut of commercial software: games, enterprise apps, office apps, etc.
For some of my company's software I would like to provide exception reporting GUIs if (and ultimately when) my application fails unexpectedly. Building the GUI is not hard. It boils down to this: Are there any existing solutions for the backend systems in exception reporting? Ideally I am looking for a java library and a corresponding server backend. I could roll my own solution; for example, I could send the data to a webserver via POST data.
I feel like a solution for this already exists somewhere -- I just haven't run into it. Any recommendations?
Edit:
Example frontend GUI for a user. I need a library to manage the backend of the error reporting. (I won't need user login functionality, just basic reporting.)
I think there is no common existing solutions in exception reporting because of specific features of every project. Some projects need to send report using simple HTTP, someone uses web services, someone makes a file report.
I've found old post where author suggest to extract error reporting code from Netbeans and make independent project from it.
Anyway, there is no problem to implement error reporting tool yourself. You could use HttpClient of JAX-WS (if you have a rich client) or you could use AJAX (if you have a web client) for sending reports.
Implementation is strongly depend of what kind of communication do yo use if tour project, what kind of project, what kind of front-end do you use and etc. It's really hard to implement common library for all projects.
Are there any existing solutions for the backend systems in exception reporting? Ideally I am looking for a java library and a corresponding server backend.
Have a look at Ctrlflow Automated Error Reporting, which is a software-as-a-service backend to send error reports to. Your frontend GUI would then use one of the available Java libraries to communicate with your Ctrlflow Automated Error Reporting instance.
To get a good overview of the backend’s feature set (which may offer more than you need), take the product tour. Or just log into the demo server to get a feel for the backend.
Hope that helps.
This product has an instrumentation feature that allow you to track the exceptions by sending the data to a portal : http://www.preemptive.com/products/dasho/overview. These features were added to the 6.7 release.
Although it is an obfuscator, you can turn those features off and just use the instrumentation features to send the data or use the APIs directly.
PS - this is my company's product.