Showing posts from January, 2014

sun.misc.Unsafe and off heap memory

Overview The class sun.misc.Unsafe allows you to many of the things you shouldn't be able to do in Java, but are still useful in very specific cases.  It is to be avoided 99% of the time, however there are rare occasions where this is the only solution which makes sense. This post considers how it has been using in OpenHFT and what functionality I would like to see in Java 9. In particular, accessing large amount of memory without impacting the GC can be done this way. Sharing memory between processes, without significant overhead, can only be done this way in Java. Allocating and freeing off heap memory. public native long allocateMemory(); public  native  void freeMemory(long address); These two method allow you to allocate any size of off heap memory.  It is not limited to Integer.MAX_VALUE bytes and you get raw memory where you can apply bounds checking as you need to. e.g. Bytes.writeUTF(String) calculates the length of the encoded string, and checks that the whole s

Hiring a Java Analyst Developer

If you have enjoyed this blog and looked at the OpenHFT projects such as Java Chronicle you might be interested in applying for this role.  You would learn a lot working on technically challenging projects. Higher Frequency Trading is a consulting and software developer company offering training, performance consulting, system development and open source software to clients in the USA and Europe. We are looking to expand the development and support for existing and new open source projects. This is a great opportunity to get into High Frequency Trading as you will be developing and supporting open source software which is used in HFT systems for investment banks, hedge funds and trading houses.  The project area is Requirements - 5 to 10+ years commercial programming, preferably with some support experience - you must be passionate about low level coding in Java - you must have worked on open source projects  (Please provide such examples

Interview: Starting out as an IT Consultant.

Peter Pilgrim interviewed Peter Lawrey to find out how he started out as an IT Consultant. [Pilgrim] Starting a business for me is pretty scary and crazy s%#t, no offence. I just do not know how to market myself to the key decision makers for one thing. I am unsure if one week going into a site will work for the typical Java EE project that I see. Some clients take at least that much time to set up access to SVN and produce a good enough laptop that works. I assume that this is different in your experience with low latency trading. [Pilgrim] So Peter, how did you get started? [Lawrey] I preferred the technically challenging and interesting roles but I was finding the same issues coming up and spending less time solving them.  After some short roles, I saw a trend of moving to shorter consulting roles.  I have enjoyed consulting and don't feel under challenged. I am friends with a couple of guys who have a small start up and have been operating for a few years.