Shared posts

25 Aug 15:10

The App Engine Way

The phrase “the App Engine way” is muttered around our office and wielded in our code reviews. As in, “Yeah, I know it’s counterintuitive, but that’s the App Engine way.”

It boils down to two principles about structuring data:

  • Denormalize
  • Do lots of work when writing to make reads fast

These aren’t obvious. It won’t be obvious to folks from SQL land that App Engine’s performance is tied so tightly to these ideas. It won’t be obvious that, since JOINs don’t exist, it’s really easy to write a bunch of code that 1) loads a Monkey entity, 2) looks at Monkey.zoo_id, then 3) queries for the monkey's Zoo…and that that’s bad.

So we use “the App Engine way” to remind ourselves of these fuzzy guidelines and spread ‘em to newcomers.

Denormalize your data — as in your Notification models should have all the data necessary to render themselves. They shouldn’t just point to the thing that triggered a notification. As in whenever you’re sitting around wishing you could just JOIN Zoo ON Zoo.id = Monkey.zoo_id you should actually be storing all of Zoo’s properties on each and every Monkey. Got billions of Monkeys? Who cares, copy the Zoo data a billion times. “Storage is cheap” and all that.

Do lots of work on write to make reads fast — as in your Post models should have their reply_count and vote_count and flag_count and monkey_count stored as properties on the Post itself. As in they should be updated every time a new reply, vote, flag, or monkey is brought into this wonderful world. As in any time you’re sitting around googling for App Engine’s version of SUM(), COUNT(), and AVG(), realize you should just be updating these aggregates every time they’re modified. As in whenever you write to a Zoo entity, kick off a task to update all denormalized copies on your Monkeys. Who cares if writes are a bit slower? This makes reads blazing fast.


Use the mini profiler or appstats to see a waterfall graph for your data-loading RPCs.

A simple rule of thumb for knowing when you’re done:

If you really care about performance, you should be able to create all of the data queries for an entire web request just from incoming GET/POST data and the currently logged-in user’s properties — no query-to-get-the-data-for-another-query allowed.

This is the price of entry for access to one big, enormous, whopper of a benefit: you get a datastore with consistent read/write performance no matter how big your data set becomes. Have a query that returns 10 items from a set of 10,000? Relax knowing that after your company blows up in 6 months, you’ll get the exact same speed when pulling 10 items from a set of 10,000,000,000.

07 Jul 18:14

Controversial genetic disorder treatment could get legal backing

by JLister

cell

The United Kingdom looks set to be the first country to give the legal go-ahead for IVF treatment that would combine genetic material from three people.

The technique, known as mitochondrial transfer, would be designed to stop mothers passing on particular types of genetics-based disorders. The disorders involve faults in mitochondria, known informally as cellular power plants. They generate energy for cells and contribute towards the way cells grow and eventually die.

The IVF options are made possible because mitochondria (#9 in the picture above) is stored in the outer layer of cells, outside the nucleus. The basic principle of the proposed technique would be to create one embryo combining the egg and sperm of a mother and father, and a second embryo combining the father’s sperm and a donor’s egg. Within a day, the nucleus would be removed from both embryos, with the nucleus from the “parent” embryo placed into the “empty” egg of the “donor” embryo.

The resulting embryo (which would be implanted in the mother’s womb) would thus combine the genetic material of the parents with the donor’s healthy mitochondria.

Although several media reports have used the expression “three parent child”, doctors argue this creates an unfair impression. They stress that the child’s hereditary genetic characteristics would come entirely from the mother and father and not the donor.

The process has been tested in animals, but not in humans, so will need further testing before it can be approved. However, for the most part the objections to the technique are ethical. One issue is that, depending on how you view it, at least one of the two embryos would be intentionally created and then destroyed.

Another problem is that the changes would be passed down to future descendants of the child born as a result of the treatment. In principle that’s precisely the point and would mean removing the risk of the genetic disorder continuing to pass through the generations. However, critics argue that it’s irresponsible to take the risk of creating any new problems that would then be passed down.

The Human Fertilisation and Embryology Authority, which oversees IVF in the UK, has conducted a public consultation which found broad approval. The country’s chief medical officer had now advised the government to begin work on the regulations needed to make such treatment legal. The current plan is to publish the regulations this fall, then have politicians debate and voted upon next year.

26 Jun 14:33

Havok's Completely Free 3D Engine For Mobile Game Developers Is Now Available

by Greg Kumparak
anarchy

Hey, aspiring game developers! Listen up.

Way back in March, we outlined Project Anarchy, a new 3D engine from Havok (the same people that built the engine behind some of the world’s biggest games, from Assassin’s Creed to Halo 4) that would be completely free to mobile game developers. At the time, the only target they’d give for when it’d be available was “sometime this spring”.

Well, Project Anarchy has just gone live. It’s a few days outside of Spring in the northern hemisphere — but hey, I’ll forgive’m. Free game engine!

Interested developers can find the engine download here. Heads up, though, Mac Devs: Project Anarchy primarily supports Windows developers for now, with the vast majority of its tools (the WYSIWYG game editor, the animation tool, etc.) all being Windows only. The only Mac-friendly tool seems to be the one meant to let you prepare your project for iOS.

Games built with Project Anarchy can be published without any sort of licensing fees on iOS, Android, or Samsung’s in-the-works mobile OS, Tizen. That last option might seem a bit strange, given that Tizen hasn’t… you know, shipped on anything yet, but there are logical dots that one can connect: Intel bought Havok in 2007. In 2011, Intel dropped support for the flailing MeeGo operating system they’d spent a year working on with Nokia and joined the governing group behind… you guessed it, Tizen. They’ve pretty much got to show love, right?

So, what’s in it for Havok? Why release an engine that doesn’t make them money? Because it does — just not directly. Three of the more obvious draws:

  • Intel is making a big push into mobile and, as mentioned, owns Havok. If they can get a few AAA titles to build mobile games on Project Anarchy, they can optimize their chipsets for the engine. If their chips run a few popular games better than anyone else’s, they sell more chips in the long run.
  • This potentially helps Havok capture some of those developers that are breaking into the game-making world for the first time on mobile. Remember: they’re still charging for Havok licensing on other, non-mobile platforms (like the Xbox, or the PC); if any of those newfound mobile devs decide to port up to bigger, less portable boxes and stays on Havok’s engine, Havok gets paid.
  • In their ToS, Havok reserves the right to “co-market” with your game. In other words, they get to say “Hey! This shiny new mobile game! It was built on Havok!”.

Of course, the mobile development playing field has changed a bit in the last few months. When Project Anarchy was first announced, its biggest draw was that it was totally free for mobile game developers, regardless of whether or not they intended to charge for their app. The closest thing anyone else offered was Unity3D — which, while very, very cheap compared to most pro-grade engines, still charged hundreds of dollars per developer seat for anyone even just looking to dabble with iOS or Android.

Just last month, however, Unity announced that basic iOS and Android publishing support would be free for all small-to-medium sized development houses (perhaps in response to others, like Havok, tiptoeing near their indie game dev turf), with free support for BlackBerry 10 and Windows Phone 8 on the way. They’d continue to offer a Pro package with more advanced functionality, only requiring that developers purchase Pro licenses once they were pulling in $100,000 or more in a fiscal year.

So now, developers have to make a choice: do they develop on Project Anarchy, which is pretty new to this whole indie-game-support thing but free on the two biggest mobile platforms regardless of how much you’re making, or on Unity, which has a rather big community and is on its 4th major iteration, but charges a few grand per developer once you’re big enough to show up on their radar?

Regardless of the pros and cons, everyone wins here. Developers get more options. Players get more games. The world gets more developers learning the ins and outs of pro-grade tools. Hurray!


16 Jun 22:27

Draw Your Own Video Game, Then Play it on Your iOS Device

by delana
Benholio

Okay, that is pretty cool...

[ Filed under Gaming & Geek & in the Gadgets category ]

creatable video game

If you’ve ever played a platform video game and thought “I could make a way better game than this,” your day has finally come. Pixel Press is a mobile app that lets you create your own game, then play it from your mobile device. You don’t need to know any kind of coding or even use a computer – just draw what’s in your imagination and the app takes care of the rest.

pixel press draw your own game

It all starts with a special piece of graph paper, which you can either print out or have sent to you pre-printed. The app’s instructions give you the basics for creating terrain, traps, obstacles and barriers. The goal is to create five levels which your character will traverse, bottom to top, with each one getting progressively more difficult.

make your own custom video game

When you’re done drawing your game, you snap a picture of it with your iOS device and the Pixel Press software goes to work digitizing it into a playable game. You get to test it out, add textures and music, and even try out games created by other users. The whole Pixel Press experience has the potential to be educational as well as entertaining. The project is raising funds on Kickstarter, with great donation incentives like early downloads and sketchpads.

Share on Facebook

[ Filed under Gaming & Geek & in the Gadgets category ]

[ Gajitz | Archives | Categories | Privacy | TOS ]

14 Jun 17:09

Gene offers an athlete's heart without the exercise

Benholio

Thank goodness, who wants to run on a treadmill to have a healthy heart?! Give me some pills! ;)

Researchers have found that a single gene poses a double threat to disease: Not only does it inhibit the growth and spread of breast tumors, but it also makes hearts healthier.