Searching in Google Scolar, i see that there is no "one solution" there, but quite a lot of research. The best solution is probably to use an existing product. I just had a tooth filling, it hurts, playing with this problem kept me busy.