Saturday, October 23, 2010

Party of Five - A Tale Of Java Servers

PROLOGUE

I've been working with a few JBoss servers which, or should I use the word Who instead..well who are responsible for all Distribution processes in my Company, Distribution means - sending all wanted material from the System to the out side world.

The outside world means - Printers,Fax Server, Email (Mail Server) and any kinda of a Network repository storage place you can imagine.
The servers also take part in building & constructing the data it suppose to distribute, like fetching data from the DataBase, and invoking all kinds of reports generating tools that construct documents as a result. all the data is finally converted to PDFs and then makes the it to the final stop - the Distribution final destination (Printer, Fax Server etc').

Well it's all sound really interesting doesn't ? well actually it is, and the thing that can be really interesting, is to see this family of servers servicing a roughly 1000 clients in real-time, with many of different requests and factors that influence the construction phase of the data in a myriad of ways. not to forget the fact that running in multiple threading environment that it is massive as this can be really fascinating to observe and learn from.

So after a few years of watching and encountering many scenarios and solving many problems I thought, why not put it on paper...or the Internet, which is the same thing our days, for the benefit of others, well if nobody will read this, no matter, at least I had fun writing it.

Now the Tale of the Family of servers begins, I'll start the story & end this prologue introducing the family -
  • There's the 2 Big Brothers who are responsible mostly on producing a big piece of the documents and placing them in Storage. we call them the "Storage brothers".
  • There's Printery who constructs data (PDFs documents) and zip them for delivery to an outside printery that will print & deliver the documents to the clients.
  • The Printing Server handles requests sent to local (In house) Printers, there are about 120 of them, most of them HP, some Lexmark and Xenon.
  • Last but not least, there's the Non-Printing Server, with a respect to his name handles all the other stuff, like Faxes,Emailing,Sms sending and more.
So this is the family, the party of five

Sunday, October 17, 2010

Spring's Expression languge (SpEL) not just a lexical parser

I've been messing around with Spring 3.0 biggest new feature the SpEL (Spring expression language) and like all Spring's tools, it's a real treat to use & test.
At my work place I was asked to write a presentation to show the people it's wonders, so I've decided to share it with the rest of the world :)

* I've written a lot of test cases, but haven't uploaded them yet, hopefully I'll find the time to upload it in the near future.

I would like to mention Craid Walls whom I took some ideas for my presentation.
As well as Dhruba Bandopadhyay who wrote a great article that explains some of SpEL's extensive features - spring-expression-language-spel-primer

Saturday, March 27, 2010

Java calling Powershell Script via C# & JNI

I've been messing around with JNI for a few weeks now, all started for one little purpose, executing Powershell script from Java.
Well the journey started using Java's Runtime object, but problems with the socket opened to the Powershell process forced me to choose another way.
Well I do come from a .NET background and I love C# so I ventured a bit on the options C# have interacting with Powershell and found the best way (for me :) ) to make it so.

More information + some code examples and free source code can
be found under my project in google-code :
http://code.google.com/p/jnicsharp
Love to get any thoughts, improvements, or even silly notes about it, enjoy :-)

Monday, July 20, 2009

Interviewing Java Developers With Tears in My Eyes (By Yakov Fain)
— During the last week I had to interview five developers for a position that required the following skills: Flex, Java, Spring, and Hibernate. Most of these guys had demonstrated the 3 out of 10 level of Flex skills even though each of them claimed a practical experience on at least two projects. But this didn’t surprise me – Flex is still pretty new and there is only a small number of developers on the market who can really get Flex things done.

What surprised me the most is a low level of Java skills of most of these people. They have 5-8 years of Java EE project behind their belts, but they were not Java developers. They were species that I can call Robot-Configurator. Each of them knew how to configure XML files for Spring, they knew how to hook up Spring and Hibernate and how to map a Java class to a database entity. Some of them even knew how to configure lazy loading in Hibernate even though not all understood why it’s needed.

Saturday, July 18, 2009

Powershell script - simple batch renaming

So I've been looking for a simple way to rename my massive
folders of mp3 when transferred to my stinky LG cell-phone which can not group it's
songs & creates a massive disorder in the songs listing.

so the simple solution was to rename all songs with same artists name
to same start (at lists it orders it alphabetically ) to conclude this preface I've looked for
a fast easy way to do this instead of using an app like "magic file renamer", so powershell
was my obvious choice to look for the answer...the web is filled with examples
and I finally put together a simple syntax to make this work -
gci | % {Rename-Item $_ $("rd" + $_.Name ) -whatif } the "Rd" is the new prefix to
assign to all files, have course there a way to filter the data to search for only mp3s
like so -
get-childitem *.mp3 (get-childitem = gci = dir) powershell is cool, makes me woder
how Microsoft developed such an amazing script language.