Category Archives: linux

Marketcetera : Open Source Trading Platform

Most stock trading systems these days are mostly on Solaris, but the trend is changing. Stock broking companies are wanting effective low cost solution. Most companies I know of are moving towards .Net platform or Linux platform. .NET is far cheaper than Solaris solution, but it takes you down over the years with M$ extrating money out of you year after year! So financial companies are also looking at open solutions like Linux.

Adding to this trend, Lets welcome Marketcetera(http://www.marketcetera.org) – Open Source software for automated trading systems. Marketcetera’s platform lets brokers and traders build effective automated trading systems, develop proprietary algorithms, create order management solutions and manage risk faster, easier and at much lower cost than with closed platforms.

Here’s a Quick Overview of the system

Some special features of Marketcetera

  • Process orders through FIX protocol in the exchange. This is good for DMA(Direct Market Access) Clients.
  • Order Routing – You can route your orders. Its an interesting feature which I might discuss it over in another post.
  • Exchange Simulators to test your stuff. You definitely need them, But not quite sure how many exchanges can they simulate? Exchanges in Asia-Pacific markets are like way too different.
  • Order statuses: They kind of flow the orders from Front office to back office, Again this is quite interesting, I will try to blog on it some other day, But yes, those who are familiar with stock broking side will know what Trade Flow is all about.
  • MySQL/Postgres or Oracle can be used as a back-end database. Really cool!
  • It uses the Spring framework with ActiveMQ as the messaging queue – I guess JMS has become heart and soul for all stock brokers these days with Tibco and Webmethods pushing their sales guys hard on this domain. Again a good way to test out the scalability of ActiveMQ with respect to other platforms in the closed source group.
  • It uses various GUI’s – For entering orders it uses Photon, for others,it also uses RoR – Not quite sure if RoR will scale up?! Big question, We’ll see.. I really wonder how much of Web 2.0 are they using!
  • This is not it, there are plenty of features , particularly to hardcore stock broking side like algorithms etc, which I feel you may get an insight at their own site.

I haven’t got enough time to actually put my hands on and try it out , but it seems promising. A few more years of hardcore development and it could be the best! Just needs some experts on the business side which I think their team already has.

But the question is, Will Marketcetera be able to survive when the markets are falling. Offcourse they need a huge investment, I don’t quite know who’s funding them. The one great thing that I like about them is that they are following everything that an open source product needs: Wiki, Mailing list, releases etc. Its really good to see Trading platforms in Open Source. Hat’s off to Marketcetera Inc.

html2pdf using jsp and linux

Have you ever thought of downloading the current viewed page as PDF. Here’a  quick program which can read an HTML and convert it to PDF using JSP or Servlet. I am going to call an external linux command called ‘convert’ which does all the magic for me.

All I need is a linux box with ImageMagick setup along with html2ps and ghostscript. I can get this very very easily from my ubuntu’s apt-get install …

So here’s the small snippet which I wrote after setting up.

try
{
Runtime rt = Runtime.getRuntime() ;
Process p = rt.exec(“convert /usr/local/share/pdfformat1.html /usr/local/share/pdfformat.pdf”  ) ;
p.waitFor();   //<– This waits until the operation is over
System.out.println(p.exitValue());  //<– if the output is 0 it means pdf was generated successfully
}
catch (Exception e){
e.printStackTrace();
}

Now this can be quite a good replacement for iText html to pdf conversion which is quite buggy (I am a huge fan of iText, but somehow this HTML needs to be rendered properly I feel)

After having got the file, read the file and reply to your browser by response.setContentType(“application/pdf”);

Please note, ONLY valid HTML tags are allowed. This method doesn’t support CSS. If someone knows of it, please let me know.This method works perfectly well with valid HTML syntax. So if your output pdf isn’t looking as expected, please check your HTML.

You can use this little utility to check your valid HTML #: sudo apt-get install wdg-html-validator and then run #: validate filename.html
This will list out all the invalid HTML tags.

So for all you report building guys out there, here’s a quick tip: Just output your report as HTML <offcourse with data poluated> and then use this utility to generate a PDF out of it!

HeartBeat

I am starting a project called HeartBeat

HeartBeat phase 1 will consist of the following features:

1. Server script configuration
2. Implementation of libtrilead for Java SSH
3. Creation of libheartbeat
4. Basic GUI under Swing

Users will be able to configure almost any service and start and stop it remotely through SSH.

Imagine a single GUI to manage all your servers around the world with a simple click!

Most popular windows – linux equivalent softwares

0) Windows – Linux

1) uTorrent  – rTorrent

If you like uTorrent, you will definitely like rTorrent. Its much simpler and easier to use!

2) Remote Desktop – rDesktop/VNC

If you want to share desktops, use VNC. If you want to Remote desktop to a windows machine from a linux system, use rDesktop

3) Yahoo/MSN – Pidgin

Your all in one instant messenger. Gives you better features: Major one being, you can login with multiple accounts on the same system! Isn’t that cool?!

4) IE – Firefox

Ok, we all know how good firefox is!

5) Outlook – Thunderbird

DONT USE OUTLOOK unless you want to screw your system up with hackers around! Use Thunderbird for windows and linux both!

6) Photoshop – Gimp

Gimp is quite matured now! It gives  you better brushes than photoshop..

7) Dreamweaver – Quanta Plus

Used dreamweaver since long and cant use it in linux? Try Quanta..

8 ) MS Office – OpenOffice.org

I’ve personally stopped using MS Office on windows too ( Ok, Ive stopped using windows too)

9) VMWare – Virtual Box

Virtual box is still a bit buggy, but you’ll not get to know unless you’re a hacker.

10) Notepad – GEdit/VI

We all know this!

11) Media Player – VLC Player

VLC is not in looks, but neither is Media Player.

12) WSFTP – Filezilla

Use filezilla for both , windows and Linux

Life without Apache : Meritocracy in Action.

I am obsessed with Apache. Yes! I am and I am proud that I am!

I was just wondering how life would be WITHOUT Apache!

  • We would still be doing ASP. Many of us would have gone into ASPX and C#

  • CGI and PHP wouldn’t have come out..

  • Total no. of websites in the world would be less. I don’t know how much % but yes, it would surely be less.

  • There would all be Windows Hosting Services everywhere and the prices would be higher and higher…

  • Who can forget the popular Tomcat. Java wasn’t open source before, other app servers were not that comfortable interms of price, simplicity and ease of use. Every newbie in JSP/Servlet starts with Tomcat. People crib that Tomcat doesn’t have EJB, who needs EJB these days?

  • No Java projects would compile using Make, so Ant came it. Imagine how difficult life would be without ANT scripts.

  • MVC the most popular design pattern: Struts is the name you think of. If it weren’t there, you’d still be writing your own servlets and JSP and controller logic.

  • Almost 80-90% of GOOD Java EE developers would use Apache Commons. I mean who doesn’t use it?

  • Logging your application for debug and support, What would you do without Apache Logging Sevices

  • Forget all programming, there is still no comparision with Xerces for XML. I challenge.

  • Make your code as Webservice? No words about Axis, yet again apache product!

  • You want a middleware java messaging framework for your JMS? Use ActiveMQ

  • Object relation model: Try iBatis, you wont leave it again.


All in all, If there was no Apache, Life wouldn’t have stopped but would have been SO SO damn difficult. My many many thanks to Apache…