anchor.diff:  -module(policy).
  -
   -export([computeWorker/1]).
   
  +-record(node_info,
  +	{status="",
  +	core=1,
  +	ram=1,
  +	disk=1,
  +	price=1}).
  +
   -record(job_info,
  -	{owner="",
  +	{status="",
  +	owner="",
   	core=1,
   	ram=1,
   	disk=1,
  
positive.code: 
  findBestBidder([H|T]) -> findBestBidder(H,T).
  
  findBestBidder(M,[H|L]) when M#job_info.job_cost < H#job_info.job_cost -> findBestBidder(M,L);
  findBestBidder(_,[H|L]) -> findBestBidder(H,L);
  findBestBidder(M,[]) -> M.
negative.code: computeWorker(Key) ->
  	try
  		LastJob = job:getJobDetail(Key),
  		{_, NodeList} = node:listNode(),
  		Nodes = verifyNode(LastJob, NodeList, []),
  		findBestBidder(Nodes)
  	catch
  		Exception:Reason -> {caught, Exception, Reason}
  	end.
  
  verifyNode(Job, [H|T], ValidNodes) ->
  CurNode = node:getNodeDetail(H),
  if
  	CurNode#node_info.core >= Job#job_info.core,
  	CurNode#node_info.ram >= Job#job_info.ram,
  	CurNode#node_info.disk >= Job#job_info.disk ->
  		verifyNode(Job, T, [CurNode|ValidNodes]);
  	true ->
  		verifyNode(Job, T, ValidNodes)
  