Safe and scalable parallel programming with session types