Skip to content

Commit 4782bf5

Browse files
committed
old stuff
1 parent c0d8f24 commit 4782bf5

File tree

10 files changed

+43
-41
lines changed

10 files changed

+43
-41
lines changed
Binary file not shown.

01-logstage/logstage.tex

+12-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
%\usepackage[mathletters]{ucs}
1616
%\usepackage[utf8x]{inputenc}
1717
\usepackage[utf8]{inputenc}
18-
\usepackage{pifont}
18+
\usepackage{pifont}
1919
\usepackage{newunicodechar}
2020
\newunicodechar{✪}{\ding{74}}
2121

@@ -47,7 +47,7 @@
4747

4848
\usepackage {tikz}
4949
\usetikzlibrary {positioning}
50-
\graphicspath {{target/media/}}
50+
%\graphicspath {{target/media/}}
5151
%----------------------------------------------------------------------------------------
5252
% TITLE PAGE
5353
%----------------------------------------------------------------------------------------
@@ -72,7 +72,7 @@
7272

7373
// ...
7474

75-
val data =
75+
val data =
7676
new HashMap[String, String]()
7777
data.put("from", "userA")
7878
data.put("to", "userB")
@@ -81,7 +81,7 @@
8181
\end{VerbatimOut}
8282

8383
\begin{VerbatimOut}{ex-scala-logging.tmp}
84-
class Example
84+
class Example
8585
extends LazyLogging { // Let's break SOLID!
8686
//...
8787

@@ -99,7 +99,7 @@
9999
\begin{VerbatimOut}{ex-scala-tree-out.tmp}
100100
Expr(Apply(Select(
101101
Apply(
102-
Select(Select(Ident("scala"), scala.StringContext),
102+
Select(Select(Ident("scala"), scala.StringContext),
103103
TermName("apply"))
104104
, List(Literal(Constant("Received a message from "))
105105
, Literal(Constant(""))
@@ -164,23 +164,23 @@ \section{The problem: what's wrong with all the loggers}
164164
165165
\begin{frame}
166166
\frametitle{\code{scala-logging} API example}
167-
\scalacode{target/ex-scala-logging.tmp}
167+
\scalacode{ex-scala-logging.tmp}
168168
\end{frame}
169169
170170
\begin{frame}
171171
\frametitle{\code{fluentd} logging API example}
172-
\scalacode{target/ex-fluentd.tmp}
172+
\scalacode{ex-fluentd.tmp}
173173
\end{frame}
174174
175175
\section{The solution: code as structure}
176176
\begin{frame}
177177
\frametitle{The code\dots}
178-
\scalacode{target/ex-scala-tree-source.tmp}
178+
\scalacode{ex-scala-tree-source.tmp}
179179
\end{frame}
180180
181181
\begin{frame}
182182
\frametitle{\dots~is structured}
183-
\scalacode{target/ex-scala-tree-out.tmp}
183+
\scalacode{ex-scala-tree-out.tmp}
184184
\end{frame}
185185
186186
\begin{frame}
@@ -200,7 +200,7 @@ \section{The implementation: logstage}
200200
201201
\begin{frame}
202202
\begin{figure}
203-
\Huge
203+
\Huge
204204
\color{RubineRed} L✪GSTAGE
205205
\noindent
206206
{\color{RubineRed} \rule{\linewidth}{1mm} }
@@ -228,7 +228,7 @@ \section{The implementation: logstage}
228228
229229
\begin{frame}
230230
\frametitle{An example}
231-
\scalacode{target/ex-scala-logstage.tmp}
231+
\scalacode{ex-scala-logstage.tmp}
232232
Followed by a cute screenshot of course:
233233
\begin{figure}
234234
\includegraphics[width=\textwidth]{media/logstage-console.png}
@@ -238,7 +238,7 @@ \section{The implementation: logstage}
238238
\begin{frame}
239239
\frametitle{Something nice for our robots}
240240
\begin{figure}
241-
\inputminted[fontsize=\scriptsize]{json}{target/ex-json-out.tmp}
241+
\inputminted[fontsize=\scriptsize]{json}{ex-json-out.tmp}
242242
\end{figure}
243243
\end{frame}
244244
1.09 MB
Binary file not shown.

02-roles/roles.tex

+17-17
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
%\usepackage[mathletters]{ucs}
1616
%\usepackage[utf8x]{inputenc}
1717
\usepackage[utf8]{inputenc}
18-
\usepackage{pifont}
18+
\usepackage{pifont}
1919
\usepackage{newunicodechar}
2020
\newunicodechar{✪}{\ding{74}}
2121

@@ -47,7 +47,7 @@
4747

4848
\usepackage {tikz}
4949
\usetikzlibrary {positioning}
50-
\graphicspath {{target/media/}}
50+
%\graphicspath {{media/}}
5151
%----------------------------------------------------------------------------------------
5252
% TITLE PAGE
5353
%----------------------------------------------------------------------------------------
@@ -65,8 +65,8 @@
6565
\begin{document}
6666

6767
\begin{VerbatimOut}{ex-scala-roles.tmp}
68-
@RoleId("testservice")
69-
class TestService[F[_] : Monad](http: HttpSrv[F])
68+
@RoleId("testservice")
69+
class TestService[F[_] : Monad](http: HttpSrv[F])
7070
extends IzService {
7171
override def start(): Unit = http.start()
7272
override def stop(): Unit = http.stop()
@@ -145,9 +145,9 @@ \section{The problem: both Monolith and Microservice approaches are broken}
145145
\begin{itemize}
146146
\item \textit{Software components} are still in place -- in form of Services.
147147
All the potential pitfails of component design apply to microservices,
148-
\item Many checks which may be done by your compiler in case of monolithic design have
149-
to be performed by integration test suites (in case you have them, it's hard to write),
150-
\item Many tasks are delegated to operations: in case of a monolith your dependency graph is being
148+
\item Many checks which may be done by your compiler in case of monolithic design have
149+
to be performed by integration test suites (in case you have them, it's hard to write),
150+
\item Many tasks are delegated to operations: in case of a monolith your dependency graph is being
151151
processed by your DI framework\footnotemark[1], in case of microservices it is\dots in worst case processed by people,
152152
in best case requires an orchestration tool. But we don't have any single great tool yet,
153153
\item An orchestration tool does \textit{exactly the same job} your DI framework may do. And lot more things.
@@ -166,7 +166,7 @@ \section{The solution: roles}
166166
\item Let's choose which \textit{roles} we wish to assign to a before we start it,
167167
\item Roles come from Classpath, may be discovered dynamically or statically,
168168
\item It resembles Containers and OSGi,
169-
\item Containers have some disadvantages.
169+
\item Containers have some disadvantages.
170170
They provide you a lot so we get used to think that they are sluggish on startup.
171171
Isolated classloaders are inconvenient. Dynamic DI is a nightmare,
172172
\item Let's get rid of Dynamic DI. And let's keep isolation optional.
@@ -185,7 +185,7 @@ \section{The solution: roles}
185185
Roles allow you to do \textbf{everything} you can do with microservices plus have additional benefits\footnotemark[1]:
186186
\begin{itemize}
187187
\item Higher Density makes Development Flows better: instant startup of any combination of roles,
188-
\item Higher Density makes Operations easier: any combination of roles for any container.
188+
\item Higher Density makes Operations easier: any combination of roles for any container.
189189
You don't need to start 5 containers to have 5 services with low load profile,
190190
\item Smaller distribution size: Just one image, less traffic,
191191
\item More static checks $\Rightarrow$ higher reliability,
@@ -201,9 +201,9 @@ \section{The solution: roles}
201201
\item Startup time. Do you remember Tomcat? Design matters\footnotemark[1],
202202
\item Weaker isolation $\Rightarrow$ more dangerous failures,
203203
\item Dependency convergence. You may need isolated classloaders\footnotemark[2],
204-
\item Heterogenous systems: C\#, Scala and Go won't mix in a single process\footnotemark[3],
205-
\item Distributed communication between Roles: most likely you don't want it. Otherwise
206-
you need a mechanism similar to: distrubuted DI framework
204+
\item Heterogenous systems: C\#, Scala and Go won't mix in a single process\footnotemark[3],
205+
\item Distributed communication between Roles: most likely you don't want it. Otherwise
206+
you need a mechanism similar to: distrubuted DI framework
207207
built around \textit{Service Discovery} and \textit{Cluster State} concepts. See: \code{dOSGi},
208208
\item You need to build a nice Continuous Delivery pipeline.
209209
\end{itemize}
@@ -216,12 +216,12 @@ \section{The implementation: distage}
216216

217217
\begin{frame}
218218
\begin{figure}
219-
\Huge
219+
\Huge
220220
\color{RubineRed} DISTAGE
221221
\noindent
222222
{\color{RubineRed} \rule{\linewidth}{1mm} }
223223
\Large Next-gen Dependency Injection Framework for Scala
224-
\normalsize Generative, Modular, R✪les and Garbage Collection included
224+
\normalsize Generative, Modular, R✪les and Garbage Collection included
225225
\end{figure}
226226
\end{frame}
227227

@@ -230,7 +230,7 @@ \section{The implementation: distage}
230230
\begin{itemize}
231231
\item Next generation of DI.
232232
\item Generative, built on PPER principle. Allows you to plan context provisioning, edit the plan, then execute it,
233-
\item Fully aware of Scala typesystem, allows you to fuse FP and OOP lot better than before,
233+
\item Fully aware of Scala typesystem, allows you to fuse FP and OOP lot better than before,
234234
\item Bundled Garbage Collector,
235235
\item \textit{Bundled Roles mechanism} built as an extension. Cheap for developer because of Garbage Collection,
236236
\item Bundled \code{typesafe-config} support built as an extension,
@@ -240,7 +240,7 @@ \section{The implementation: distage}
240240

241241
\begin{frame}
242242
\frametitle{How may\footnotemark[1] it look like: Dynamic\footnotemark[2] loader example ?}
243-
\scalacode{target/ex-scala-roles.tmp}
243+
\scalacode{ex-scala-roles.tmp}
244244
\footnotetext[1]{Roles API is not published yet. More details to follow.}
245245
\footnotetext[2]{Static one is also available.}
246246
\end{frame}
@@ -275,7 +275,7 @@ \section{The implementation: distage}
275275
\item Idealingua: transport and codec agnostic gRPC alternative with rich modeling language,
276276
\item LogStage: zero-cost logging framework,
277277
\item \textit{Fusional Programming and Design} guidelines. We love both FP and OOP,
278-
\item \textit{Continous Delivery} guidelines for Role-based process,
278+
\item \textit{Continous Delivery} guidelines for Role-based process,
279279
\item \textit{Percept-Plan-Execute} Generative Programming approach, abstract machine and computational model.
280280
Addresses Project Planning (see Operations Research). Examples: orchestration, build systems.
281281
\end{itemize}
Binary file not shown.
Binary file not shown.

04-distage/distage.tex

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
\usepackage{graphicx} % Allows including images
1111
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
12-
\usepackage[outputdir=target]{minted}
12+
%\usepackage[outputdir=target]{minted}
13+
\usepackage{minted}
1314
\usepackage{xcolor}
1415
\usepackage[utf8]{inputenc}
1516
\usepackage{pifont}
@@ -85,7 +86,7 @@
8586

8687
\usepackage {tikz}
8788
\usetikzlibrary {positioning}
88-
\graphicspath {{target/media/}}
89+
%\graphicspath {{target/media/}}
8990

9091
\title[\distage]{\distage: Modern Staged Dependency Injection for Scala}
9192

@@ -150,7 +151,7 @@ \section{The problem: Dependency Injection and Functional Programming}
150151
\frametitle{The motivation behind DI pattern and DI frameworks}
151152
\begin{enumerate}
152153
\item Systems we work with may be represented as graphs. Nodes are components (usually instances), edges are references,
153-
\item Graph transformation complexity grows with node count
154+
\item Graph transformation complexity grows with node count
154155
(need to add one constructor parameter, have to modify $k$ classes), many operations have non-linear complexity,
155156
\item Graph composition has combinatoric complexity (need to run tests choosing between mock/production repositories and external APIs, have to write four configurations).
156157
\end{enumerate}

05-distage-scalaua/distage-scalaua.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
\usepackage{graphicx} % Allows including images
1313
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
14-
\usepackage[outputdir=target]{minted}
14+
%\usepackage[outputdir=target]{minted}
15+
\usepackage{minted}
1516
\usepackage{xcolor}
1617
\usepackage[utf8]{inputenc}
1718
\usepackage{pifont}
@@ -87,7 +88,7 @@
8788

8889
\usepackage{tikz}
8990
\usetikzlibrary{positioning}
90-
\graphicspath{{target/media/}}
91+
%\graphicspath{{target/media/}}
9192

9293
\title[\distage]{\distage: Modern Staged Dependency Injection for Scala}
9394

Makefile.base

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ LATEX_ARGS=--interaction=nonstopmode -shell-escape -file-line-error -file-line-
88
SRCS = $(wildcard *.tex)
99
PDFS = $(patsubst %.tex,%.pdf,$(SRCS))
1010

11-
JUNK = *.toc *.aux *.pdf *.ps *.eps *.log *.lof *.bbl *.blg *.dvi *.log *.out *.tmp
12-
JUNK_PARAMS = $(foreach mask,$(JUNK),-name "$(mask)" -or )
11+
#JUNK = *.toc *.aux *.pdf *.ps *.eps *.log *.lof *.bbl *.blg *.dvi *.log *.out *.tmp
12+
#JUNK_PARAMS = $(foreach mask,$(JUNK),-name "$(mask)" -or )
1313

1414
.PHONY: all clean pdf
1515

@@ -22,14 +22,14 @@ pdf: $(PDFS)
2222
@echo "== Compiling $*..."
2323
@echo ""
2424
mkdir -p $(PDF_DIR)
25-
cp -R media/ $(PDF_DIR)/media
26-
cp $*.tex $(PDF_DIR)/
25+
ln -s $(shell pwd)/media/ $(PDF_DIR)/media || true
26+
ln -s $(shell pwd)/$*.tex $(PDF_DIR)/ || true
2727
cd $(PDF_DIR) && $(LATEX) $(LATEX_ARGS) $*
2828
cd $(PDF_DIR) && $(LATEX) $(LATEX_ARGS) $*
2929
# https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file
3030
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$*.pdf $(PDF_DIR)/$*.pdf
31-
#find $(PDF_DIR) -name '*.pdf' -exec echo gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$(basename {}) {} \;
32-
#find $(PDF_DIR) -name '*.pdf.tmp' -exec sh -c 'mv -- "$$0" ../"$${0%.tmp}"' {} \;
31+
3332

3433
clean:
35-
find . \( $(JUNK_PARAMS) -false \) -delete
34+
rm -rf $(PDF_DIR)
35+
rm -f *.pdf

0 commit comments

Comments
 (0)