{"id":2330,"date":"2021-08-23T15:39:27","date_gmt":"2021-08-23T13:39:27","guid":{"rendered":"https:\/\/aerospaceresearch.net\/?p=2330"},"modified":"2021-08-26T12:58:02","modified_gmt":"2021-08-26T10:58:02","slug":"gsoc-21-molto3bp-molto-it-api-mario-r-d","status":"publish","type":"post","link":"https:\/\/aerospaceresearch.net\/?p=2330","title":{"rendered":"[GSoC 21 | MOLTO3BP &#8211; MOLTO-IT-API | Mario R D]"},"content":{"rendered":"\n<p>Hello everyone !<br>My name is Mario Robert D&#8217;Ambrosio and I got selected for GSoC 21 with the University of Barcelona to work on the MOLTO-3BP and MOLTO-IT tracks.<br>During these weeks I had the pleasure to work with multiple mentors, Brandon Escamilla (<a href=\"mailto:brandon.escamilla@outlook.com\">brandon.escamilla@outlook.com<\/a>) and Gin\u00e9s Salar (<a rel=\"noreferrer noopener\" href=\"mailto:100345764@alumnos.uc3m.es\" target=\"_blank\">100345764@alumnos.uc3m.es<\/a>) <br>Our goals commitments were multiple: first and foremost to have an integrated working and refactored repository for the MOLTO-3BP  (<a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/43fb08856652db90f51b02d17fb273b260208670\">Refactor Github <\/a><a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/files\">Link<\/a><a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/43fb08856652db90f51b02d17fb273b260208670\">)<\/a> <\/p>\n\n\n\n<p>And to be able to yield a dynamic, yet simple frontend to consume for the University Carlos III (located in Madrid) students and whoever interested in understanding the dynamic amongst translunar orbits and trajectories.<\/p>\n\n\n\n<p>This is why I worked closely with Brandon and Gines, both in charge respectively of mantaining the service accessible on the university&#8217;s server (Brandon) for the MOLTO-IT-API operations and the MOLTO-3BP (Gines).<\/p>\n\n\n\n<p>Secondily, we decided also to focus on revamping the UI of the displayed results and moslty to encapsulate all the brilliant work done by Gines for his thesis into OOP modern factory pattern classes.<br>I chose a <strong>microservice<\/strong> approach, as a busy python programmer, I decided to go towards this route as microservices communications is easier to manage and mostly, it is the most prominent way to micro-architect projects in the 2021 dev era.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Work Roadmap<\/h2>\n\n\n\n<ul><li><strong>1. Cleaning up the MOLTO-3BP Repository<\/strong><\/li><\/ul>\n\n\n\n<p> <\/p>\n\n\n\n<p>First and foremost a cleanup of old files and unused files was done. <\/p>\n\n\n\n<p>I cleaned nearly 30 files and removed many unused pieces of code<\/p>\n\n\n\n<ul><li><strong> 2. Reformatting the MOLTO3BP Code<\/strong><\/li><\/ul>\n\n\n\n<p>Next the code was architectured in small microservices that would allow for the orbits to be computed without incurring in extreme computational weight and or adding sophistication and Massive Controller strategy (<a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/a468244a0ac688391f5a2879f4e22f7759cb6ac0\">https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/a468244a0ac688391f5a2879f4e22f7759cb6ac0<\/a>)<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img decoding=\"async\" loading=\"lazy\" width=\"2288\" height=\"2288\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/Blank-diagram.png\" alt=\"\" class=\"wp-image-2383\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<ul><li><strong>3. Adding new running options<\/strong><\/li><\/ul>\n\n\n\n<p>The running options were added as a runner in the python file and as static file<br>Also, clearly, a README was put to explain all the different layers of inputs.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"577\" height=\"910\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/image-14.png\" alt=\"\" class=\"wp-image-2391\"\/><\/figure>\n\n\n\n<ul><li><strong>4. Changing Image Layout<\/strong><\/li><\/ul>\n\n\n\n<p>I have changed the layout in various sessions and offered custom plot graphic display<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow\">\n<figure class=\"wp-block-gallery columns-3 is-cropped wp-block-gallery-1 is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"480\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/lagrange.png\" alt=\"\" data-id=\"2387\" class=\"wp-image-2387\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"480\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/orbit.png\" alt=\"\" data-id=\"2388\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2388\" class=\"wp-image-2388\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"480\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/final_trajectories.png\" alt=\"\" data-id=\"2389\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2389\" class=\"wp-image-2389\"\/><\/figure><\/li><\/ul><\/figure>\n<\/div><\/div>\n\n\n\n<ul><li><strong>5. Adding multiprocessing<\/strong><\/li><\/ul>\n\n\n\n<p>Multiprocessing support for server and scalable core split was also added<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"974\" height=\"635\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/image-13.png\" alt=\"\" class=\"wp-image-2390\"\/><\/figure>\n\n\n\n<ul><li><strong>6. Adding Flask Support<\/strong><\/li><\/ul>\n\n\n\n<p>Finally, to consume the results as QUEUE and display the image with an interrogation system by JOB ID a Flask support was mandatory and added.<br>This would allow to consume the API and have the results ready asynchronously by calling with JOB ID<\/p>\n\n\n\n<ul><li><strong>7. Adding S3 resource saving support<\/strong><\/li><\/ul>\n\n\n\n<p>I have added S3 Bucket support not to bloat the server and consume credits I&#8217;ve won on my AWS account in order to display the image results of plots continuously for students.<\/p>\n\n\n\n<p>Snippets of code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1279\" height=\"841\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/image-12.png\" alt=\"\" class=\"wp-image-2386\"\/><\/figure>\n\n\n\n<ul><li><strong>8. Finally wrapping it into MOLTO-IT-API<\/strong><\/li><\/ul>\n\n\n\n<p>Finally all the code was wrapped into MOLTO-IT, which needed some substantial repolishing and many features\/packages upgraded in order for it to work.<br>Many code snippets were deprecated and, were thus, updated.<br><a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-IT-API\/pull\/2\/commits\/8f4535e30023899f7a366507cacad533e721a025\">https:\/\/github.com\/uc3m-aerospace\/MOLTO-IT-API\/pull\/2\/commits\/8f4535e30023899f7a366507cacad533e721a025<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Future work<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Migration of API to FastAPI<\/h4>\n\n\n\n<p>As for the MOLTO-IT we would definitely like to expand and change some things.<\/p>\n\n\n\n<p>Especially we would need to migrate the API to FastAPI to provide more flexibility and maintanance on the long run for the functions and portability.<\/p>\n\n\n\n<p>Also genetic algorithm population and generations could be bettered calibrated to run in a case-specific solution scenario instead of just a plain global one.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"610\" height=\"208\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/image-11.png\" alt=\"\" class=\"wp-image-2385\"\/><\/figure>\n\n\n\n<p>This is going to be done by September &#8211; October 21 and could be finished in a new GSoC edition.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><br>MAKING THE MOLTO-IT STATIC<\/h4>\n\n\n\n<p>It would be nice to dockerize and make the Molto IT static and folder\/system agnostic, instead of having many code blocks hardcode as such<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"949\" height=\"257\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/image-10.png\" alt=\"\" class=\"wp-image-2384\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Lissajous Orbit<\/h4>\n\n\n\n<p>We also plan to work on the Lissajous orbit, which requires most of the computation, as it represents both a blend of the Lyapunov and Halo computations combined.<br>This is planned to be done by November &#8211; December 21.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>I have learned so much from such experience, I would be capable of writing an essay for the enormous tasks learnt throughout such experience.<\/p>\n\n\n\n<p>First, <strong>communication<\/strong> was essential for the deployment and delivery of the project.<br>Second, I learned about pacing myself and downplaying my expectations as to aiming high but delivering less is worse than aiming a bit lower and overdelivering.<\/p>\n\n\n\n<p>I tried to aim at a not so fantasmagoric intention but have a GSoC plan and post GSoC plan.<br>My intentions were to being able to mantain and bring to life a repository <strong>where <\/strong>anyone could possibly contribute and deploy new open source code.<\/p>\n\n\n\n<p>I think such intentions were achieved as we have now cleaned up a lot of code and created documentations (MOLTO-3BP -&gt; <a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/0f3ca55a027e8541cc96d79956fbd1f98468116e\">https:\/\/github.com\/uc3m-aerospace\/MOLTO-3BP\/pull\/7\/commits\/0f3ca55a027e8541cc96d79956fbd1f98468116e<\/a>, MOLTO -IT, MOLTO-IT -&gt; <a href=\"https:\/\/github.com\/uc3m-aerospace\/MOLTO-IT-API\/pull\/2\/commits\/8f4535e30023899f7a366507cacad533e721a025\">https:\/\/github.com\/uc3m-aerospace\/MOLTO-IT-API\/pull\/2\/commits\/8f4535e30023899f7a366507cacad533e721a025<\/a>)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-gallery alignleft columns-3 is-cropped wp-block-gallery-4 is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"768\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/corno_grande_notturna.jpeg\" alt=\"\" data-id=\"2378\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2378\" class=\"wp-image-2378\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/corno_grande_notturna_2.jpeg\" alt=\"\" data-id=\"2379\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2379\" class=\"wp-image-2379\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/corno_grande_notturna_3.jpeg\" alt=\"\" data-id=\"2380\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2380\" class=\"wp-image-2380\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" loading=\"lazy\" width=\"1200\" height=\"1600\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2021\/08\/corno_grande_notturna_4.jpeg\" alt=\"\" data-id=\"2381\" data-link=\"https:\/\/aerospaceresearch.net\/?attachment_id=2381\" class=\"wp-image-2381\"\/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>As a Computer Engineer student, I have always shared a great passion for computer engineering problems and as an aerospace passionate, I enjoy amusing myself with astrophotography and amateur telescope obsevations.<br>To close the GSoC 21 edition, I went and made my first ascent to the Corno Grande of Italy (https:\/\/en.wikipedia.org\/wiki\/Corno_Grande), where I went to the astronomical observatory and made a night climb to the peak (2912m) to challenge myself and close the GSoC edition with a bit of salt (and pepper! as this is not an easy hike\/climb, experts only advised!).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>I am grateful to have joined this GSoC edition and to be able to contribute in the future!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone !My name is Mario Robert D&#8217;Ambrosio and I got selected for GSoC 21 with the University of Barcelona to work on the MOLTO-3BP and MOLTO-IT tracks.During these weeks I had the pleasure to work with multiple mentors, Brandon Escamilla (brandon.escamilla@outlook.com) and Gin\u00e9s Salar (100345764@alumnos.uc3m.es) Our goals commitments were multiple: first and foremost to &hellip; <a href=\"https:\/\/aerospaceresearch.net\/?p=2330\" class=\"more-link\"><span class=\"screen-reader-text\">\u201e[GSoC 21 | MOLTO3BP &#8211; MOLTO-IT-API | Mario R D]\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/2330"}],"collection":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2330"}],"version-history":[{"count":5,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/2330\/revisions"}],"predecessor-version":[{"id":2403,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/2330\/revisions\/2403"}],"wp:attachment":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}