Pages

Sunday, July 28, 2013

Beware to say "Treat warning as an error" in new GCC

Are you building your something using Gcc(>=4.6) ?
If yes, then you used be more careful to use "treat warning as an error".
Recently I tried to build zbase over Ubuntu 12.04 2 which uses Gcc (4.6.2) and I faced lots of problem.
And then I moved to Gcc(4.2), everything was too smooth. No error or warnings.

Then I looked into Gcc release details and came across with few important points:

  • -Wunused-but-set-variable and -Wunused-but-set-parameter warnings were added. Also the -Wunused-but-set-variable warning is enabled by default by -Wall flag and -Wunused-but-set-parameter by -Wall -Wextra flags.
  • Also you may face few linkers problem. I faced a one with jemalloc.
For more about changes have a look here :)

In drizzle , I have to include "config.h" in each file to get rid of this type of error.

Tuesday, July 23, 2013

Setting Up a Drizzle Development Ubuntu Box

Sometimes we just get bored to figure out dependencies for drizzle development.
Ubuntu have a drizzle-dev package for development purpose. But for me it's not sufficient.

I follow this particular steps for box setup:

  • Get Ubuntu 12.04 or whatever you like, install it on virtual box.
  • Now after setting up Ubuntu VM-Box. Open terminal and type:

    sudo apt-get install bzr drizzle-dev autopoint libboost1.48-all-dev libprotobuf-dev protobuf-compiler uuid-dev libcloog-ppl
  • Also you can try apt-get build-dep drizzle
  • Now compile source as mention here.

Thursday, July 4, 2013

What's new in Json Server ??

As a part of Drizzle , I just started changing the internals of JSON Server with the help of Stewart.
So, what's new ? . That is a big question for this plugin. Last time I did some re-factoring and implemented some new functionalities. Right now I am not focusing on functionality part too much. But yeah, plugin will come up with some new functionalities soon.

Previous version is capable of basic functionality like Insertion, deletion , selection etc. For more details look here. In previous versions , we generate a sql query by parsing json request and then execute that query with the help of Execute API. But Execute API restricts some functionality.

So I just tried to perform sql execution without Execute API. Now we just parse json query and uses parameter with Storage Engine API.

Right now we have two functionalities with such implementation:
  • Create Schema
  • Drop Schema
If you like to play with this, try out this branch (lp:~mohyt/drizzle/drizzle-json_server) .

How to play with it? , its too simple :
  • Start your drizzle server with json plugin enabled (./drizzled/drizzled --plugin-add=json_server)
  • Now send a curl request to create schema. For example,
 --exec curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"query":{"name":"json"}}' 'http://localhost:8086/json/ddl/schema/create'
  • And , to drop a schema , try this ,  
--exec curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"query":{"name":"json"}}' 'http://localhost:8086/json/ddl/schema/drop'

Comments are most welcome :)