8 June 2016 Roberto Innocente - [email protected]1 Refreshing computer skills 1) How to easily write simple Web pages ? 2) How to easily add math to Web pages ? 3) Notebooks : mixing text, math and results of computations 4) News on virtualization 5) News on Windows Server 2016 6) News on Microsoft Windows 10 7) Scaling out
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
● HTML (Hyper Text Mark Up Language) is the official language of the Web (T.Berners-Lee 1991)
● In the last decade many thought that HTML is too complicate for writing simple pages. So in opposition to it, a very simple language named markdown was developed for writing Web pages by humans.
● This was initially implemented as a perl program markdown.pl that is a markdown→html translator
● Then it was implemented in python as markdown_py module● Now many WYSIWYG editors are available for all the platforms. These editors
can usually also apply a set of CSS (Style Sheets) to the final HTML document.
markdown======== is a text-to-html conversion tool developed by john gruber in perl.[original project](http://daringfireball.net/projects/markdown/)[original text](http://daringfireball.net/projects/markdown/index.text)(there is an implementation in php too)####python-markdown is a python library that implements gruber's markdown.[python markdown library page](https://pypi.python.org/pypi/Markdown)There are some differences between the python library implementationand gruber's tool.[differences](https://pythonhosted.org/Markdown/index.html#differences)####python command line script[python command line (not on the anaconda python) :](https://pythonhosted.org/Markdown/cli.html)
you can add an horizontal rule :---make **blockquotes** :>very difficult very difficult very difficult very difficult >to explain very difficult very difficult very difficult >>all this very difficult very difficult very difficult >>and the rest of it very difficult very difficult very difficult you can insert links :[sissa homepage](http://www.sissa.it)you can make headings up to level 5 :#heading 1##heading 2###heading 3####heading 4
This is an open source editor written in python and based on a small httpd server using ajax for refreshing the rendering. It works on all platforms (requires python).
● Of course you need Pyhton installed● And you need pip : the python package manager.● Type :
● Most of the people in science that need to write math, since more than 25 years, use LaTeX. At the beginning of the web people that needed to display math on web pages were using latex2html that was displaying the picture of the math formula rendered by LaTeX.
● Around ~2000 the W3C consortium approved independently from this wide community of users of math, a standard for writing math on the Web called MathML (Mathematical Markup Language, its version 3 is now part of HTML5 and became the ISO standard 40314 in 2015)
MathML splits presentation (presentation MathML) from semantics (content MathML) and so 2 different parts are required !!!!
The simple formula
Requires all that you see on the left pane
OpenMath tries to define instead only the semantics of math in a user-extensible way and so is partly overlapped with content MathML. sin(x) in OpenMath :<OMOBJ> <OMA> <OMS name="sin" cd="transc1"/> <OMV name="x"/> </OMA></OMOBJ>
● Of course no one of these solutions was satisfactory for many ● In 2009 , with funding from AMS (American Mathematical Society) and
SIAM , a JavaScript program called mathJax was developed, that could replace formulas in LaTeX inside the Web pages with their rendering made using CSS and SVG
● This was a revolution .. now everyone can insert math in web pages using the largely diffused LaTeX syntax, just inserting a link to this JavaScript program. And these formulas are scalable (because of SVG) and scale like all the rest of the page.
● It is easy to use mathJax : you just need to include in the header of your html the link to the script (showed in next page)
● Many markdown WYSIWYG editor do this automatically and therefore you can directly write into them LaTex formulas:– Inline math : using as delimter 1 dollar sign $x^2+1$
– Displayed math : using as delimiters 2 dollar signs ● $$\int_{-\infty}^y{f(x) dx}$$
In the good old times there was IPhyton (an interactive version of python).
In time it grew so much to contain many things :● An interactive shell● A notebook format● A notebook conversion tool● A client/server protocol● An interactive parallel python
Pieces like the notebook and protocol are only incidentally related to python and not specific of python. So the great split of Project Jupyter 2014. In august 2015 with Ipyhton 4.0 most of the components passed to the jupyter project and other projects like ipyparallel,...
Jupyter
“Jupyter is like IPython but language agnostic”.
The most interesting part of it are the notebooks. Available in Mathematica(TM) since many decades, these are now implemented in an open source context and with the possibility to use many different kernels :
Notebooks are organized in cells : a unit of input/output with the background kernel.
Cells can be :● Markdown cells : in which you put text and eventually math formulas using the markdown language and
mathjax (that is called automatically by jupyter)● Code cells : in which you put code for your kernel
A cell is entered typing : Shift+Enter.
Markdown cells will be rewritten with their html rendering, code cells will get an output from the kernel (that in the case of maxima will be in TeX and rewritten by mathJax with a picture of the formula).
Try :
http://try.jupyter.org/
They have bash, haskell, julia, python, R, Ruby, Scala kernels.
You can save your notebooks as .ipynb (notebooks files) or export them as .pdf
● Opposite to monolithic app. Develop a single application as a set of small independent services (processes) communicating each other only trough a lightweight mechanism (like an http API)
● Traditional Virtual Machines are based on hypervisors that present a bare machine to the upper layers of software (performance penalty)
● On Linux since a decade kernel modifications were adopted to provide os-level (or light) virtualization : there is only one kernel shared by all virtual environments and containers are insulated groups of processes with regards to resources and namespaces (pid,fs,net,ipc) (very good performance)
● In Windows Server 2016 Microsoft provides Windows containers.
● In the container era streamlined OSs are getting revenge on their large opponents.● Nothing decorative, only the essential ● Many different offers: coreOS, rancherOS, atomic(RedHat), snappy (Ubuntu),
boot2docker (docker.com) ..● The most used is coreOS (opensource). Public since October 2013 it has :
● Hundreds of containers per server = many thousands of containers and MACs/IPs per rack
● Impossible to manage them in a standard layer 2 LAN. Very large and expensive switches have only 64k or quite less maximum MAC entries (cisco 4900M ~55k entries, cisco 3560 ~6k entries, alcatel OS6850 ~8k entries)
● But we want to keep the simplicity of migrating the containers everywhere in the Data Center :– Encapsulation/decapsulation by TOR (Top Of Rack)
switches or nodes :● MAC-in-MAC● MAC-in-IP/UDP
● Overlay networks : DOVE (IBM), VxLAN(arista, cisco, vmware), GRE (cisco)
● It is very useful to schedule containers based on load. Move containers from node to node, start them up, stop and remove them when it is needed
● The container ecosystem has different (opensource) offers for this : – Kubernetes (google), swarm (docker), apache/mesos, ..
● Kubernetes (descendent of borg, the tool google used to manage its infrastructure) was released to the public in july 2015– It runs pods : one or more containers that are guaranteed to be scheduled on the same machine ( to be
able to share resources)
– A service is made by a set of pods that work together (as one tier in a multi tier app)
– It is appropriate also for very large installations
● The anniversary release of Windows 10 to be released in June will have some new features:– An ubuntu bash. This is not just a toy. Using paravirtualization,
canonical and microsoft have provided a near to complete environment in which you can apt-get many working linux tools (eg emacs)
– Hyper-V of Windows Server fame.The new release of Docker for windows uses this specific virtualization instead of virtualbox.