ODBC vs RESTful API

31. August 2012 00:55 by Cameron in C++, Qt  //  Tags: , , , , , , , , , ,   //   Comments

In the process of writing the IGA desktop application, I've been faced with several design decisions. One of the most challenging decisions I had to make was how I should most effectively interact with a database backend. To help with this decision, I weighed out the pros and cons of using ODBC and a RESTful web API. Each of these methods are very good for certain purposes.

ODBC

Pros

  • Cross platform support through C/C++ libraries
  • Secure using username and password (connection encrypted)

Cons

  • Some ISPs/Schools block port 1433 (used with SQL Server) or other database ports (MySQL, Postgre, etc)
  • Slow response time in some instances (running multiple queries can take a fair amount of time)

RESTful API

Pros

  • Fast response time
  • Abstracts data backend - i.e. allows for an easy switch of database servers or switch of web server languages
  • Easily allows for multiple desktop and mobile frontends by adhering the web API interface (ODBC isn't usually standard in mobile platforms)

Cons

  • Requires tighter security
  • All requests must be encrypted using SSL or  plain text is sent to the server
  • Requires some sort of authentication either by API key or other method to prevent arbitrary access to server

Ultimately, I decided to go with using a RESTful web API for maintaining separation of the database architecture from the IGA desktop application. This will allow me to change the database backend without breaking the application as long as I keep the API interface the same. Another huge factor in choosing a RESTful web API is that my school blocks port 1433 on its campus wireless networks. I want college students to be able to use the IGA desktop application while on campus so this was a necessary choice. Overall, both provide advantages and disadvantages and neither one is "better" than the other. I hope this helps people with the decision between ODBC and a RESTful API.

MSI GT70 0ND-202US Gaming Laptop/Hackbook

28. August 2012 00:51 by Cameron in   //  Tags: , , , , , , , , ,   //   Comments

I recently bought a gaming laptop from MSI on Newegg with some pretty excellent specifications:

http://www.newegg.com/Product/Product.aspx?Item=N82E16834152347

Laptop: MSI GT70 0ND-202US Z77M, Intel Core i7-3610QM 2.3GHz, 12GB DDR3 RAM, 750GB Hitachi, 250GB WD, NVIDIA GTX 675M / Intel HD 4000 (Optimus), Realtek HD Audio (voodoohda), Wireless-N Atheros 9285 Half mini PCI  Express Card - Windows 8 Professional x64 RTM, OS X Mountain Lion 10.8.2 Retail

Preinstall

To install OS X Mountain Lion, download the Mountain Lion installer from the App Store (MacOS X 10.6.8 or higher) and use Unibeast to create a USB installation disk. Once the disk is created, you can then boot from the flash drive to install Mountain Lion! At the boot prompt, be sure to boot verbose using the '-v' option and also set 'GraphicsEnabler=No' as at the time of writing this guide, the NVIDIA GTX 675M cannot be used as the primary GPU and the Intel HD 4000 will need some tweaks later to get QE/CI. Once in the installer, you will need to choose where to install OS X Mountain Lion. You can install to your existing disk on a separate partition or install to a secondary disk (recommended). You will need to make sure that the hard drive you are installing ML to is using the GUID partitioning map and not MBR. If you need MBR, you'll need to patch the installer.

Postinstall

Multibeast

Wifi

The MSI GT70 0ND-202US comes stock with an Intel Centrino Wireless-N 2330 mini PCI Express card which will need to be subbed out with another compatible card. Swapping cards is fairly simple. All you need to do is pop up the speaker panel and disconnect the existing card and replace with the new one. One thing that you must do is make sure the Wifi LED is lit, otherwise, you won't be able to use the card. Here's a complete guide on how to choose an appropriate replacement card and how to get it working: http://www.tonymacx86.com/network/58146-guide-airport-half-mini-pcie.html

Intel HD 4000 QE/CI

Using the MacBook Pro 9,1 SMBIOS, LegacyAGPM.kext, 1920x1080x32, and DSDT injection for 01660004 you can achieve QE/CI. It should also be noted that I have removed AppleIntelSNBFramebuffer.kext as it is not needed with the Intel HD 4000 (probably could stop the kext from loading with DSDT later). Here's the DSDT patch for injecting the ig-platform-id:

into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
        Method(_DSM,4,NotSerialized)\n
        {\n
                Store(Package(0x02)\n
                 {\n
                                "AAPL,ig-platform-id",\n
                                Buffer(0x04)\n
                                {\n
                                   0x04,0x00,0x66,0x01\n
                                },\n
                        },Local0)\n
                DTGP (Arg0,Arg1,Arg2,Arg3,RefOf(Local0))\n
                Return(Local0)\n
        }\n
end


Using DSDT Editor, you'll have to apply the above patch as well as the DTGP patch from the patches directory.

Sound

VoodooHDA 2.7.2 - note, you'll have to edit the Info.plist in VoodooHDA.kext so that there isn't a hissing sound coming from the VoodooHDA prefpane. 

USB 3.0 fix (temporary)

One thing that I have found is that if you remove AppleUSBXHCI.kext from the plugins in IOUSBFamily.kext, it will treat USB 3.0 ports as just USB 2.0 ports and crashing no longer happens. This is a temporary fix until full USB 3.0 support exists (possibly in a later update). Make a backup of your existing IOUSBFamily.kext and then do the edits and re-install using Kextbeast.

Kexts

 Here's the voodoo kexts that I use for my laptop. Included is a kext for the battery, audio, and trackpad (multitouch).

voodoo_kexts.zip (212.01 kb)

 Here's my patched DSDT. As I make edits to my DSDT, I'll upload this attachment. I hope this helps for anyone with my laptop or similar.

dsdt.aml (47.02 kb)

 

 

Month List

Tag cloud