GithubHelp home page GithubHelp logo

simonskodt / itu-minitwit Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 13.14 MB

Weekly updates in the course DevOps, Software Evolution and Software Maintenance

License: MIT License

Makefile 0.02% Shell 1.01% CSS 2.47% HTML 0.71% C# 66.19% Dockerfile 0.53% TypeScript 12.92% TeX 16.15%
devops twitter

itu-minitwit's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar gustav-mb avatar nikolajwlarsen avatar simonskodt avatar snyk-bot avatar vict2976 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

fossabot

itu-minitwit's Issues

Describe Distributed Workflow

Think about, discuss in your groups, and note down in which way you are going to collaborate using Git in this project.

You should reflect and decide on the following points:

  • Which repository setup will we use?
  • Which branching model will we use?
  • Which distributed development workflow will we use?
  • How do we expect contributions to look like?
  • Who is responsible for integrating/reviewing contributions?

Information to at least all of the above points should end up in a markdown document in your main repository (likely called CONTRIBUTE.md).

We recommend that you do not rewrite history by rebasing or squashing your commits. The main reason is that it remains visible in the history who did what and when.

Add username to messages

Our curret solution takes fetches all message on /public, foeach message, the userID is used to calls the backend for the username. The implementatio nis not optimal, and triggers alooot of traffic.

GroupJ -[checks]> GroupK

GroupJ -[checks]> GroupK

(A little late, we're sorry ๐Ÿ˜…)

Functionality Checks

  • Do you see a public timeline?
  • Does the public timeline show messages that the application received from the simulator?
  • Can you create a new user? (Greetings from niceness1)
  • Can you login as a new user?
  • Can you write a message?
  • After publishing a message, does it appear on your private timeline? (1)
  • Can you follow another user? (2)

Additional notes:

  1. It works very nicely! I can even send emojies :) It does however require me to either reload the page to my twit to appear.
    • Additionally, nothing told me the Twit had been posted so I accidentally Twitted(posted) the same thing twice. What are all my followers gonna think of me? ๐Ÿ˜ญ
  2. I was unable to find a follow button, sadly. So my private timeline will have to be all about me! ๐Ÿ˜ˆ
  3. Visiting the timeline of another user correctly displays their messages. However, any name that contains spaces now has "%20" instead of a space and their Avatar-icon has been changed.
    • As seen on the public timeline:
      Zane_Sumeriski_public_timeline
    • As seen on the timeline of a particular user
      Zane_Sumeriski_timeline
  4. Also, there is an evil "&apo;" in the "what's on your mind"-form-label-thingy (for adding Twits).
    • Here's a picture for good measure.
      Evil_apo

Deploy your ITU-MiniTwit in "the cloud"

  • Deploy the current release of your ITU-MiniTwit, see task 2 b), to a remote ("cloud") server.

  • Do not create and provision VMs manually, instead use a corresponding script, Vagrantfile, or a similar reproducible setup for that task.

  • You are free to deploy to whichever Infrastructure-as-a-Service (IaaS) provider of your choice or your own servers.
    The only requirement is that your deployment is automatically reproducible, i.e., no clicking in UIs required, and that your application is reachable via a public IP/domain.
    Do not deploy to a Platform-as-a-Service, like Heroku, Google App-Engine, etc.

  • Make your development environment and deployment environment "look alike". That is, you develop on an Ubuntu 22.04 based Linux (Pop!_OS), choose the same environment for your remote server(s).

  • Hint: To make future operations more smooth, you might consider to use a floating IP 'infront' of your actual server, see the API spec. for receiving one.

Refactor testsuite

  • The test suite in minitwit_tests.py should pass for your refactored application too. Likely, you have to modify the setup method slightly so that it points to your application.

  • However, all test methods of the API tests should pass on your refactored application.

  • First in a next step translate the old test suite to your new language/tech. stack too.

  • Rewrite the application in mini-steps at a time.

    • For example, a very first step could be: Given a database, I want to show the public timeline.
    • A second step could then be: I want to be able to see the public timeline of one user.
    • ...

Error in Service layer

Error message: System.FormatException: Element 'latestVal' does not match any field or property of class MiniTwit.Core.Entities.Latest.

Something in the flow of the service layer regarding the latestVal

Containerize ITU-MiniTwit with Docker

For your refactoring work, use Docker. That is create respective Dockerfiles and Docker Compose files in your repository. These containerize your application and allow all team members to develop your application in a uniform environment.

Rework repositories

Split single repositories into 3
Let repositories return response and remove service layer project

Implement an API for the simulator in your ITU-MiniTwit

You can find the specification for the simulator API in API_Spec/minitwit_sim_api.py. OBS: your applications have to:

  • provide the same end points (on different hosts of course and potentially different ports),
  • ingest the same HTTP requests, i.e., GETs and POSTs as specified with the same parameters and payloads as provided,
  • provide at least the same HTTP status codes in response as specified.

The API_Spec/minitwit_sim_api.py depends on your refactored minitwit.py from last week's homework.

A corresponding test (API_Spec/minitwit_sim_api_test.py) illustrates how the simulator requests will be formed. You can inspect it and run it via pytest minitwit_sim_api_test.py. (pytest can be installed via pip)

Next to the unit test, there is a small program with some more test data, which is similar to the simulator program that will run against your systems. It is located in API_Spec/minitwit_simulator.py and can be run via:

$ python minitwit_simulator.py http://localhost:5001

where the argument http://localhost:5001 has to be replaced with the URL of where your simulator API is running. In case this simulator test does not log any errors, you should be all fine for next week. If errors are logged, you have to fix the corresponding issue either in your implementation of the simulator API or in the implementation of your version of ITU-MiniTwit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.