Showing posts with label Cool Software Things. Show all posts
Showing posts with label Cool Software Things. Show all posts

25 February 2015

Build Rocksdb Java API

sudo apt-get install git g++ automake openjdk-7-jdk curl
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
git clone https://github.com/facebook/rocksdb.git
cd rocksdb/
sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev
make rocksdbjava

This will produce 

/rocksdb/java/target/rocksdbjni-3.10.0-linux64.jar
/rocksdb/java/target/librocksdbjni-linux64.so

15 August 2014

My Top 10 Open Source People and Projects.

This is ordered in terms of how much I appreciate them..

I will not reveal if this list is in ascending or descending order :)

and my main evaluation criteria

a. is it working
b. is it useful
c. is it performing
d. is it documented
e. is it supported
f. is it simple



1. Curator (Jordan Zimmerman -- Netflix )

"guava is to Java what curator is to zookeeper."
I believe this statement just perfectly states what curator is..
Simple by providing examples, and you are confident to use by knowing that it is part of Netflix OSS  which is accounting for 34.2 downstream traffic in US.
For this project,  simplifies Zookeeper usage by wrapping it and providing an abstraction over it you even do not need reading documentation.
Although Jordan is the only person providing answers to the questions, you get them very quick whenever you raise smthg in the mail list.

2. Netty (Norman Maurer)

This simplifies network programming. very strong and very powerful in performance. Many(like storm, hornetq) open source projects already using it. It has a huge detailed documentation and Norman keep working on tuning it.


3. Zookeeper(Yahoo Engineering -- Apache 2 - Benjamin Reed& Flavio Junqueira)

This tool is a great problem solver and pain killer in distributed environment. Every problem you will meet is highly likely already met and solved. Gives you coordination ability.There is a big commiter list behind but I like these 2 guy because of the  book they published.


4. Esper (Thomas Bernhard - Gpl2)

I believe this is the number one CEP tool exists. Simple to use. very well documented.
And if it does not use any reflection Ill definitely put this one to the top of the list.
However performance wise it has a good bit room to go. May not be the perfect match for real time data analytic area if you target high(million per second event rate.) In that sense I would suggest you to write one according to exactly your needs. Implement your sliding window, pattern matching, filtering , enrichment algorithms in the way you like and just suiting your use case.
On the other hand if performance is not your number one requirement or you are ok to use more hardware, then use esper with its support license.


5. Hazelcast (Fuad Malikov)
I like to use publish subscribe model of the hazelcast. dead simple pain free tool developed by very skilled one.

6. Yammer - http://metrics.codahale.com/ - (Ryan Tenney )
Must tool for your instrumentation requirement.

7. logback (Ceki Gulcu)
I cannot imagine logging without slf4j, log4j and updated log4j => logback.
which means I cannot imagine logging without Ceki Gulcu's contributions.

8. Storm( Nathan Marz Backtype, Twitter )
if you are just starting to develop distributed real time application, you have a huge and long way to go.
But getting storm, and using it is dead simple. Even only you use it for prototype or testing reason this has a very good educational experience as well. Even you do not use storm just follow Nathans blog and twitter account :), he has a very strong mindset that can direct you better.
My favorite posts of him are
1. http://nathanmarz.com/blog/suffering-oriented-programming.html
2. http://nathanmarz.com/blog/the-mathematics-behind-hadoop-based-systems.html
3. http://nathanmarz.com/blog/interview-with-programmer-magazine.html

9. Exhibitor(Jordan Zimmerman - Netflix)

I d prefer to use this for monitoring zookeeper nodes and make sure they are running.
but you can do more.

Why I do like this project is when you are using Zookeeper , the main challenge is to explain what is it to the non technical people or semi technical people . However when you open exhibitor and show the zookeeper tree structured db, and telling them each jvm in your cluster is seeing this picture and this is only stored in a central replicated place then it will make sense, and doing this with a single command line is just priceless.

10. Guava (Joshua Bloch - Google Engineering )

Especially in software I do not like components or libraries that responsible more than one thing. But guava is like a big Util class which provides you all the helper functionality, controlling null, cache, collection api, string operations etc..
and Also knowing that Josuha Bloch, author of the Effective Java ,is influencing the feature set and implementation of it , makes  you extra confident to choose it in your dependency list.


btw I should note that all of these are Apache2 except Esper being GPLv2.

30 July 2014

Trade In Warrior

For the ones who confuses the log level severity always, I invent this :)

Trade In Warrior

TRACE << DEBUG << INFO << WARN << ERROR

06 April 2014

Cool Software Things Volume I


Continuos Refactoring

Refactoring is touching the code , when it starts to smell. Long story short summary, your code starts to smell when it has duplications, long method names, long parameter lists, bloodless objects or objects which has more than one responsibility or methods more than one task or parameters has more than one meaning. Addition to that you cannot have message chain with so-called object orientence with so many delegations. And Don't forget Your code should be the documentation and documentation should be your code so writing comments are something bad, your code should be self explanatory and not require comments to explain how implementation is working.(Excluding commenting on interface. comments on interfaces are explaining the contract.). You may need refactoring if your code has one of those and here is How to do it? Answer 1, Answer 2
refactoring should be a continuos activity as you grow your product. Adding a new fix, adding a new feature, adding a new test should trigger refactoring request.

Right Software Methodology

So far I have been in the organisations applying Waterfall, SDLC, Agile. I believe software methodology is key interface in implementing software management. However What I observe is implementing software methodology is also quite important as selecting them. Companies should be aware taking the methodology as a template and applying to their own way of workings. I strongly believe In the wrong implementation of Agile you can end up with having less productive team than a flexible waterfall team. Methodology you choose should be lightweight, and you should not dictate the methodology by repeating terms and philosophy like a parrot all the time. This should be consumed naturally. The way you apply and needing should be the common sense.
For a brand new organisation my advise would be to apply the procedure below;
1. pick NONE.
2. continue working
3. struggle for a certain issue,
(you will definitely see people crying on certain things)
(your people will cry differently than the others, so don't copy paste)
4. search for an agile practice
5. apply the found practice or create a new one together
6. return 2


Delete Code

Comparing the test done, (unit test, integration test, black box test, white box test, functional test, verification test, production test, customer acceptance test) and code written, it is obvious that written code is only a small fraction of the all tests done. Moreover to that, we are observing that only small piece of the code written is actually working. Most of the code is over-designed for some never happening future feature requirement, or afraid to touch because it is not understandable.
When we bring all this together , I believe deleting code is a very valid skill. if you see things over engineered than sooner or later you will end up having your code smell. But if you think a piece of software is unnecessary but somehow that part is tight to another code or not necessary at all , than question it. This will save considerable amount of unit testing time and let other developers save their time to focus on the valid part when trying to understand the code or maintaining it.



Next: Api Design, But, Extending Runtime, Ramp up fast, Immutability, Water, Smallest thing that works