Posts Tagged ‘C/C++’

A few great weeks for MariaDB

I think MariaDB has had a great few weeks recently and the timeline of these events are important.

  1. 27 November 2012 – WiredTree Adds MariaDB for Faster MySQL Database Performance (well worth reading their motivations to switch)
  2. 29 November 2012 – Monty Program & SkySQL release the MariaDB Client Library for C & Java
  3. 4 December 2012 – MariaDB Foundation is announced, see ZDNet coverage.
  4. mid-December 2012 – Wikimedia Foundation starts migrating Wikipedia to MariaDB, not for any other reason besides the fact that the Foundation was announced (more ZDNet coverage).

Now, there have been rumors that the client libraries are just rip-offs or relicensed. They are not. They’ve been in works for customers for several years now (yes, Monty Program does need to pay the bills), and there are many a feature difference. This will be addressed next week to ensure that people know what they’re getting.

There have also been rumors that the foundation was announced with regards to the connectors. Wrong again. Connectors were announced first, foundation came later (see timeline above). You don’t do these things in a span of one week, the talk for the foundation has been going on for months. I should know, as alongside Monty & Rasmus, I’ve been somewhat involved.

I agree that we need better communications (remember to like us on facebook, follow us on twitter @mariadb), and we’re working on it. Its also that time of year when people love to take vacations (I am one of them). All that said, watch http://blog.mariadb.org/ closely as that’s the official channel for all things MariaDB.

2012 has been a great year for MariaDB in general, as the project grows, we get more coverage (see news reports), unparalleled downloads thanks to our 5.5-series being released, and our expanding product lines. I can forsee 2013 being even more exciting. Thank you all for an amazing 2012.

Happy new year and here’s to a great 2013!

MeeGo: Quick thoughts on the Moblin and Maemo marriage

I’ve been excited with the Maemo platform for a few years now. I after all, had the Nokia N770, their first tablet that had Maemo on it. But as soon as they released the N800, things weren’t backward compatible, and due to frustration I gave up on the platform (the devices themselves were very difficult to find). All this changed sometime in January when I walked into the Maemo Lounge of the Nokia Store in London – the Nokia N900 was impressive. But it wasn’t for sale internationally.

Last week, I found out that Nokia will sell the device in Malaysia, Singapore and probably many other regions. I also had the opportunity to use the device for a couple of hours, and while I had a bunch of suggestions, I did like it. Maemo 5 is a clear win, and there’s going to be a lot more work to make Maemo 6 rock even harder. Simply put: the N770 was relegated to sitting by my bedside table after a while, but the N900 is something I would definitely carry in my pocket.

But that’s not the big news of the day. MoSync currently supports writing mobile software, that runs on Java ME, Symbian S60, Windows Mobile and Moblin platforms. If you notice, the coming soon is clearly: Android (I’m told it will appear real soon now), iPhone (a lot more difficult than you think), and Maemo. After playing with a Maemo 5 capable device last week, I was almost certain that this is a good future platform to bet on – I know, today it seems all the cool apps only run on the iPhone and the Android, with maybe the BlackBerry thrown is an afterthought, but I think Maemo will help Nokia rebuild/rebrand itself.

What better news, than to see Jim Zemlin announce to the world, that Intel’s Moblin and Nokia’s Maemo projects are being embraced by the Linux Foundation, to create a new “uber-platform”, called MeeGo?

Now, to crystallise some quick thoughts on this:

  1. When the N770 came out (and subsequently the N800, and the N810 – both devices I did not purchase), I would ask – where was the GSM chip? You create a fancy tablet, but you leave out the GSM chip. If I wanted to do voice, I’d have to use Gizmo Project (now Gizmo5, which has since been acquired by Google). Skype came later, only to the more modern devices. So, while the N900 is welcome, its been about 4 years since the first tablet was launched – what took Nokia so long to pop a GSM chip in?
  2. The promise of Linux on the phone has been met – Google unleashed Android to the world. From the G1, to the Nexus One, and the market of folk building against their devices, like HTC, Motorola, etc. And people have been happy with it – look at the endorsement Linus Torvalds, creator of the Linux kernel, gives to the Nexus One. A part of me asks – is this too little too late from Nokia?
  3. Moblin didn’t quite excite me, and I never took a look at the platform till I became involved in MoSync. But I can see where Nokia is headed – they are providing stuff in the “one connected device” mantra, and the N900 is their first take with truly mobile computing.
  4. From a developer’s perspective, you better be brushing up on your C++. Its quite clear that this will largely be driven by Qt. I forsee heavy investment in rich-applications provided by the Web Runtime widgets (WRT). You will also be able to build applications cross-platform (no need for a Microsoft Windows-based host, to create Symbian applications for example), and you’ll probably be creating some sort of cross-compiling development environment (Maemo has largely been ARM, Moblin is largely X86) to get apps going.
  5. MeeGo while it has been announced, is not completely concrete yet. You can see that there are no prepared downloads, but you can whet your appetite on their architecture documentation (note: GTK/Clutter left behind just for application compatibility – I’ve been away from the Maemo community for a while, but from what I gather, Qt has become the hype du jour these days), some information on Qt Creator (which runs on Windows, OS X, and Linux), and a quick introduction to creating your first MeeGo application.
  6. If you want to follow further resources, check out Quim Gil’s blog, as well as Ari Jaaksi’s blog. It probably wouldn’t hurt following Planet Maemo either.
  7. If Intel, Nokia, and the Linux Foundation get their act together, and gather buy-in to create all the cross-devices, it can be really useful for application developers – its going to get more reach. I don’t see why we won’t see an iPad competitor anytime soon, for example. Imagine running the Bloomberg application on your television, on demand. The possibilities are endless as we get more connected.
  8. Currently, while no devices support MeeGo, I expect the Maemo 6 platform to be MeeGo compatible. Will Nokia update the Maemo 5 software on the N900 for free? I hope this is true – otherwise the N900 owners aren’t going to be too happy, that they’ve got an outdated phone on their hands. Keep in perspective the leap from N770 to N800, and the OS differences (being bitten once, I’ll be just this more cautious the next time around).
  9. From a MoSync perspective, it looks that we may already support the new MeeGo platform to some extent. Once more developer SDKs come out, we’ll be able to update the community on this. And as a developer, supporting Moblin/Maemo (MeeGo), and other platforms, can be a real win for your application.

All I can say is: exciting times ahead. I’m glad to see Nokia isn’t just supporting Symbian based devices any longer, and are moving with the times. There’s an uphill battle to build interest amongst the developer community to be developing against their platforms – only a lot of evangelism and love is going to make this happen. Today’s web services completely ignore S60, but maybe they’ll jump on Maemo or MeeGo. And maybe we at MoSync can help them too (I bet once we get Android + iPhone support, it will look a lot more compelling).

HOWTO: MySQL Connector/C++ on Mac OS X

Excited with the release of the MySQL Connector/C++, I thought I’d get it going on Mac OS X.

You’ll first hit the problem that Mac OS X doesn’t come with CMake. So you’ll have to download it from the site – there’s a warning there that the .dmg installer only works for Tiger, but I ran it on Leopard, and its just fine. Don’t forget to allow it to create links in /usr/bin for ease of use.

After that, you will need to install glib. But to get glib going, you need some dependencies:

Installing them is simple: untar (tar -zxvpf package.tar.gz), ./configure, make, then a sudo make install.

Now, the README file or the instructions on the wiki will just work. I have several MySQL installations, so I preferred to specify what cmake found. I did this by:
cmake -D MYSQL_DIR:PATH=/usr/local/mysql/ -D GLIB_DIR:PATH=/usr/local/lib/glib-2.0/ .

Then a simple make, and you can go on and try the examples, in examples/. Try the connect application to make sure things are working. You will probably run into a snag though:


luna:examples ccharles$ ./connect
Connector/C++ connect basic usage example..

ERR: MySQL_DbcException in /Users/ccharles/code/mysql_connector_cpp_1_0_0_preview/examples/connect.cpp((function n/a)) on line 159
ERR: Cannot connect (MySQL error code: 0 )

Take a look at examples/examples.h, and look at the connection properties. It uses the test database, on localhost (127.0.0.1), standard port 3306, user is root, and the default password set there is root too. This may not be the commonest setting, so don’t hesitate to change the password or leave it blank (ala a default install), and rerun make. The sample applications will now work :)

Congratulations to Andrey, Ulf, and the rest of the connectors team in getting this going!


i