Wednesday, September 28, 2016

Website Load Testing with Apache JMeter

I was exploring different load testing tools in order to make sure that the Ethics Canvas platform would resist peaks of up to 100 users signing in every 10 seconds, when I came across Apache JMeter.

JMeter is a robust Java-based open-source tool that allows users to test performance both on webservices, web dynamic languages, Java Objects, databases and queries, FTP servers, etc.


Running JMeter (Linux):
  1. Download Apache JMeter
  2. Extract the content from the compressed file
  3. From the Terminal, navigate into the apache-jmeter/bin
  4. Type ./jmeter and it will open the Java app (make sure you have Java installed)


Running load tests on Ethics Canvas:
  1. Right-click on Test Plan -> Add -> Threads -> Thread Group
  2. On Number of Threads we enter the desired number of users: 100
  3. On Ramp-Up Period we enter the desired test duration: 10
  4. Right-click on Thread Group -> Add -> Sampler -> HTTP Request
  5. On Server Name we type ethicscanvas.org
  6. On Path we type our sign-in file: /php/log-in.php
  7. On Send Parameter we add the email and the password
  8. Right-click on Thread Group -> Add -> Listener -> View Results in Table
  9. Click PLAY and the test will start, populating the table with the results


Understanding the results:
The most important factors are the average sample time (response time), deviation (from the average response time) and the status of all the responses (no errors). In our case, with an average of 2.2289 seconds from a mobile data connection, we can say we have passed the test.

It is worth looking for unusual values in latency and connect times. Always start with light-weight tests, and gradually increase the number of threads and reduce ramp-up period to know your limits. You might want to try as well from different Internet connections (mobile, wifi, remote,...) and never from localhost (unless it's only used internally).

Monday, September 26, 2016

The Ethics Canvas

In 2008, Alexander Osterwalder presented an innovative tool called "Business Model Canvas" (BMC) that aimed to help entrepreneurs to capture the fundamental business knowledge about their project, and bring about pivots in order to make the business model more consistent and successful. Since then, the BMC has helped over 5 million entrepreneurs increase the value that they provide to their users, and find a sustainable model.
In 2015, a group of researchers from ADAPT Centre started using a similar approach in order to detect at early stage all the ethical implications of a project, and help entrepreneurs and researchers pivot their idea in order to minimise these issues.


If you think about new technologies such as biotech, AI, IoT, VR, biometrics, blockchain, 3D printing,... they all bring great advancements for humanity, but they have some potential ethical issues that could have a catastrophic impact.

After some months of hard work and experiments, we have released this open-source brainstorming tool that we have called The Ethics Canvas. Similarly to the BMC, it enables participants to think about those ethical impacts while collaboratively completing this 12-box of the canvas. There are printed and web versions available, and it is licensed under Creative-Commons Non-Commercial.

SECTIONS OF THE ETHICS CANVAS:
  1. Individuals Affected. Identify the types or cathegories of individuals affected by the product or service, such as men/women, user/non-user, age-category, etc.
  2. Organisations and Groups Affected. Identify the collectives or communities, e.g. groups or organisations, that can be affected by your product or service, such as environmental and religious groups, unions, professional bodies, competing companies and government agencies, considering any interest they might have in the effects of the product or service.
  3. Products and Services provided. Name the different types of products and services that your project will provide.
  4. Resources needed. Capture the consumption of energy, raw materials, human resources, financial capital, social capital (trust, tolerance,...), marketing capital (reputation, brand,...), privacy and personal data needed by your product or service.
  5. Changes in Individual Behaviour. Name problematic differences in individual behaviour such as differences in habits, time-schedules, choice of activities, etc.
  6. Changes in Individual Relations. Name problematic changes in relations between individuals, such ways of communication, frequency of interpersonal contact etc.
  7. Organisation or Group Interests. Identify relevant ethical interests that other organisations or groups might have in your project; such as environmental, privacy, justice interests.
  8. Public Sphere. Discuss how the general perception of somebody’s role in society can be affected by the project, e.g. people behaving more individualistic or collectivist, people behaving more or less materialistic.
  9. Impact of product or service failure. Capture the potential negative impact of your product or service failing to operated as intended, e.g. technical or human error, financial failure/receivership/acquisition, security breach, data loss, etc.
  10. Impact of resource consumption. Capture possible negative impacts of the consumption of resources of your project, e.g. climate impacts, privacy impacts, employment impacts etc.
  11. Social Conflicts. Capture possible social conflicts that could be caused by the project, such as labour conflicts, minority/majority conflicts, ethnic conflicts, etc.
  12. Resolving ethical impacts. Select the four most important ethical impacts you discussed. Identify ways of solving these impacts by changing your project’s product/service design, organisation or by providing recommendations.

If you have a research or entrepreneurial project, I kindly invite you to use the Ethics Canvas with your team in order to detect the ethical impacts at early stage. We are always looking for feedback, so please, let me know what do you think.