Non-Web application server "framework" [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We will be developing a server-side linux service using Java.
Does anybody have experience of a framework or an "application server" for this purpose?
Application server not in the common sense, this has nothing to do with web, http or the like. It's a server application listening on a socket, processing some stuff and then answer to it. It will be a custom protocol. So the usual suspects like Glassfish, Tomcat, Jetty, etc. aren't really what I need.
Edit: I'm looking for features like startup handling, automatic service recovery, and may be database connection
Any help is appreciated.

You could use Netty for developing your tcp/ip based client-server application. It has very good documentation and arguably better performance too. If you want you could also look into Apache MINA but IMHO they do not have great documentation. QuickServer is also there if you have time to do some R&D on it.

I think you are wrong - the listed usual suspects (well, Tomcat not) are in my opinion perfect fit. Shortly, what you need is an application server with Java EE 6 Full profile support - I would recommend GlassFish or WildFly, or WebLogic from commercial end. The reason is simple - JCA (Java Connector Architecture). It's a Java EE specification for connecting to 3rd party, or legacy, or custom developed systems. We have used it successfully for implementing communication via application specific socket based protocol, or even for Sun-RPC and Radius (from telco) protocols. There are several examples on the web, how to utilize it - with latest Java EE spec there are also few examples for socket communication finally available. But the specification itself (JCA 1.6) is very well written and after reading it you should be able to use it.
Because it is part of Java EE, the container will support all the pooling, startup, monitoring , ... Give it a try.

Related

Deploy and Serve a Thrift Service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have built a service discovery layer on top of Zookeeper for finding Thrift services in a distributed environment. I'm looking for the best way to run those services in a production environment now.
Currently, it's done by packaging a war that gets deployed to Tomcat. During the servlet instantiation, the Spring ApplicationContext is created, which creates a TThreadPoolServer inside of Tomcat.
I don't like this for a couple of reasons:
It makes Tomcat sort of useless, and it feels like a hack to facilitate easy deployment
It avoids the Tomcat thread pooling and all of the logic that has gone into figuring out the best way to distribute requests
In the process of trying to find the best strategy to handle this, I have come up with a couple of alternatives:
Launch thrift services as a standalone JAR (I don't like this, mainly because I now need to reinvent the logic that app container developers have spent a lot of time working out
Host thrift over HTTP, thus utilizing the Tomcat thread pool and logic for service requests (iffy about this one due to the - albeit minor - performance hit this will incur)
Use a different type of application container for hosting these services
Does anyone have suggestions on how they may have handled hosting distributed servers before. Am I better off just using HTTP inside of Tomcat?
I've tried using Tomcat as a host for Thrift server and found out that it doesn't bring any additional value: all the features of servlet container (request routing, etc) aren't necessary in this scenario. On the other hand, Tomcat adds complexity and moving parts (i.e., it brings hard to resolve PermGen issues).
Using Thrift over HTTP causes significant performance impact, especially in high-load scenarios with a lot of client connections.
So I ended up with standalone Thrift services running under Supervisor Daemon (http://supervisord.org/). It makes management of distributed deployment really convenient. When it's necessary to expose Thrift API over HTTP (for example, for JS clients), we use thin async proxy implemented in vert.x (http://vertx.io/).

Is there a Java equivalent of SignalR? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've got a really simple question but I find nothing interesting on Google.
Is there a Java equivalent of SignalR (.NET) ?
SignalR is a .NET framework that implements Websockets with a fallback for old browsers.
Really thx to you.
It seems that Atmosphere can be this what you are looking for.
From github description:
The Atmosphere Framework contains client and server side components
for building Asynchronous Web Application.
I didn't tried it yet, but this says that it supports major JEE-Servers (JBoss, Tomcat, Glassfish, Jetty) and all major browsers and transports (WebSockets, SSE, Long-Polling etc).
UPDATE 6/4/2014:
There is another notable alternative for "Java equivalent of SignalR". As of version 4.0, Spring Framework comes with support for WebSockets and server-side support for the SockJS. It means that it supports also WebSocket-Fallback, used together with a browser side sockjs-client library.
As Spring Documentation says:
WebSocket is not supported in all browsers yet and may be precluded by restrictive network proxies. This is why Spring provides fallback options that emulate the WebSocket API as close as possible based on the SockJS protocol [...] On the browser side, applications can use the sockjs-client that emulates the W3C WebSocket API and communicates with the server to select the best transport option depending on the browser it’s running in.
Still I'm not aware if there is support for something like SignalR Hubs (which involves JavaScript-code generation)in the Java Framework as of today, but on the other side I think you can easily imitate a SignalR-like PersistentConnection with full fallback support for older browsers.
Furthermore, because of JSR 356 aka Java API for WebSocket, I think it is only a question of time when the so to say "mainstream" Java Web-frameworks will be shipped with out-of-the-box support for Websockets+Fallback, especially considering the fact that all main servlet conteiners (like Tomcat and Jetty) and JEE 7 Servers (Glassfish, Wildfly) have support for JSR 356 already.
There is a Play framework module SignalJ
Update: SignalJ looks dead, look Scala Web Sockets

Java SaaS Architecture - Extensibility [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am considering building a Java EE based set of services and licensing these services to my clients. While we will aim to make these services generic for any client, reality is that customizations and new services will be needed on a client specific basis.
Likely the stack will be a Java application deployed to the EC2 cloud, possibly leveraging a framework such as Spring.
What architecture would one prescribe to have a hosted application for my clients, but also enable them to build their own custom extensions. Does anyone have technical or business example of a company that has built a hosted SaaS service that is extensible on the platform side?
I haven't done this yet, but AFAIK you could use module systems such as OSGi also on the server side to write modular, extensible server side applications.
Atlassian does this. You basically pay to have even its own source code, as well as a Platform SDK, or even a Managed Instance (this one, however, seems not extensible)
Internally, most of them rely in an OSGi Container (I think its Felix), so it manages dependencies accordingly, as well as DI and Extension Points. Perhaps might be worth it to have a try

What is the best library for building an IRC bot in Java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
In particular, I'm trying to find a library that provides an elegant way to deal with the event-based nature of IRC, without producing spaghetti code (as a naive event-based implementation often becomes).
Netty is an event-driven IO framework you might want to look at.
irc-api, a well designed Java IRC API that offers some features other IRC APIs don't (like asynchronous commands). Main features are:
State(ful/less) API
Callbacks support / Asynchronous
Message Listeners - Message Filters
SSL implementation
DCC implementation
SLF4J/Maven integration
You might wanna give it a try!
I've already written such framework you mention in comment:
JawaBot 2.x is a pluggable standalone application with IRC and web UI which aims to put multiple functionalities under one bot, while still keeping the structure of the code sane. Mavenized.
Currently, there are few plugins:
Jira - resolves name, status and assignee from a Jira issue tracker. Configurable. Default config supports opensource repos: JBoss, Codehaus, Apache and others.
Logger - logs IRC events to a DB. Has a web UI.
Reservation - for reservation of resources over IRC. Has a web UI.
WhereIs - looks for nicks in all channels, supports wildcards.
Messenger - delivers messages to users which are offline when they connect ("answering machine").
PasteBin - let's user paste text through PM, saves it, and posts a link to a web UI to the channel.
AutoOp - gives op to users.
Social - reacts to "Hi!" etc. Kind of Hello World plugin.
If you're not into that, you may try PircBotX which tries to fix PircBot's wrong design.
List of other options is also here: Building an IRC bot in Java

Recommendation for lightweight embeddable Java web framework with Comet support? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm working on an open source anonymous decentralized P2P application that will support Twitter-like functionality, you can read more here.
My intention is that the UI will emulate the Twitter UI quite closely, and be accessible through a web-browser communicating with the local app.
I'm therefore looking for a lightweight embeddable web app framework that supports comet (ie. server-initiated modifications to the DOM). It must be lightweight because I need to keep the size of the eventual application as small as possible.
My intention is that most of the UI work will be handled within the web browser, making use of JQuery, and perhaps using Coffeescript instead of Javascript (although I haven't yet made a full decision on this).
Can anyone recommend (GPL compatible) tools/libraries/frameworks for me to look at?
Not sure if you are still working on this since the git activity on the project page is pretty stale. But if you are I would recommend Jetty for your embeddable web app server. It is:
Small
Embeddable
Supports Cometd
Supports Servlets
Throw Vaadin on there for a small, lightweight web development framework and you are g2g.

Categories

Resources