sandbox para ejercicios de programación
TRANSCRIPT
http://phk.freebsd.dk/pubs/sane2000-jail.pdf
IMAGEN
MySQL
DockerHub /mariosky
UBUNTUBASE MySQL
UBUNTU
UBUNTU/MySQL:134341
UBUNTU/MySQL:134342
IMAGEN
UBUNTUBASE
����������������
���������������
����������������
��������������
��������������
����������� �������
�������� ������
����������������134342
class Test(unittest.TestCase): def setUp(self): pass def test_Action(self): self.assertEqual(producto([2, 1, 3], [2, 3, 1]), 10)suite = unittest.TestLoader().loadTestsFromTestCase(Test)Resultado = ResultadoPrueba()suite.run(Resultado)result = {}
def product (l1,l2): while True: pass
Código'Alumno Unit'Test
Código'Python'Ejecuta'la'Prueba
Imagen docker con:• unit test:
• Java, Python, C#
• sandbox.py
• test_python, test_java, etc.
• git
• redis-py
tarea10 tarea 11cola%Python
tarea 12 tarea 13
tarea1 tarea 2cola%C#
tarea 3
cola%Java
Container Python 1
ContainerPython 2
Container C# 1
ContainerJava
tarea 8
tarea 7
tarea 0
tarea10 tarea 11cola%Python
tarea 12 tarea 13
Container Python 1
tarea 8
Container Python 2
Resultadotarea 7
Resultadotarea 6
Resultadotarea 5
Resultadotarea 3
Container Python 1
tarea 8
Heartbeat Python 2: Vence 2 segundos
Heartbeat Java 1: Vence 2 segundos
Container Python 2
Worker Manager
Lista de Heartbeats
docker'Kill'Python:1
Heartbeat?
Worker Manager• En la máquina docker.
• Crea los contenedores.
• Arranca con supervisord (su propio manager).
• Elimina Workers que no responden y crea nuevos.
redis• Colas de tareas.
• Heartbeats.
• Resultados de las tareas.
• En memoria, single thread, fast!.
Googlehttp://domain.com
Web Page Title
djangorun
view
redis
Tarea 123123
JSON
djangoresultview
Polling+withTime+Out
Resultado 123123
JSON
XHR+PUT
XHR+GET
Sandbox
PostgreSQLTest Results
Links• https://www.docker.com/
• https://hub.docker.com/
• redis.io
• https://github.com/mariosky/sandbox
• https://github.com/mariosky/protoboard