Thursday, 21 July 2011

Website for managing tasks - RememberTheMilk

How not to forget great ideas and things to do?
I can recommend the website for managing tasks.

Try http://www.rememberthemilk.com/

You can use it for free in the browser. Only smartphone applications are paid. But it is a big plus to have the access not only on the computer, but as well on your phone.

It is owned by Yahoo, so don't be afraid that all you have typed in may one day disappear!

Usability of this site is also quite good. Just give it a try!

Wednesday, 20 July 2011

Revolution with JRebel

I have installed JRebel on my Eclipse.

It really makes java development faster. You do not have to restart application or application server after changes in Java classes any more.

To see how to install it in your IDE, go to:
http://www.zeroturnaround.com/jrebel/documentation/

To quote statistics from JRebel site:

* 17.5% - the average percentage of coding time spent redeploying (this varies on the size of the app, of course)
* 10.5 - the # of minutes wasted per hour of coding
* 4.38 - the # of hours wasted per week
* 5.25 - number of full work weeks wasted per year (40-hour weeks).
* ...and over 18 hours per month of preventable redeploys during your JRebel LiquidMetal license period!

So you can try 30-day trial license and if you want to buy it look at:
http://sales.zeroturnaround.com/

Thursday, 14 July 2011

Vaadin Plugin for Spring Roo

Vaadin, a framework for fast deployment of applications (internally using Google Web Toolkit), has just gained Plugin for Spring Roo. Now it has gained even more productivity and gives easy start for those who want to try Vaadin.

It seems that Roo starts to be the platform for fast production and deployment prototypes for many web frameworks.

More info on:
http://vaadin.com/blog/-/blogs/spring-roo-tutorial and http://vaadin.com/book/-/page/rapid.html

Wednesday, 13 July 2011

Alfresco Team

New product from Alfresco family, Alfresco Team has just emerged. It is available in 6 languages, and fits neatly between the developer-focused Alfresco Community edition and the Alfresco Enterprise Platform. If you are looking to just get started with Alfresco or need a supported, departmental solution for content collaboration, then Alfresco Team is for you.

Alfresco Team™ is a pro-tool for content collaboration. If your team creates and collaborates on content - business documents, spreadsheets, presentations, designs, images, videos, or audio - Alfresco Team handles it. From the whiteboard to the final version, from your desktop to your mobile tablet, Alfresco Team has you covered.

This full install of Team includes 5 users and up to 500 documents (for free), runs on a Windows or Linux server, and can be easily upgraded to a paid subscription when you are ready to buy more users or support.

http://team.alfresco.com/

Monday, 11 July 2011

Thrift alternative for Web Services

Thrift - software library for exchanging data. It is a library for building RPC clients and servers with seamless communication across programming languages. That's all done by compiler generation code.

History:
It was created by Facebook team, to exchange data between modules written in different languages (C++,Java,Python,PHP, ...)

They found a few alternatives to use: SOAP (excessive XML parsing), CORBA (heavyweight, over-designed), COM by Microsoft (not open source), Pillar (missing versioning, abstraction), Protocol Buffers (closed source, owned by Google).

Due to those cons they started project Thrift.
In April 2007 they made it opensource and in May 2008 it was moved to Apache Incubator.
Now it is used by Facebook, Twitter, Amazon, Recaptcha.

Thrift is written in C++. They have not found any suitable library to use in C++ for thread management, so they developed also that part in the library, using Java Thread Library concepts as template.

Protocols:
Thrift allows to use following protocols: binary, dense encoding, json, useful for debugging. Protocol abstraction can be easily changed transparently from other parts of system.

Transport:
On the transport level we can used blocking/non-blocking sockets, files, shared memory.

Servers:
We have blocking, non-blocking, single threaded and multi-threaded servers.

Supported languages:
C++, C#, Erlang, Haskell, Java, Objective C/Cocoa, OCaml, Perl, PHP, Python, Ruby, Squeak.

Types:
Thrift does not add own types, but uses key types used in most languages and maps them to the ones used in the target language.

We have base types: bool, byte, i16 (signed 16-bit integer), i32, i64, double (64-bit floating point value), string ( UTF-8 encoding), binary: a sequence of unencoded bytes.

We have also containers of types: ordered list with duplicates (target ArrayList in Java), unordered set of unique elements (target HashSet in Java), map of unique keys to values. With compiler directives we can change container types for target languages.

We can declare structures, that will be mapped for classes in target languages. Every structure has a list of fields. Every field has unique name and numeric identifier. If can also have default value. If we do not specify identifier, than it will be added by Thrift. Identifiers are used for versioning. In the generated structure we have fields that inform whether the value was set by the other side of communication or not. Developer can decide how to treat this situation as an error or resolve inconsistencies.

f.e.
struct Book
{
1: string name,
2: i32 pages = 100,
3: Author op,
4: optional string comment,
}

We can define enums and exceptions, that will be compiled to abstract exception class in the target languages.

We declare services that are equal to defining interfaces. Compiler generates stubs implementing interface. Then in servers and clients we implements communication.

We can declare methods as void or async void. The first provides that the execution of method on the server was done, and the second only that the request to execute was done.

The scheme of usage Thrift is as follows:
create thrift script, generate code by compiler, write servers and clients using library objects.

Thrift do not support: cyclic structs, struct inheritance, overloading, heterogeneous containers, null return.

It gives: lower overhead due to the usage of binary format, simplify usage (no framework to code to, no XML), application-level wire format and the serialization-level wire format cleanly separated, soft versioning of the protocol, no build dependencies.

It can be recomenended for creating high-performance services, called from multiple languages when speed is a concern, but clients and servers are co-located.

http://thrift.apache.org/

Wednesday, 6 July 2011

Java not yet dead!

Twitter announced that it replaces Ruby on Rails front-end for search with a Java server.
I have recently read an article about Thrift architecture, where authors concluded, that Java thread architecture was the pattern for their solution. In C++ there were no library, that allowed them to get equal performance.
It looks like Ruby on Rails have similar problem.

Twitter after such change gained triple drop in search latency.

Ctrl + Space in Windows 7

I have upgraded OS. Now I have Windows 7 (with more then one system language set up).
So after installation of Eclipse I was faced with a problem of not working shortcut CTRL+SPACE.

This shortcut is used by Windows7 to change system language.

I have found a webpage with description how to fix it:
http://www.mkyong.com/java/content-assist-ctrl-space-is-not-working-eclipse/

Now it works!