Friday, February 18, 2011

Java SFTP server review - current state

The life goes on, the new tasks emerge and new research challenges appear.

This time we got the 'heritage' - strangely coupled old system with unclear signal paths (write/poll filesystem instead of doing a local notification call), weird predicates (the file is considered uploaded as soon as 1 hour passes from the start of the upload) and really bad heterohenous design.

The target of the system is get some files uploaded via SFTP (SSH File Transfer Protocol) protocol and process them with some rules, producing output files and making them accessible via the same SFTP. As most of the system is written in Java, we decided to try find the Java SFTP Server to replace part of the existing system. Good things about such an rearchitecturing:
  • Making signals simple.
  • Having control over filesystem, clients and authentication.
  • Introduce uniform build and deploy procedures for the whole system.
A little trouble is that one should distinguish between SFTP and FPTS (FTP over SSL) protocols, as they are completely different.

Having all that in mind, with the good mood we started our little research. Found out some libraries:
  • Apache Mina SSHD. Sister project of the Apache FtpServer, this one looks really good in terms of the object design and operation. Code is yet a little fresh, but object breakup is really awesome. We collected our server with the Spring beans and that was pretty easy - to replace the key provider, specify key storage, authenticator and more more other things.
    If you don't want to bother configuring it yourself, the factory gives you pretty good result as it is.
    Being a generic SSH server, Apache SSHD is capable of running SCP and SFTP. Unfortunately, SFTP support is now outdated, and supports only the protocol version 3 (current is 5 or 6). :( We could not use it for the project, as for us it is crucial to have WinSCP support in, and that does not work with protocol v3. After asking about new version guys on the mailing list told me that it'd be awesome if someone implemented that. Who knows if I have some free time, why not? :0
    License is strict GPL
  • SshTools is another implementation of the same. Has declared support of the SFTP, SSH and lots of other stuff. Designed pretty good too, has also notion of virtual file system which is very useful if one needs to move storage to DB or process files on the fly. On the other hand, has few documentation and is also licensed under GPL
  • JavaSecureFTPd the project is dead as the stone is. GPL, but no one cares :)
  • J2SSH Maverick commercial; we did not ever try it, but the rumor says it is pretty good. Has all necessary protocol support.
So, for now situation looks following way - if you have a java app and need to embed SFTP server functionality to it, you either need to try SshTools, help Apache SSHD with the new protocol ;) or pay money for the commercial one.

Not yet sure what we stick to...

Friday, February 4, 2011

Reviving for the second time

Finally, the time has come.
I'm about to change job.
I'm about to change an occupation to something a little different.

Got a new laptop to support my new activities while on the go :) got a new passion and new belief in all the good.

Hopefully will finally establish this blog posting the way i wanted to originally -- one technical posting a week. Think i'll have pretty much of stuff to write on.

Thursday, July 1, 2010

Download all java older releases

Ok, i know that at least once in the life java programmer has to download jdk 1.3.0_u03 to reproduce the old, freaky and disturbing issue on the legacy system.

Because we need to support this system.

Searching for such a download main be a pain in the butt, unless we know the magic url - http://java.sun.com/products/archive/

Yes, I know that's no more Sun, but it anyway allows you to download specific versions of JDK, JRE and other stuff! Which is really useful for real-life experience.

Sunday, March 7, 2010

New blog platform - does it worth it?

Hello again.

I'm thinking of moving to the shared hosting with own domain name and Wordpress installed - seem to like more configuration.

It is now up with the blogger imported.
http://lexaux.net.ua/wordpress

Try it - do you feel it comfortable? Like the styles? Any ideas on whether this change may be good or bad?

Thank you!

Show effect - collecting ideas!

Hello, my dear fellows.

Show effect - as is
I have recently thought of the 'Show effect'. You know it - when you are presenting your application, or the new iteration to the customer (or anyone external) - you frequently run into situation when the small action results in a large stack trace spanned for the screen?

Imagine the demo to your customer. You:
  • show nice things - feature A is implemented
  • show great things - feature B which is very important for the business - is implemented! (applause on the background)
  • show awesome things - the designs ARE there, even if they were provided 2 days ago!
  • and then you are about to show little bit of functionality (notifying user about their registration), which is not that important (and thus not that verified) - you get an awful error statring with text Unhandled exception java.lang.NullPointerException
Then all your show becomes a bit compromised.

Minimize your risks with smaller efforts
So, I kept thinking on this for a while - how does one minimize these 'show' risks?
I have been feeling this myself - we had a demo each week for 5-6 weeks with a customer, and we had to demonstrate the progress.
It is pretty hard to show significant feature progress within a week, isn't it? And we were on really tight schedule.
So, these are several things I figured out - sure that I'm not the first who found them, but better would be if you the readers would get them from other's experience than from own:
  1. Time and connection. Be sure that you don't make everyone wait too much and also that everyone is setup for the show. In the distributed teams it is common that dev team is located in different country, so that the technical solutions for presentations are being used (screensharing services and the voice calls usually)
    Make sure everyone knows where to get and how to setup the screensharing before you start the show. Provide your help if needed.
  2. Always have a plan of presentation. Even if the things are simple, you need to have written plan before you so you don't waste time thinking on 'what should I click next?'. You should be presenting your work in such a way so your listeners feel that you are completely confident with what you are doing.
    Surely, there is always a place for unforseen changes - your customer may ask you to perform some action which does not fit to your plan. Be calm and confident :)
  3. Rehearse the demo, at least 2 times, following the written steps you've done in item 2 of this list.
  4. Try not to show too much - if some features are half-implemented you'd rather not show them than make the whole appearance of the project half-complete.
  5. Make sure no one could compromise your demo without knowing it. Good point here is that you ask no one to touch demo server during the show - by any means. 2 demo users logged in with the same accounts from different machines can lead to catastrophic results.
  6. Don't forget about the user experience. If you are showing something to non-technical people (or even technical people but not of your organization) make sure that you have the unexpected exception page configured correctly - so that even if everything fails, user is still presented with the comfortable page with correct and unambigous steps of what to do next. Making custom pages for HTTP 500, 404 etc is also a nice thing.
    Another point here is that if the custom error page is not breaking the overall design feeling. With this little trick subject of your demo would feel much more like a complete application (if it even is a prototype).
  7. Put mocked things in. If you have designed sketches with very nice flash application you don't have yet (and your customer knows you don't) - put them as static pictures. And then as soon as the new feature is completed, replace that static pictures with the functioning parts.
  8. Don't forget to say thanks once the demo is over - the people involved had to put off their ongoing work and tasks (which may be also important) to take participation in your show.
  9. ...
The question is still open
It would be great if you could share some of your great experience - cases, practices, ideas - about the show effect.
Thank you! And comment on, I'll add the wise thoughts to the list :)