I've got client server application, with JBossAS7 and client which uses remote EJB provided by the server. I have to pass file from client to server, where it will be further processed via InputStream. Also have to pass file from server to client, where on server i get OutputStream. File size is not limited, it might be even 5GB. What can I do to implement solution to this case? Passing byte[] array seems not to be a good solution, RMI limits size what I've read. RMIIO is GPL (i need solution free for commercial use). Is http transfer the only reasonable way to do this?
edit: it seems that RMIIO was always LGPL!
You might consider setting up a Netty Server running on JBoss AS as showed in this Netty Tutorial and pass data using bare sockets.
Another option is HTTP by means of a simple HTTP Transfer using a Servlet for example.
I'd exclude EJB since they are transactional component, and admitted you managed to pass this data through RMI-IIOP, you still have to set up a huge Transactional timeout.
Hope it helps.
RMIIO is LGPL (different from just GPL), which is free for commercial use and is not viral (assuming you have not modified the rmiio library).
Related
I have gone through google but I didn't find anything like how to execute sftp commands using Apache camel could any one refer the example or some link relevant
to the example. any help is greatly appreciated.
The camel-ftp component (and all the other Camel components) are intended for exchanging data (messages) between systems. They are not really intended for a Java client library with a free API you can do all sorts of thing with.
So if you want to do some special things on the FTP server then maybe use the Java FTP client API directly, and not the camel-ftp component.
That said the camel-ftp component has a download=false option you may be able to use to consume the FTP files metadata (name, size etc). But again the consumer is intended for keep monitoring the FTP server and download new files. So its not a perfect fit for your use-case.
I have some C simulations running on my university servers and I am bored of having to sit and wait for them to end, considering they take quite a while. So I want to develop some kind of mechanism to know when they have ended. I was thinking of implementing an SMTP client with gmail, but considering I can't install anything on the system I wasn't able to add the SSL libraries to do so. I also can't remote access my desktop from outside campus. So once I leave I can't VNC y desktop.
So I was thinking if there is some way where I can rent some online space for free and be able to talk with the server through ftp or http and set add some text that the simulation has ended. That way I can check the space from home and know it ended.
I know the question is quite messy, and hope someone can help point me out to someideas.
Thanks
I'd recommend, 100webspace.com, it allows PHP and MySQL, all for free! Then just send data to it with HTTP PUT and/or GET and view the results over the interweb.
My trawling of the web consistently turns up libcurl as the library of choice for interfacing C with HTTP commands. This is a sample using it with the PUT method.
A possibility would be using a simple blog and updating it via HTTP. Just as an example, blogger supports simple messages in XML. (REST would be my first choice but XML is not that bad)
Edit:
Tumblr does support using an HTTP POST without XML.
I am creating a POC when I have a server that takes requests from clients. Then puts those requests in a pool which another thread pool processes those request and put them back into an output pool. The server should take a response from the pool and send it back to the original requester. I know how to code this with using netty but I would really like to use netty for this POC. I've got through the examples but have not found anything similar.
Is this possible using netty?
Thanks
I'm not 100% sure but I think you are looking for the ExecutionHandler. You can use the ExecutionHandler to build some SEDA like architecture. In current master branch (upcomming 4.0) we are currently working on making it even more flexible by allowing to use different ExecutionHandlers for different kind of events.
I'd like to build a multiplayer web game application in which it supports chat. I presume the application will have to handle hundreds of simultaneous connections.
I'm planning to host my application in a shared web hosting, which has these limitations (most likely similar to PHP + Comet (long-polling) scaling / hosts):
It does not seem I can change the web server. Most likely it's using Apache.
Supports MySQL 5, PHP 5.3.x, Perl, Python, Ruby on Rails, CGI
(To be more precise, I'll be using HawkHost's shared web hosting.)
And here are my result of research, followed by my questions:
Some resources (like Python Comet Server) say that PHP is not good for handling concurrent connections, while Python is better choice. Is this true?
I've tried the long polling technique in PHP (although I don't know whether it's correctly implemented or not, like Comet issue with abandoned open connections) using "Loop endlessly until the data changes." method. This almost works. The remaining problem is that the server process never dies when the browser is closed (the server does not know that the connection has been terminated, and the data never changes). Is there any way the PHP can detect whether the browser has been terminated so that it stops the loop?
I've been looking everywhere to look for answers but still I can't conclude anything. This topic has also been asked on StackOverflow so many times, I'm sorry if I may sound repeating >.<.
Currently I am able to code using PHP, MySQL, and JQuery for JS. I'm still new to the term Comet and Server Push. If necessary, I'm also willing to learn new scripting language like Python.
I appreciate any insights of what scripting language, framework, and techniques to use to start my project.
When you have a shared hosting environment and there are a number of restrictions enforced then it's a good idea to outsource the realtime functionality. I would say this since I work for one such company, Pusher. But I hope others will back me up on this.
When using a hosted solution you can push a notification by making a HTTP request to a RESTful API. The service will then deliver the message to the connected Web Client (browser). The browser does need to include a script tag or use a library that also connects to the hosted service.
The main benefits are:
No installation or maintenance
No need to handle persistent connections - no resource usage
Really simple usage: Script tag in app and call REST API
The hosted solution handles scaling
Also, here's a list of hosted realtime solutions.
So you can use Python. Then you can use Tornado. (psst... facebook uses it)
And I had same problem with open connections. Just don't spend time for search solution in PHP - later you will be sorry. I was. Just use what is made for Comet. If you more prefere JAVA, then there is: CometD.
And for game get a normal hosting. They cheap this days.
I have a PHP application that I want to also publish with a different look and feel. We've chosen to do that using XSLT. That way we don't have to touch the PHP application and run risk introducing instability in the original. That's important since we're close to production.
I've looked into ways of doing XSLT processing in Apache webserver. And it seems that the only available xslt module hasn't been updated since 2005. I was hoping to use an xslt mod in a filter chain to accomplish what I want. But an unsupported module won't do.
Another option I can think of is to do the XSLT processing using a servletfilter in a java application server. It seems rather roundabout to have an http request arrive at apache webserver, be forwarded to a java application server to be forwarded back to the apache webserver to do the PHP processing, and the reverse way back for the response...
So my question is: Is there a way to do XSLT processing in apache webserver? Is there another way to do this?
Thank you in advance.
I do not know of a good way to do that in apache. You could do it with PHP using its XSL(T) module, though.