Author: way0utwest

  • Microservices and Databases

    I ran across a post on microservices recently and was intrigued. I always like the idea of loosely coupled, independent items in software. However the idea of microservices causes issues with databases. Here’s the section in the piece by Netflix: Create a separate data store for each microservice.

    I tend to think of microservices is very small, tightly bound components of software. If that’s the case, how can I separate each item in a database? Do I want dozens of databases?

    I got in an argument with a developer a few months ago about this. The developer was sure that having separate databases (or stores) for each component wasn’t an issue. For things like banking and similar transfers, I’m not sure a microservice can be separated safely and still ensure integrity.

    This is a tough concept for architecture, and I need to read more and understand how this could work in practice. I suspect that in places where things could be separate, you could easily use schemas in a database to separate out microservices from each other. If each service includes its own connection information, then using schemas would work and still allow for scale out to other databases if needed.

    This is an area that certainly fits larger scale applications like Netflix and Spotify, but for many of us, our applications seem to be more tightly tied together.

    Or are they?

    Microservices are much like Service-Oriented Architecture (SOA), which I think fits many applications. I’m not sure how similar the concepts are, but this is certainly an area I’d like to learn more about.

  • Source Code Security

    I’m not surprised, and I had expected to read about something like this much sooner. Apparently someone at the ride sharing company, Uber, posted a security key online in a GitHub distribution. I assume this was some sort of code repository for Uber that may or may not have been supposed to be shared publicly, but having used GitHub, I could see someone making a mistake and accidentally putting private code in the public space.

    Uber is worried as the key is a security authorization key used to access their databases. Someone apparently downloaded Uber database files and now Uber is attempting to track them down. The whole situation is a mess, but there are a number of problems here that we could learn from.

    I give a talk on encryption options in SQL Server and one of the main problems I see with symmetric keys in SQL Server is that they can be reproduced with the same parameters passed to CREATE SYMMETRIC KEY. This means that your source code is now a security hole, at least if the production values are stored in a VCS.

    However that’s a no-no. Developers shouldn’t have access to account information or keys that are used in production. There should be separate credentials used in development, precisely for this reason. If someone gets your code, or hacks a dev machine, they shouldn’t be able to jump to production.

    There’s also the issue of using a service like GitHub, or any online VCS. The distinction between private code and public code shouldn’t count on a human checking or un-checking the right box. I’d like to see some better separation, perhaps requiring separate accounts and connections for public and private distributions.

    As we see here, convenience can easily result in poor security. That’s not a trade-off we should be making with our security and applications. Especially not for software developers.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.5MB) podcast or subscribe to the feed at iTunes and LibSyn.

  • Toshiba Portege Z30 Review

    I saw recently that Grant Fritchey wrote a review of his laptop, the Portege Z30. I had noted Grant’s issues with laptops and waited to see what he got last year before I replaced mine. I actually had the chance to compare his Z30 with my old Lenovo T430 in Washington DC and was impressed.

    With my old machine randomly failing, I decided to duplicate Grant’s efforts and get the same model. I figured we could support each other, and any issues one of us had, the IT department at Red Gate would gain knowledge as well.

    Size and Shape

    I used to have a MacBook Air and was thinking to go back to one, but since it wasn’t updated to contain 16GB, I couldn’t. I considered a MacBook pro, but they are a bit heavy, and the Z30 was fairly light. Here’s a shot of it.

    Photo Mar 30, 11 07 23 AM

    It’s definitely thicker and heavier than the Air, but it’s thinner and lighter than my Lenovo, so that’s nice. This is actually the test I use for laptops:

    Photo Mar 30, 11 07 34 AM

    Since I’m on the go, and I can be getting on and off podiums, I need to be able to easily carry this one handed. Not that I always do, but I want to. I can’t do this with a MacBook Pro and it was hard with the Lenovo. Here it seems to be OK.

    The construction is metal and fairly solid. Not a lot of flex. The thin frame with rounded corners also easily slips in and out of my Everki bag, something that wasn’t the case with the Lenovo.

    Keyboard

    I think the keyboard is important and I wished I’d spent a bit more time on Grant’s. It’s loud, There’s a noticeable clacking when I type and the travel isn’t great. I’m not sure what to make of it. It’s mildly annoying to me, but not overly so.

    the layout is good. Better than the Lenovo or Air for me. That’s the key, it’s better for me.

    Photo Mar 30, 11 20 23 AM

    I used the arrow keys a lot when demoing and having them separate is good. The Lenovo surrounded them with Page Up/Down, which forever caused me issues. Backspace/delete as well placed for me and I’ve easily learned where they are.

    Backlighting is automatic, as you type. Slightly annoying when I need to start typing in dim space, but I can hit a key and then backspace and be fine.

    The trackpad is too large for me. My palms always hit it, so I’ve disabled it. I use the pointed (blue button in the middle) exclusively, which is OK. I haven’t gotten it tuned well for my use. It’s either too slow or too fast (hence arrow key use). However it works just like the Lenovos.

    The buttons, however, on the trackpad feel cheap. They travel and click too much. We’ll see how they wear over time.

    Screen

    The screen is pretty nice. I didn’t notice this as being amazing, as I did with a few cell phones, but it does look good. It handles bright sunlight fairly well, and I haven’t add brightness issues during indoor use. You can get specs from the Toshiba site.

    It’s a 13" screen, which works for me. The resolution is fairly good, but I’m not too picky here so you’ll have to make your own judgment.

    I will say that I like the touch screen. I do a lot of reading and scrolling around, and I’ve found it handy to reach up with my right hand and scroll while I’m holding the laptop with the left hand. I don’t use it to select or press buttons often, especially as edit boxes often bring up the on screen keyboard. That’s really annoying.

    On the upside, I can use VGA or HDMI as outs to a screen.

    Ports

    I present with my laptop, so having a few USB ports is a must. The new Air with one port doesn’t even come close for me. I often need two USB ports for a mouse and my presentation device, plus power. Plus display.

    This is a good laptop for me. It has two USB-3 ports on the right side and 1 on the left. That allows me to move an adapter depending on where I’m presenting. This also has a hard Ethernet port, which has saved me in a few hotels or venues where the wi-fi didn’t work. Not a big deal, but nice.

    All ports are on the sides. Nothing in back.

    Power

    This is one of the big things for me. We have a power brick, but it’s tiny. It’s light. It’s a few ounces, which is amazing after the larger ones that I’ve had. It’s probably lighter than the Air adapter, though it’s still the power cord plugs into the adapter, which plugs into the laptop.

    One thing I’ll note is I forgot my adapter in Europe and had to buy a new one. A generic one, putting out the 19V worked fine. Nice to know I can easily find one, and now I have a US and UK adapter, which suits my work.

    Overall

    I’ve been using the laptop for about three months now, and it’s one of the better machines I’ve owned. The keyboard and mouse buttons are the only downsides for me. The i5 and 16GB of RAM perform great. The SSD has been fast, and I can hook up an external when I need it and still have my two ports free for other use.

    I’d have to say I’d recommend this if you need 16GB of RAM. If you can get by with less, I think you have some other choices in the ultrabook range that I’d look at.

  • Software Engineering in Practice

    I ran across a review of a developer’s first year at a company. The company is endjin and the poster describes their first year as a “software engineer apprentice,” which is an interesting way to look at one’s early career. While it’s not for everyone, I suspect that many developers in this business could actually use a bit of apprentice time to solidify their foundation of knowledge.

    The post talks more about the way in which the work is done than the actual tools involved. A few are mentioned, but this is really a look back at the philosophical way in which the company solves problems. More importantly, it’s the view of an apprentice learning a trade.

    I wonder if this apprenticeship mentality might make a good approach for DBAs. It seems so many people working with databases lack fundamental SQL skills and even thoughtful approaches to solving problems. There are people that grow to be experts by diligently working through complex problems on their own, but it seems most people don’t get solid grounding in relational principles, or even learn good engineering practices, like measuring systems before and after changes are made.

    Many companies rush to get work done. They want code written quickly, which I completely understand. However if your staff isn’t well grounded in building solid code, then I’m not sure that poorly written applications are getting work done quickly. I suspect they’re just getting something done, which then has to be fixed, enhanced, and refactored before it allows work to move faster (if at all).

    All of that takes place in the time that it might take someone with more skill to do it well the first time.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.0MB) podcast or subscribe to the feed at iTunes and LibSyn.