We develop a prototype for real-time blood sugar control based upon the hypothesis that there is a medical challenge in determining the exact, real-time insulin dose. Our system controls blood sugar by observing the blood sugar level and automatically determining the appropriate insulin dose based on patient’s historical data all in real time. At the heart of our system is an algorithm that determines the appropriate insulin dose. Our algorithm consists of two phases. In the first phase, the algorithm identifies the insulin dose offline using a Markov Process based model. In the other phase, it recursively trains the web hosted Markov model to adapt to different human bodies’ responsiveness.