Wednesday Nov 19, 2008

Debug tracing in JavaDB

JavaDB (a.k.a Apache Derby) has a lot tracepoints that could be very useful when debugging complex issues. The best part with them is that these tracepoints are logically grouped together. When enabled, traces related a particular logical section of the code can be obtained. e.g. If you are looking for information around Locks in the JavaDB system, then you could simply enable the LockTrace. The list of such logical components is really huge in the JavaDB system.

The simplest way to define these debug properties is to use the derby.properties file in the derby.system.home directory. To enable debug tracing for Locks and Cache systems in JavaDB, you could add following in the derby.properties file,

derby.debug.true=LockTrace,CacheTrace

Similarly, you can define 'derby.debug.false=XX' for disabling the debug trace for a particular set of components.

The complete list of debug properties can be found here. Try it, but only if you can handle the huge output that it generates most of the times.

Thursday Jan 31, 2008

First contribution to Apache derby from Code For Freedom contest

Code For Freedom Contest, as part of the university program at Sun has been running for a few months now. Apache Derby is one of the 5 Open source technologies participating in this contest. We recently had our first contribution to the Apache Derby project through this contest. Jazarine Jamal, a student from Amrita University has contributed Derby-2239.

Apache derby has not been very active project in this contest until very recently when a bunch of students from this University started participating. I have been working with few of the students as their mentor to take them through this fun ride. Last few weeks has been a great mentoring experience for me chatting with them to get their way through building, reproducing, debugging Apache derby code in Netbeans.  The students have shown great amount of interest and sincerity in their activities and I feel happy that we have crossed the initial hurdles now and have established some expertise in the college which other students can leverage. I really appreciate the traction generated among the students by their faculty member Mr. Vipin as much as the enthusiasm shown by the students.

There are some more contributions in the pipeline and  I am looking forward to many more from this college. It is a great success of the contest that it has built a good platform for many more contributions to Apache derby and it will hopefully continue to grow even beyond the scope of this contest.

Monday Nov 26, 2007

OSDB at Sun Tech Days, 2007, Shanghai and Beijing


OpenSource Database technologies such as Java DB and PostgreSQL got a lot of attention at Sun tech days in China. This blog is enough evidence of the busy times we had at the database booth at Shanghai tech days. The story was the same at Beijing with even more people visiting our booth.

China is very impressive! They have a strong and matured developer community. We do not get to see them, work with them in the communities much, may be because of the language barrier there is, but I was actually amazed by the kind of knowledge and expertise they have. It will be really nice to see more of them in the communities.

During the course of both the tech days, I interacted with a lot of people, mostly developers, marketing folks and students. I was doing a dual role at Shanghai evangelizing Java DB and PostgreSQL, as we had only one booth for both the technologies. At Beijing, we managed to have separate booths and I was mainly doing Java DB. Manyi's talk at Shanghai tech days was a great success for the kind of
response we got and the amount of interest that was shown in Java DB by the audience.

It was very overwhelming to see that the developers were keen to understand how they can use Java DB in the multi tier system. This was a very frequent question that we faced including few very focused discussions around how Java DB could be used in the middle tier for their specific design. I genuinely felt a need for more focused talk on 'Java DB in multi-tier architecture'.

Another frequent question that is worth a mention here is weather it is possible to use Java DB in consumer and mobile devices. The fact that there is more demand in china/japan for sophisticated gadgets, this was not so surprising. It was really useful to talk to many developers and understand their applications. In a lot of their applications like test automation systems, in-house group blogs and other web based utilities, I could help them understand how Java DB could be useful. Given the amount of good work we are doing at the Apache derby community, it was satisfying to see that people will benefit from its rich feature set.

The trip was a great experience and having Manyi Lu and Wei-chen Lu (who can speak chinese fluently) was a great help for me to be able to interact with people only speaking  Chinese.

Manyi also shared her tech days experience, that is available here.

Thursday Oct 04, 2007

Indians are googling Java DB !!

A simple query on google-trends shows that Bangalore, the software capital of India and chennai, the next one to bangalore, are topping the list of  Java DB demand. Asia is at the highest spot among the regions and India is at the top.

hmm... Interesting !
 

Friday May 25, 2007

JavaDB on JavaME platform

As the consumer devices get more sophisticated, more complicated applications will run on devices and there will be greater need to manage the application data. The need for running database engine on small devices will thus be very critical.

JavaDB, a cost effective, easy to use, fully featured, pure Java database with a very small footprint (2MB), looks very promising  on small devices. I tried running it on the latest phoneME advanced (JavaME CDC) platform and could not resist the excitement of putting the details together in this blog. The procedure is very straight forward.

Prepare your setup as below, 

1. Get the latest phoneME advanced platform. Currently, it is supported only on Linux-x86 platform.
2. Get the latest JavaDB release.
3. You also need the JDBC Optional package library for CDC platform. It can be built from the source using the step by step instructions.

Now, try following on your linux box,

<CDC_HOME>/bin/cvm -Xbootclasspath/a:<JDBC_OP>/foundation_jdbc.jar 
-cp <JAVADB_HOME>/lib/derby.jar:<JAVADB_HOME>/lib/derbytools.jar
-Dij.dataSource=org.apache.derby.jdbc.EmbeddedSimpleDataSource
-Dij.dataSource.databaseName=sample
-Dij.dataSource.createDatabase=create
org.apache.derby.tools.ij

Note here that the JDBC Op package can also be built along with CDC binaries, as mentioned here. then, Xbootclasspath need not be specifed while running. By default, the CDC build does not include JDBC Op package, hence we include it in our example.

Please note that, JSR 169, The JDBC Optional package does not support java.sql.Driver. So, the 'ij' cannot be used in its typical form to connect to database via a JDBC driver. The connection in this case is established using the JDBC DataSource.

This will bring up the íj prompt. 'ij' provides Command Line Interface to interact with a database using SQL. You may create such connection directly from your ME application using DataSource objects. You can try some simple steps like below to further test this setup.

ij> create table t (id int not null, addr varchar(20));
0 rows inserted/updated/deleted
ij> insert into t values (1, 'PlanetSun');
1 row inserted/updated/deleted
ij> select \* from t;
ID         |ADDR                
--------------------------------
1          |PlanetSun           
1 row selected
ij> exit;


Any database that may have been created by desktop Java application can be read/modified on JavaME platform and the same database can be used by the desktop application again. This can be accomplished so easily only with Java-JavaDB combination!

Tuesday Feb 27, 2007

JavaDB at Sun Tech Days 2007, Hyderabad


The Sun Tech Days 2007, Hyderabad saw around 10000 people this year and was probably the biggest event in its history so far. The event featured many Sun technologies over the span of 3 days. The first 2 days followed a typical Tech Days course that included talks, hands-on sessions, the pods and the last day was dedicated to Netbeans, OpenSolaris and JavaME technologies running in parallel.

 

Manyi Lu, presented introduction to JavaDB in the Java track on the first day. The presentation was attended by around 800 people and was received very well.

Anurag and me, along with Manyi, manned the JavaDB pod that was setup for the first 2 days. Anurag had prepared a demo showing a  catalog application using JavaDB. The classic "Derby Tax Demo" was also on display.

 

Total turnout at the exhibition was really huge and it was difficult for 3 of us to engage with everyone during the breaks. Students from local universities were more than the corporate representatives at the event. It was really overwhleming to see the interest shown by the corporates towards JavaDB. At the stall, we interacted with people representing government organizations (including Indian Space Research Organization), IT & ITES companies and various Training institutes apart from student community.

 JavaDB pod at Sun Tech Days 2007 

 The most frequent question we had to answer was, "How different this is from already available DBs in the market and especially Oracle?". We spent a lot of time telling people about how JavaDB is targeted for different set of DB applications (what we call them as departmental apps), explaining them about the key features of JavaDB and I believe people were satisfied as a lot of them seemed to be really keen on using JavaDB. Many DB developers were impressed to see a fully featured db engine packaged in just 2MB binary size.


Following is the list common questions asked,

      • Are there any migration tools from MySQL and Oracle to JavaDB?
      • Can we access JavaDB from PHP?
      • Are there free online courses on JavaDB?
      • Are there clustering capabilities in JavaDB?
      • Is there any in-built GUI ??

 
We also got an opportunity to interact with corporates who brought up their specific use-cases/apps where they can consider JavaDB. We had discussions on specific features of other DBs which they find very useful and if JavaDB supports them. I am happy to say that all such features that we talked about are either already integrated or are on our roadmap (migration tools, grant-revoke, blob/clob support). Some students and corporates were keen on being a part of the community and contributing to it.

 

I think the event was a great success from JavaDB perspective in terms of increasing awareness among the huge developer community in India.

Madhu posted pictures of the entire event which is definitely worth a look.

Thursday Jun 29, 2006

JavaDB/Postgres Support now available from SUN

Sun has recently announced Support for Open Source Databases, Postgres and JavaDB with announcement of Solaris10(Update2). Service Plans are now available for the customers with Solaris 10 OS 6/06 (S10 U2). While Postgres support is available only on Solaris, please note that JavaDB support is available on Solaris, Linux, Windows & HP-UX platforms.
Customers need to contact their local Sun representatives for pricing information.

The official page on the sun site is here.

Monday Apr 03, 2006

JavaDB is now available!

Good news for Apache Derby - Sun has gotten behind Derby and is also going to provide support for it.
Sun's Java DB is now officially available for download at here.

Check out Java DB's home

Also, the article talking about how to use Java DB in the desktop got top billing at Sun.

About

user13377336

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Blogroll

No bookmarks in folder