Is it possible to restrict access to anonymous user to specific content types based on the author? I've been looking for a module that could support my requirement for hours now and failed. 

What I want to do is to restrict anonymous user to viewing content type pages based on a specific users. Lets say I have user1,user2 and user3. Anon should be able to view contents created by user1, but not user2 and user3. 

I'm thinking of using node_access_hooks but I'm very new to drupal and I have no idea where to start with that. Can anyone help me with this?
I don't think it looks like the best idea - sometimes you have to fire an author and get someone new. Author-based solutions may get complicated in such situations. Usually I use Taxonomy Access Control - I'm restricting users to view only content with particular term, and only give access to that term to particular authors. Simple, and without need of any custom coding.

Note one important restriction:


  While Drupal 7 makes support for additional databases possible, TAC does not currently support databases other than MySQL/MariaDB/etc. or Postgres. See #1266674: Support other databases for more information.