So it was a kind of remarkable moment where this great spiritual leader showed this remarkable and broad embrace of science. At the same time there are great scientists who show a similar embrace of religious thought. Here's Nobel Laureate, William Phillips. The point is that there are plenty of scientists who see no difficulty in being serious about their science and serious about their faith.


I know plenty of others, and you’ve see the statistics that support that idea, but nevertheless there is a common misperception in society that this isn’t the case. And here's Francis Collins, head of the National Institutes of Health. I think most people are actually kind of comfortable with the idea that science is a reliable way to learn about nature, but it's not the whole story and there's a place also for religion,

The Believing Brain: Evolution, Neuroscience, and the Spiritual Instinct


for faith, for theology, for philosophy. But that harmony perspective doesn't get as much attention. Nobody's as interested in harmony as they are in conflict, I'm afraid. 2015, Pew Research Foundation found that the percent of Americans that agreed with the statement that science and religion are often in conflict, they found that agreement with that was almost 60% and that again is often how the conversation is framed.


Science versus religion. That is an important question. It may come up here tonight, but it's not the focus of what we're talking about here tonight. And so we're asking ourselves, can we use science to illuminate religion? Can we gain some understanding of why people have a need to look to a power beyond themselves, beyond the laws of physics? Is that need written into our DNA?


The natural selection for that kind of worldview, right? Why in the world does this world have so many brains that want to believe? That's the question. And to deal with this question, try to gain some insight, we have a great group of thinkers and I'd like to now bring them out to the stage. Our first participant is professor emerita from the College of William and Mary, where


she taught anthropology for 28 years, author of numerous books, including Personalities on the Plate, How Animals Grieve, and Evolving God. Please join me in welcoming our first guest ... Barbara King on the fly. Our next guest is a research scientist at NYU Langone Medical Center. He's also professor of cognitive and affective neuroscience at NYU, co-founded the Nonduality


Institute where he is the principle science investigator. Please join me in welcoming neuroscience, Zoran Josipovic. Also with us tonight is a university distinguished professor of psychology at Northeastern University with appointments at Harvard Medical School and the Mass General Hospital. In addition to the book, How Emotions Are Made, she has published over 100 scholarly


papers. Please join me in welcoming Lisa Barrett. All right, finally. Our guest is the Johnstone Professor of Psychology at Harvard University, a two-time Pulitzer prize finalist and author of the bestselling books including, How the Mind Works and The Language Instinct, a pioneer and champion of evolutionary psychology, named one of Time Magazine's 100 Most Influential People, please welcome Steven Pinker.


All right, so we're going to have a pretty free form discussion here, where we're going to try to address some of these questions and we're going to organize the discussion into three parts, roughly speaking. A kind of trinity of parts, befitting for tonight's discussion. We're going to talk about some of the history of religious belief. We're going to talk about the longevity, the fact that this is something that has stuck


with us for some time. Then we're going to focus on the benefit, if at all, for this kind of way of interacting with the world. What I'd like to do before getting started, if you don't mind, especially since it's a nice small group here, it's good to get a sense of where people are coming from in this kind of discussion, so if we could just sort of go one by one, just sort of give us a sense


of where you ... We'll do it ... If you don't mind, and you don't have to, but if you're willing to share it, just a couple of words on where you come from in the religious spectrum. Steven, you willing to just say a few words? You mean our own beliefs personally? If you don't mind. You don't have to, but if you're willing to. Yeah. Well, I don't believe in the existence of supernatural entities, including God, souls,


spirits, genies, devils, and so on. I am a ... I belong to the same tribe as you. I'm Jewish and appreciate many of the iconography, the traditions, the community of my own and other cultural groups, but that doesn't mean you have to sign on to the content, and I don't. Right. Lisa. I would say Steve pretty summed it up pretty well for me too. We practice some rituals in our home as sort of, I don't know, not exactly archeological


artifacts, but they are kind of artifacts of the past, you know? If we decide to light candles on Friday night, I'm using candlesticks that my great-grandmother schlepped from Russia and that people have been doing this for over 5000 years, and that's meaningful. I also think that Judaism is an interesting moral code that is somewhat ... emphasizes somewhat more behavior over intent, which is appealing to us in some ways.


I would say we're ... colloquially we're atheists as a ... definitely in our house, although we do have trappings of, as I said, of ritual in the way that I described. Yep. Zoran. I was raised as atheist, but later discovered that really my family believed in scientism. Like, science has an answer to everything. It's a form of religion, I think for some people.


Personally, I have practiced meditation for over 35 years and I'm mostly interested in this mystical unitary states are known to us as the consciousness where people experience both unitary consciousness, either alone or unitary consciousness with experience. I'm interested what it does to a person and what it does to the brain. Right. Barbara. Growing up in New Jersey, I was raised as a Presbyterian, spent a fair amount of time


in church. I know identify also as an atheist. When I travel, I do find myself drawn to churches, to sitting in the stillness of a church and to looking at the art and the architecture. I think that is a beautiful part of our history, but I do that as an atheist. And for my own sense of spirituality, I go to a Springsteen concert. Right. So, you know, there are some curious human behaviors that strike us as unusual, like,


I think ... I don't know how much of this is true, but Beethoven is said to have always dunked his head in a bucket of ice water every morning. Ben Franklin is said to have stood naked in front of an open window every morning. Nikola Tesla, you know, a great champion and iconic scientific figure, apparently used to curl his toes a hundred times each night before going to sleep.


So you sort of hear those, you raise your eyebrows, it's kind of curious and so on. But, we don't feel the need to explain that kind of behavior, but when it comes to a behavior that is pervasive and that lasts for thousands of years, then it feels like it deserves an explanation and that's really why we're having this conversation here tonight. So, maybe start with you, Barbara.


When I hear the word faith or religion, my mind automatically goes toward one of the major religions that are practiced in the world today. Is that too limited of you? Yeah, I think it's a very natural view, but speaking anthropologically, if we were to do that heat sensing map of the world, we would see people who not only believe in God, or don't believe in God, but also many, many people who believe in gods, plural, spirits


in the forest, venerate ancestors, or have an enormous range of beliefs. So, I think broadening our view to understand that there's numbers of ways, not just in the past but now, to believe is a very helpful starting point. Now, you've also done work where you've gone beyond this species, right? Absolutely, yes. My work is in animals and there's a fascinating conversation going on now about whether it


is reasonable to suggest that other animals than us, do have a sense of either spirituality or religiosity and there's very invigorated debate going on. You know, Jane Goodall was the very first person to suggest, as far as I'm aware, that chimpanzees may be spiritual. But this is continued over decades. This is not my view. I am not suggesting that chimpanzees are spiritual or religious.


Where I come in is suggesting that their behavior is an evolutionary platform, so that what we see in our closest living relative gives us and understanding of the building blocks of what later became our religiosity. So, we know that chimpanzees, for example at a waterfall, can show what we might understand as a sense of awe and wonder. We know that chimpanzees can take the perspective of another through theory of mind.


We know that they can show empathy, compassion, that they have their own rituals and their own rules. And so I think that we wouldn't be where we are today without our primate past, which includes, of course, not only living apes, but what we'll talk about later I imagine, other human ancestors. Early Homo sapiens, Neanderthals. So, just as culture evolved, language evolved and technology evolved, I believe that that


human religious imagination evolved. So, Steve, part of what we're doing here is trying to think about behavior and think about evolution and sort of how they can play off of each other, and I know that the field of evolution in psychology is dedicated to trying to make those kinds of connections precise. Can you just give us a sense of what evolutionary psychology actually does and how it can give


insight into these kinds of issues? Well, the brain, like other complex organs, owes its non-random organization to natural selection. That if there are circuits in the brain that accomplish improbable feats, then natural selection is the explanation for how they got wired up the way they are. And we're going to ask of various psychological features whether they are adaptations.


That is, whether they increased the chances of reproduction in our ancestors. For a lot of psychological features that's pretty straightforward to do. It's no mystery why we see in stereo, because it's a ... for many reasons, highly adaptive to get a sense of the third dimension. Why we're repulsed by kinds of substances that are likely to carry disease. Why we find certain partners sexually attractive.


For religion, it's a religious belief. For supernatural belief, it's not so obvious. I don't think there's any accepted theory that religious belief, per se, is an adaptation. Rather, it can be a by-product of other adaptations. In particular, the ability to attribute minds to other people. We can't literally get inside people's heads. A mind is invisible, colorless, odorless, tasteless, but we couldn't survive as social


beings unless we assume that other people had minds as we do. We interpret their behavior in terms of their beliefs and desires. From there it may be a short step to attribute minds to entities that aren't other human beings, such as to trees and rivers and the wind, in which case we call it animism. We attribute minds to inanimate entities, to our own artifacts, in which case we call


it idolatry. Or to no hunk of matter in particular, in which we call it ... in case we call it spiritualism. Disembodied souls and spirits and father-like entities that don't have any material existence, but have this thing that we naturally attribute to one another. So it would be an extension. One would then have to explain why the adaptation of attributing minds to others, sometimes


called theory of mind, or mentalizing or mind reading, or intuitive psychology, why should be so easy to overextend it to entities that aren't in fact brains. And there, part of the answer comes from experience, what kind of input do we have in living our lives that makes this belief congenial and a number of anthropologists have pointed out that before the advent of modern neuroscience, the idea that minds can exist independently


of brains was not so farfetched. There's actually some compelling and empirical data. Edward Tyler I think was the originator of this observation, that when we dream for example, it's apparent that some part of us is up and about, walking around in the world and our body's in bed the whole time. A natural hypothesis is that our ... some locus of experience is not wedded to the body,


but can part company from it. Or in death, if someone suddenly collapses, they may look identical to the way they were a few minutes ago, but something seems to have left their body that animated shortly beforehand. And reflections in still water, shadows, seem to capture the essence of a person, including their activity, their expressions, their goal directed actions.


And again, divorced from the actual hunk of flesh. If you're in a trance from lack of sleep, or a fever, or a drug, again, the experience is that your mind can part company from your body. So, if you combine those experiences with our natural habit of attributing minds, it's not farfetched to think that minds can exist separately from bodies. Now we know better.


We know that the brain is the locus of experience, that there are many ways in which the brain can be vulnerable to illusions, dreaming being an obvious case. There's brain activity when we're asleep and that's why we experience things. But, before modern neuroscience, it wasn't such a crazy belief. One other ingredient is that we depend for our beliefs on other people, on experts.i


believe a lot of things that I have no basis for believing in my own experience. Like quantum physics. Yeah, like superstrings. I really believe- You believe in superstrings? I do, because very smart people tell me that they exist and I trust them. I don't say they exist. They may exist. That they may exist. I give some non-zero probability of that. That opens up a niche for people to market all kinds of beliefs about unobservable entities


including gods and messiahs, and devils and so on, and a whole set of questions which I won't talk about now is, what are the incentives for the purveyors of supernatural beliefs? What's in it for them to get other people to believe in gods and souls and spirits. There are plenty of reasons, but that's the other part of the story. Now presume the overactive assigning of agency out to the world is better than an underactive


version of it, right? If you're walking around and there's a rock and you happen to think that it has a mind, so be it, but if you're walking around and there's a snake and you don't think it has a mind, you don't think it can attack you, that's probably not a good thing. So, evolutionary speaking, presumably this overactive assigning of agency has adaptive value.


Possibly. It's not so clear. If it involves making sacrifices that are ultimately irrational, if it involves being manipulated by others, maybe not. But it may just be that the overall benefit of being able to attribute minds outweighs the cost in cases where others can exploit us. In the case of animals, of course, animals actually do have minds so it's not such a


crazy thing. Indeed, a lot of ... In some hunter-gatherer peoples, they do attribute enormous amounts of intentionality to the animals they hunt and with good reason, 'cause the animals really are trying to escape them for the same reason that we try to escape from threats. So, that degree of extension is not so farfetched. It's when it comes to rocks and rivers and mountains and trees and wind, that it becomes


more problematic. Right. So, Lisa, what is your view in terms of are we at some level wired for belief, or is that not an important part of the equation? I think it is actually. When we say ... When you ask are we wired for beliefs, I think that that can mean a couple of different things, right? So, in a sense, you could say, well, all brains, actually every brain on this planet, to some


extent, is wired to make predictions about what's going to happen next based on what's happened in the past. So, brains are not wired to react to things in the world, they're wired to predict. It's metabolically efficient to predict. Physiologically, most of the biological systems we have in the body are predictive to some extent. And so, if you mean ... A lot of people talk about predictions where ... When I say prediction


I mean, our brains for example, change the firing of their own neurons in advance of sensory input arriving to the brain. That's how you're understanding the words that I'm speaking to you right now. You've had a lifetime of experience of patterns, encoding patterns of what these sounds refer to and the patterns in their temporal contingencies. All brains work like this and if you believe that a prediction is like a belief, which


scientists do write about predictions this way, as if they are beliefs or explanations that are preemptively offered to anticipate and explain incoming sensory inputs, then yes, we are wired. Another way in which we're wired, you could say, is that- But that's for belief in things presumably that are demonstrably true. That's belief in any case, right? So, the idea that the brain is wired for prediction as opposed to reaction, is a general explanation,


it's a general computational approach to understanding meaning making of any sort. So, that means making meaning of fluctuating changes in light, which you experience as sights, as vision. It's making meaning of fluctuating changes in air pressure, which you experience as sounds. And it's also making meaning of changes that happen longer ... longer temporal sensory


changes which we would think of as an episode or an event. Little infant brains, you know, newborn brains ... A newborn brain is not like a miniature adult brain. It's not completely ... it's wiring isn't completely finished and we ... So, what infants are doing to some extent, is they're waiting for a set of wiring instructions from the world. The brain expects certain inputs in order for it to wire itself normally and it wires


itself both to the physical circumstances it grows up in, but also to social circumstances it grows up in. We encourage ... So, that's sort of the normal aspect of brain development that's related to being wired for belief, but we also wire our children for belief in other ways. We indulge them. In our culture, we indulge them in believing in animacy of their blankets and their little


cars and their little toys and some people in this room might believe that their cars have minds, right? So, we do ... that's another way in which brains can become wired for belief in the sense of development actually influences the wiring of the brain. Then there, we could also talk about feelings as the root of belief. That to some extent feeling is believing.


When you believe ... When you feel something very strongly, you are more likely to believe it and feeling is at the core of the wiring of our brains, and really you could argue most mammalian brains. Some people would like to make that argument, pull that argument even earlier. I'm going to come back to that in a for Zoran, you've spent some time studying the human


brain. Do you feel that there's evidence that we're ... there's an internal physiological predilection for religious belief? Yeah, I wouldn't so much ... Yes. As much as brain is I think organized to be conscious, it's organized for spiritual experiences and indirectly for beliefs just as Steve and Lisa pointed out. I think something happened to us, to our species, right?


We don't know when, maybe 3000 years ago, 5000 years, maybe longer. Suddenly, we became conscious. We became conscious in very unique way. It's not just we have experience, or that we have conscious experience, but we know that we are conscious. We have implicit knowing that we are conscious. We have an expression of religiosity going as far as we have records, you know, around


3000 years ago, maybe longer actually, but we don't have records any more of that, that people were really trying to figure out what is this thing. We're conscious, what is it? Who is this person who is conscious? What is it that's conscious inside us. And also, what is this universe? The way it appears when we perceive it with the depth of our consciousness, not just with


the surface of our mind, but with the deepest part of ourselves. And so that gives rise to some very kind of a deep core sort of explorations in the nature of human mind that we have records of. When we look at the ... What I personally feel is sort of the innermost core of the religious practices, pretty much in every religious traditions we find this, this unitary


experiences, experiences of consciousness itself. They can be either very deep mental silence in which all mental processes quiet down and then there is either just complete blackness and then within it, there's just awareness. Consciousness itself. Doesn't think, doesn't feel, doesn't need to do anything, but it's aware and knows that it's conscious innately, directly.


Doesn't have to think. Doesn't have to take itself as an object. Just consciousness itself. Then, that deepest part of ourselves, if it wakes up suddenly, and within our experience, then the quality of our experience changes dramatically, from this ordinary experience where I'm over here, I am limited to my body, I'm limited to my surface of my skin, whatever


my mind has constructed and learned over the course of my life, who I am, what the world is, how to relate to each other, how I relate to others. So, we have this elaborate self-world model inside our head that filters everything you experience. That takes a break temporarily, however briefly, and suddenly we experience that everything is one reality. One interdependent, but also at the same time, one consciousness that seems to extend, that's


the experience and encompasses everything. I think that religiosity tried to capture what this is. When the theistic religion says that God is simultaneously transcendent and immanent in all things. So, in all things. In this experience here that we're having, right now sitting in this wonderful place, this is the experience of God being transcendent and immanent at the same time.


That is one way of saying it, right? I didn't look at it that way, but that's very true. So, another way to say it is that we have two sides to our consciousness. One side is mind that creates experience. The other side is awareness which is just like a mirror. It simply register what is happening without doing anything to it. The two are different. In this view, they're separated by the substrate which is kind of like an unconscious film.


Matrix. It actually exists in the universe, they say. I don't. What's interesting, what happens is when the mind wants to find what consciousness is, it just finds itself. It finds attention, it finds intelligence, and it finds vigilance, but it can't ... If it doesn't know how, it can't penetrate through this unconscious substrate. And then it's basically concludes there is no consciousness.


It's just a mental processes, right? From the side of awareness, what the substrate does is awareness can't recognize itself. It can't recognize what it is directly so it experiences itself as a subject who is having experience. From that perspective, spirituality and spiritual beliefs are consciousness trying to find itself. It's trying to figure out what it is.


So, Barbara, can you take us back to the earliest evidence that we have for that kind of internal self-reflection that ultimately we think may have been the seeds for religiosity? The first thing I'd like to start and say is that, yes, it's certainly true that we attribute intentionality to a lot of animals, but the fact also is that they are intentional. So, we certainly don't have a corner on the market of intentionality or consciousness


or sentience or any of these other things. But if we're going to talk about the human evolutionary trajectory, we know that our species is about 200,000 years old. Our genus is around 2.4 million years old. So the question becomes when do we start seeing any of these symptoms, if you will. It's very interesting that there's a cave in South Africa, Rising Star cave, that is


the home of this human, perhaps ancestor, but hominid in any case, called Homo naledi and apparently there were numbers of individuals who were literally dragged by others into a very deep, subterranean chamber in this cave. So, Rising Star is a very famous project in paleo anthropology and one can watch often live feeds of the scientists trying to study these chambers and they have to crawl through


these incredibly small passageways. And yet, we know that approximately 250,000 years ago, people were disposing of their dead in very intentional ritual ways, going through a lot of effort and a lot of energy to do this. The problem becomes- Is that controversial or is that why? Beside the fact that they're bringing the people to the chamber is not particularly


controversial. The next step… But whether it was a ritual burial. Exactly. The next step is controversial because of course we have this small problem, which is that belief doesn't fossilize, so we don't know, and we have people, we have a chamber, and we have our minds and as we're talking about we're searching and yearning always to figure this out. But isn't it the case though that it's ... the people of ... anthropologists have already


discovered, let's say Homo neanderthals skeletons that are ... You know, they've been buried and posed in a particular way with things around them and so, it's- Like in Sungir, right? Right, but we're going in a kind of order so I'm starting a little earlier than Neanderthals. We have the roots of Neanderthal populations this time, but what's so fascinating is that


the Neanderthal burials don't come to a hundred thousand years ago or 60,000 years ago in Sungir in Russia, which is a Homo sapiens site just mentioned, is like 27,000. So, my idea is that, again, we have some glimmers and some intriguing hints, 250,000 years ago. Now, let's just fast forward, let me leap over many thousands of years, we've come to Neanderthals.


They are not our ancestors. They are our cousins. We used to say that they lived from 200 something thousand to 40,000 and then they went extinct. We no longer say that because here in the audience there's tons of Neanderthal genetic material and many populations, except some populations in Africa because we did not have Neanderthals in Africa, we find just as you were saying, Lisa, that there are very intentional


burials with all kinds of grave goods. So people didn't just stick people in the earth. They marked the graves as something special. To give you one example, there's a 40,000 year old burial of a toddler in what's today Spain, with a hearth all around, 60 sets of oryx and bison horns, a rhino skull. This was a place that mattered. In some sense we can think of it as a sacred place.


The question is, is there belief in an afterlife? Is there belief in supernatural beings? How would we know? We're imposing a great deal of our framework onto the past. Keep going in time, we come to cave art. And, of course, we're familiar with the cave paintings. These are not only early Homo sapiens, but also in some cases Neanderthals. We do know that now.


This is a relatively recent discovery, that we are not the only cave painters, but what's fascinating for me about this is you have these glorious depictions of animals that these people hunted, but in addition to that, some very mystical and fantastic figures. A bird-headed man in Lascaux cave in France. A human that is part bison. Some other just wild figures.


So this is not just people representing the reality they saw before them, but rather there's an interest in what is not in front of you, what is not just here and now. We fast forward one more time. We go to Turkey, to this particular, perhaps temple, Gobekli Tepe, is dated to that period on a hill in Turkey. Massive 50 ton blocks that people moved onto a hillside and carved with, again, elaborate,


largely animal, images. We think this is a ritual space. Not everyone agrees. This is contentious. But in every single case there is a good argument to be made for the possibility of the human brain uncoupling itself from the here and now, to think about these questions of the supernatural. And we have hints. We have to go forward in time again before we come to a really institutionalized religious


system. But again, the reason that I think the human religious imagination evolved because of all these earlier cues. Right, right. I think it's important ... I think that Barbara's bringing up something really important and that is, we're all talking ... We're sort of fluidly talking back and forth as if spirituality and religiosity are identical forms of meaning making and they're really not.


There are many, many ways to be spiritual. Some involve belief in a supernatural deity with agency, but not all of them do, right? Some of them ... sometimes spirituality means just being full of awe and wonder at something larger than you, that transcends itself transcendence, like in connecting with nature for example. As Einstein was saying in his book. Exactly, and I think ... So, one way to think about this is that when we're talking about


the evolution of religious thought or spiritual thought or we're talking about the biology of spiritual thought, we have to be thinking about the fact that we're talking about different psychological features here. One has to do with connecting to something in the moment that's bigger than you and that might transcend you. One element or feature is about explanation, right?


Another is about agency. And so those may not have all evolved at the same time, or perhaps they're not all meaningful for all people, so maybe everyone in this room has had a spiritual experience. They might not call it that, but they've had an experience where they've connected to something that's bigger than themselves that leaves them feeling awestruck, but not everyone would


take the additional steps of trying to find an explanation in that or trying to find agency in that and so forth. But if we do go and focus on beliefs that do transcend just a sense that there's a larger reality that you were a part of and goes toward a supernatural belief in things that science typically would not confirm, do you see the potential for an adaptive value, for a progression


that would lead to a brain that would have a tendency to do that? It's hard to give an adaptive explanation for belief in entities that don't exist. There can be an adapter of explanation for the search for explanations which obviously are not infallible and they can be misled by absence of evidence, by people who have an interest in promulgating certain explanations.


I think what you have to direct the question at not the content of beliefs that we associate with particular religions, but just in particular ways of thinking, but ways of interpreting the world, ways in which people influence the beliefs of one another. What are the kinds of things that we can hypothesize and then what does that leave us vulnerable to hypothesizing which, from the perspective of science, we know may be incorrect, but


can nonetheless be very seductive to a mind that is apt to think in certain directions. So what's your view say of those who've made the case that the adaptive value is not so much in the actual belief in things that perhaps don't exist, but it is from the cohesion, the group cohesion that that can yield if there are many people for whom that belief is shared, then all of a sudden you've got a stronger group bonding?


Does that hold any weight for you at all? There is a folk theory of evolution that adaptations are all for group cohesion because whenever there is some mysterious aspect of human psychology for which it's not clear what the adaptive value is, people will say, "Well, it fosters group cohesion." Why do we enjoy music? Group cohesion. Why do we dance? Group cohesion.


But there a couple things wrong with that style of explanation. I'm very deeply suspicious of the explanation always says group cohesion. One of them is, group cohesion is not, in fact, what natural selection selects for. It selects for propagation of genes. Sometimes groups, cohesive groups can help the individuals that compose those groups, but if a group is too cohesive, you could be exploited by the group.


You could be cannon fodder. You could be a sacrificial victim for the benefit, for the cohesion of the group. But any gene that would allow you to be exploited by the group would be selected out because genes are selected much more quickly than groups. Also, I think it's too easy to use our own intuition that we like to bond over music, over religion and so on, but that is itself a part of our psychology that needs an explanation.


Why would beliefs in invisible entities make a group coherent more? You can't take that for granted. That's as much of a puzzle to a psychologist as… But we do see, we do see evidence of that even though we may need to explain it. We do, although ... the supernatural beliefs can also divide a group, needless to say. There are wars of religion and precisely because they ... The content of those beliefs aren't


derived from shared experience. They're not things that everyone can just open their eyes and see. They're things you have to be told. And that means that if you're told by different shamans or different priests or imams than you can go to war over those beliefs. That's why I think that group cohesion doesn't strike me as a satisfying explanation for belief.


Lisa, do you have a different view of that? I have ... yes, I think I have a different view or maybe I want to add some information. You can be contentious. You could just like- Believe me, I have no problem with being contentious, at all. Anyone who knows me, knows this is true. Here's what I want to say, that I think that there is an immediate advantage potentially,


which is there are two that I can think of that relate to the functioning of a nervous system in the following way. First of all, uncertainty is tremendously stressful for a human nervous system. And I don't mean stress in a euphemistic way. I mean it adds a metabolic burden to a nervous system which if it persists can actually make someone sick and I think religious beliefs can reduce uncertainty.


They sometimes explain the unexplainable. Things that we now might explain through science, used to be thought of as magic or as caused by a deity. So, I think in some ways it is not just psychologically comforting, it's actually physiologically potentially less ... it reduces people's stress. It reduces their, what scientists would call allostatic burden. Very simply, just step back one minute and say, partly our brains evolved not to think


and see and feel, but in order to regulate the systems of our body. As our bodies got more complex, brains got bigger. A brain's main job is to keep the systems of your body alive and well so that you can propagate your genes to the next ... let me just finish. I know you're going to disagree, but ... Your brain is constantly running a budget for the resources in your body and it's not budgeting money, it's budgeting glucose and


salt and so on and so forth. And so, if you think about your brain running a budget for your body, uncertainty just drains that budget. Drains that budget much faster and makes it really harder for people. There's also, I think, a social aspect to this too, in the sense that we are social animals, we evolved to be social animals. It's one of our major adaptive advantages, to be social animals.


But what that means is that we regulate each other's nervous systems. We don't bear that body budget on our own. We have other people to help us do it. There are other social species, right? So, insects are social, and they regulate each other's nervous systems through chemicals, through scent. Rats, and some mammals, add touch and they might add hearing and primates add vision.


We, as primates, have all of those ways to regulate each other. Plus, we have ideas that we share. And so, there are many ways in which religious belief can actually reduce the metabolic burden on the nervous system. Is there data for that? I mean, is there data that really makes a convincing argument that religious belief does reduce ... There actually is. I'm not advocating this, I'm just saying as a scientist, there is data.


There are data to show that people who ... I want to say this, you know, I'm not negating any of the challenges or problems that religious belief introduces to a fitness argument. I'm just saying that there is this other side where there are data to show that people who are religious actually are somewhat happier and healthier and have greater well-being. But that's because, of course, they're living amongst other people who believe what they


believe. Steve, you had a response again. Barbara ... yeah. I just really wanted to make the point that we're actually operating in a framework of human exceptionalism when we keep asking things like, was social cohesion part of the reason that we were religious, or did being religious drive social cohesion, because, you know ... Why are we not asking about orcas, for example.


Orcas are exquisitely cohesive and they do things as a group and they regulate each other as individuals and they solve their problems as a group and they manage to do that without God. And chimpanzees manage to do this without God. So, I think that in addition to the problems that Steven pointed out with social cohesion arguments, that they're thrown out constantly that we can just look at the natural world


and we can see that there are so many different pathways for this. If we only look at our species and we don't take this comparative approach. We're not going to get answers to these questions. Yeah. Steve. Lisa, I agree that are religious belief can reduce stress but I don't think that that can be an explanation as to why it's adaptive. Because the fact that uncertainty leads to stress is itself an adaptation, namely there


... we're missing some information that's critical to our well-being and we're ... when we get stressed and nervous that motivates us to seek out that information or to act in a way that keeps us safe even in the state of ignorance. But there can't be an adaptation to reduce stress by false certainty. That is, by being certain about something, some claim about the world that in fact is


not true. Because if I'm really nervous, say because I think there might be a predator, and someone convinces me, no, it's actually a rabbit appearing in the guise of a predatory cat, that might reduce my stress, but it's not an adaptation. Fair enough, fair enough. So Barbara, you gave us some history of where you think this may have begun all the way back in human history.


What's your sense of why it has persisted for so long? I tend to come back to this issue of community and practice. Because I think if we shift the perspective from looking so much at belief and sacred texts, which we tend to do in today's world. You know, you put up a slide that talked about the percentage of the pie in terms of Christianity and Islam and that's one important aspect of this, but I think that for many of the


world's people, there is just something that's irreplaceable about that sense of community, that sense of ritual practice and that sense of familiarity. And it is ... Sure, it's possible to try to replace that with some other ways to find those same things, but there is something about the connectivity that comes through the transcendence that I think is important.


When you bring those two elements together, the community and the transcendence and sharing that emotional meaning making. And one of the things that i like very much about the people who are discussing whether there's faith in other animals is the idea of breaking the link between making religion always be about text and belief. So I think that that helps us understand this question a little bit.


The idea ... I think about what Martin Buber wrote, coming from the tradition of Judaism, when he wrote that all of real life is encounter. There's something that's particularly transporting about sharing encounters of transcendence and I really feel it has something to do with the persistence that we see. But clearly, when we talk about the spirituality instinct, that's a very fraught term because


of the secularization that's happening in the world. If that really were to be considered an instinct, how do we explain the tremendous transformation that we're undergoing? So people are finding humanism communities, other communities with a different type of transcendent connection. I think there's a balance between what continues as very, very strong tradition that carries


communities forward together with new ways of imagining some of these very same things that are coming about. The ways that people can experience religion now. I mean, they extend into communities with AI. They extend to virtual realities, virtual churches, virtual connection, virtual mosques, but also the idea that we're beginning to think just differently about animals and nature.


We know Emily Dickinson's church, right? Well, we also know that one of the beauties of the evolutionary perspective among many others, is not only understanding our own place in the world, but our really deep sharing with other animals. And so, I think there's the possibility that we are going to continue this shift of finding different ways of sharing transcendence as I feel with nature, with animals.


So does that transcendence relate to ... I mean, Steven J. Gould, I believe once said that all religions begin with an awareness of death. So, is that transcendence profoundly connected with death or is it somehow independent of it? I think you've hit on an important thing. Part of my last six years of my work has been very profoundly taken up with the question


of animal grief and animal mourning. And I'm not suggesting, again, to be very clear that animals have some kind of sacred sense of death, but they have a deep awareness of loss, so that we find over and over again- Can you give an example? I mean, that's… Yeah, I can give loads of examples. For example, with elephants we know that the entire community responds if a matriarch dies.


There was one particular example in Africa. A particular community of scientists who followed for seven days, a parade of mourners who came to this particular matriarch who had died. Her name was Eleanor. Not only her family, but matriarchs of other families. Some stood vigil over the body, some rocked over the body. Others showed distress. So my definition of animal grief involves some kind of symptom of distress.


Social withdrawal, failure to eat, failure to sleep, some vocalizations. But it's not only the, what I call the usual suspects, the big brained mammals like chimpanzees, cetaceans and elephants where we see this. My research is showing that we find it in animals as different as collared peccaries in Arizona, chickens, all sorts of domestic animals, the animals that we live with.


And again, what I think is so important about this is not necessarily that the animals have the same awareness of death that we have, but that they feel this profound sense of loss. That is emotional meaning making and that's where they enter into this community of sort of a transcendent experience in an animal sort of way that I think is the foundation for this discussion.


So, Steve, let me ask you. Transcendent experience, community, is one powerful way of thinking about what religion provides. On the other side of the discussion, you've got people like Dan Dennett. You got people like Pascal Boyer, and various others, whose explanation tends more toward a mechanism. The spreading of ideas. The spreading of memes, you know? An idea jumps from brain to brain, to brain and it naturally tickles certain receptors


that we are naturally attuned to and therefore certain ideas have a tendency to stick and spread, among them being the very ideas that constitute religious belief. Is that an approach that you think gives us insight or is that not a useful way of thinking about it? Yeah, because what puzzles us when we try to explain the prevalence of religious belief, is not so much why people mourn the dead, feel a sense of loss, feel it profoundly affects


their lives because it does profoundly affect their lives, it ought to. If you didn't mourn someone when they were dead, when they die how could you have loved them when they were alive? That is, in a sense an easier set of reactions to explain. What puzzles about religion is belief in the Trinity and in hell and in 72 virgins and all of the other contentful beliefs that go well beyond a sense of awe at the immensity


of the cosmos or loss in the sense of death. That's where Pascal Boyer and Dennis Barbour and others going to step in to why we're vulnerable to such specific beliefs as opposed to emotional reactions to major events that affect us. There, I should actually credit Pascal Boyer for linking the idea that we are mentalizing, we're apt to attribute minds to others as one of the core explanations for why we are


subject to religious beliefs that leads to spiritualist beliefs. Right. So, Lisa, what's your view on these two sort of poles, the need for community transcendent experience and perhaps something that just speaks to the way in which certain ideas naturally stick inside a brain that evolved to perform certain tasks and survive? I think that both of those explanations to some extent are phenomena.


I'm not really sure if you're referring to them as explanations or just phenomena, are actually rooted in our sociality as a species, so I think it's not a metaphor to say that we regulate each other. We do, in very substantial ways and in ways that we're completely unaware of and part of how we do this is we create meaning that is shared and realities that emerge only by


virtue of collective agreement. What I mean by that is ... We're talking here, for example, about grief and that animals, non-human animals feel grief and so on. Non-human animals feel loss, for sure. I think there's no question that that's the case, and they suffer. I think there's no question that's the case, but research on emotion suggests pretty clearly


that there is no inherent emotional meaning in any set of physical signals that occur from your body. What we do is ... humans, is we learn to impose meanings on those signals, right? So, a scowling face for example, is not a universal display of anger. People only scowl about 25% of the time when they're angry and they scowl at many other times when they're not and there are many cultures around the world, including hunter-gatherers


who don't recognize a scowl as anger, for example. In many cultures, and it's an interesting question about why this is the case, but we'll just hold that aside for a moment, what we do is we impose meaning on a scowling face, we impose meaning on a scowl and by virtue of that meaning that we've imposed, the scowl actually literally takes on that meaning and we can easily predict what's going to happen


next. What I mean by this is it sort of works in the same way as money works, right? There's no inherent ... Nothing that's ever served as currency in human cultures does so by virtue of its physical nature alone. What happens is a group of humans impose a meaning on pieces of paper, or little rocks, or salt, or barley, or big rocks in the ocean that can't be moved, or mortgages, or any


number of things and all of a sudden, those things literally take on value. They can be traded for material goods only because we all agree that they can and when someone moves their agreement, when people withdraw some number, people withdraw their agreement, those things no longer have value. Well, emotions are kind of built in the same way. Heart rates change, faces move, distress can occur out of loss when you lose someone who


helps to regulate your body budget and you lose that person, you feel like you've lost a part of yourself because sort of you have actually lost someone who's helped you regulate your nervous system. We impose meaning on those physical events that take on that meaning. I mean the physical events take on those meanings by virtue of the fact that we, as a culture,


agree that that's the case. I think that in my view, this is partly why memes occur, because ideas are contagious in a sense because we often as part of our ... one of our superpowers as a species is the ability to create meaning. The ability to create something real where there used to be nothing real, only by virtue of collective agreement. We impose meaning on something physical and then that physical thing takes on a bigger


meaning. To some extent, I think we also do this with what we think of as transcendent experiences. So, when a group of people are all together having a similar experience at being awestruck or wonderstruck at something in nature, there's an opportunity for creating social reality, for creating a meaning that wasn't there before, that supersedes just the shared wonder of


the moment and so, I don't see these ends as really different. I see them as kind of emerging out of the same capacities- So, in the remaining time, maybe we can just focus on humans and on religious belief and maybe we could start with you, Barbara. Mm-hmm (affirmative). There's been a view that's been around for a long time that as science progresses, it kind of pushes out the need for religion, in terms of its explanatory capacities and


so forth. Now it's suggested over time that the role of religion would decrease. Do you imagine that that is the pattern that will play out or is that a completely wrong and oblique way of thinking about the role of religion and therefore what its future will be? Yeah, it's interesting. I feel two things at the same time. I do think that the increasing tendency towards humanism and secularization is a very welcome


thing. I mean, I did say that I am here speaking as an atheist, as a person who is a non-believer. We certainly want to be able to think clearly about science and about the forces that act in this world and we know, all of us know that religion is not always helpful in that particular way. At the same time, I think it's really important to think again about the cross-cultural patterns


and the number of people in the world who don't fall into believing in big sky gods, who don't even, in some cases, have a word for religion. I'm not suggesting that that makes them different in any kind of scale of intelligence, not at all. We know that all human populations have the same capacities. But sometimes, just being religious is just the way life is.


It's so much a part of the era, of the way that you live that it's not something that is going to change. I think these are two different ways of looking at it and I'm not sure how to weigh them. I'd be interested to hear what other people would say about that. Why don't we go right down the line. Zoran, do you have any ... I think that at its best, it gives us a framework


to experience the spirituality, to be able to connection to something that's larger than ourselves. And so, if it fulfills that role for people, I think then that's, you know, that it's its purpose. I hope that as the ages go, the science and spirituality basically flow through each other smoothly. I think that for that, really we just need more research in these topics.


Lisa, thoughts on the future? I think I would stand by my descriptions that I think that there are some advantages to religious belief, but I think there are also some major, major disadvantages, some of which Steve has talked about and I think it ... From my perspective it's probably about time to wonder whether or not the disadvantages outweigh the advantages, frankly.


Because there are other meaning making systems that are available to humans to help them make sense of the world, some of which may not have the disadvantages. They may have the advantages of religious belief, but they might not also have the disadvantages. So, I probably lean more in the direction of wondering how it would be possible to test that, to investigate that.


Steve, thoughts on that? Several trends in the overall historical archival of disbelief when there's a lot of religions have become more humanistic. They don't take their literal beliefs as seriously as they used to. If you're a real, believing Christian and that if you don't accept Jesus then you're going to go to hell, then you really ought to try to convert people at sword point.


And you really ought to slay heretics. You'd be doing ... It's like a great public health measure. You're saving eternity of suffering in hell for billions of people. But most Christians, no matter how seriously they take their belief, don't try to convert people at sword point anymore. They don't have inquisitions and they're not completely consistent and that is a kind of


benign hypocrisy among many believers that they fortunately don't act on the totality of their religious beliefs and that's been a very beneficial trend. The institutions persist with the all-encompassing nature of the beliefs, we get deluded. Another is that when people switch their religious affiliations, the overwhelming tendency is toward no religion at all, so the world is becoming less religious.


There are two reasons why that may seem hard to believe. One of them is that religious people have more babies and so the number or religious people is actually increasing, and projected to increase even as the number of people who switch are switched in the direction of no religion. The other is that religious groups tend to be more politically organized. So, the problem with secularists and humanists, and so called nones, N-O-N-E, not N-U-N, that


is people with no religion, is they don't vote. Evangelicals all vote. I shouldn't say all. Something like 80% of evangelicals vote, 25% of just the unaffiliated vote. And so there's a outsized influence of religion in politics because of this organization. Our perception of the growing influence of religion is in, not exactly an illusion, but it is pushed along by the greater fecundity and greater political organization of the


religious, even as the overall direction is away from religious belief with secularization, including the United States, which was a ... for a long time was an outlier that every other western democracy had become less religious than the United States. The United States is now moving in that direction as well. One final question which is sort of the inverse of the topic that took up some of our time


in thinking about animals and their reactions and beliefs. What if we flip it the other way? So, a hundred years from now, or 500 years from now, we get visited by an alien civilization and we show them what we've learned in math and physics and they nod their tentacles and they ... you know, we're all sort of good. But then we show them our religious beliefs.


Do you think that they'll look at that and say, "Yeah, yeah, we get it. You know, we've got out Jesus too." Or will they be completely baffled as to what this thing called religion is? Barbara, thoughts on that? Wild speculation. I have no idea the answer to that question. Fair enough. If I had to guess, I would guess baffled. I think that if you think about how 500 years ago, we didn't know much about electromagnetism


right? And now, we can go all kinds of things with and we can actually entertain ourselves with. Well, think of the aliens come and they understand the function of consciousness in the universe, right? And they can use consciousness that we use for all kinds of things. It's not any kind of mysterious thing for them. That's I think where it's going. Lisa? I don't think they'll be baffled and I don't think that they'll necessarily share ... I


mean, I'm just ... I'm not even speculating, I'm imagining. I think that they will see it as part of the evolutionary trajectory of ... Or evolutionary development of a species and maybe something that was a necessary step along the way, but became unnecessary at a certain point. Final thoughts on that one, Steve? I tend to agree there. It may be similar to our attitudes towards the animistic beliefs of people that we've


come across. We can ... or an intelligible but we might consider them obsolete. Do you think that they will have had a similar evolutionary trajectory? I know there ... Is this an intrinsic part of the way in which a living system would evolve that can survive that will necessarily ascribe agency in the world and tell stories about what those agents do and the role that they play or is this some peculiar thing that


happened to the human species? A great question, a profound one, but I suspect that ... I guess the question is, does sociality depend on reciprocal mentalizing, attributing complexity to other creatures? I suspect it does, but a speculation and if so, would there be enough evidence early enough in the history of an intelligent species that it would not be tempted by over-attribution


[Music] okay so hi I'm Lucas easy one first of all thanks to debug and to be a developers for inviting us today so what we will try to do today is share some of our experiences when it comes to IP architectures we'll also try to give some recommendations about what to do and what not to do when you're designing an architecture in a larger enterprise environment we will try to give examples

Building high performance and scalable architectures for enterprises—Luka Samaržija & Ivan Sokol


where we can from our own experience and you will see we will cover actually several topics so feel free to ask any questions if you know we go cross one topic too fast because number of topics that we want to share so okay let's start so actually what is an enterprise IT landscape and how does it look like you probably guess that it's big given and I we work in telcos most of our careers


which is a really big act landscape but just to make it more clear I'd like to compare it with the buildings and let's say a neighborhood so it looks like something like this you know it's a being it's modern it's neat it's beautiful I'm kidding of course it doesn't look like that at all probably only chief architects thing that looks like this actually it looks something


more like this or this or this if you're lucky the reason is that most enterprises have been building their IT for the last twenty thirty years and doing it mostly by adding new systems on top of existing ones rarely decommissioning your ones so now you have a really big combination of really cool and modern stuff and some really uncooled and all that stuff that's it that actually makes it really


interesting but also challenging so but what happens at one point since you're building building building on the other it starts to crumble and you actually have two choices you need to you need to change something or as you like to call it these days do a transformation project and then you can do it in two ways basically you can go all the Intuit Big Bang changed 80% of your landscape


or you can do it progressively in our experience I have done one transformation that was a big bang approach let's actually first don't don't do Big Bang transformation projects try to do it one step at a time and progressively if possible so how can you do it well first you need to identify what are your biggest pain points what is the what is the thing that is most troubling your business


with the current IT landscape then think of a better way to doing that when you do that take a step back because you're probably already going to white and you're looking at the project of three to four years you can't do all of it do a minimum of what you can think think of but but it makes sense that it really solves the biggest issue that you can and that you can


integrated with the existing systems that you have so in order for you to do that there are actually three things that you need to consider and have in mind for us in our experience microservices architecture is a must in doing that why not just because it's a hype and everyone in doing that but because you can also release in a lot of books that talk about macro services


architecture it's as people say so are done right it's finally finally we have the technology and the means to do service-oriented architecture in a good way to make it scalable and maintainable so that's why macro services architecture is a must but when you can really do a lot of wood or doing a lot of bed is a in integration part so you need to be smart when it comes to


integration patterns and also is in all development unit who developed development practices system otherwise won't be able to tactical so those are actually free areas that we will try to cover in our presentation first the micro services architecture the main message that I want to convey here is the micro service isn't the support application now don't get me wrong I


have nothing against people would I like it actually but though many times I've seen someone will the Java spring boot application deploy it on the docker container and says I have a macro service you don't have a micro service unless that micro service has data when we come to the definition of a micro service in its essence it's a small autonomous application that can handle one domain


independently autonomous and independently you can't do that if you don't share data you can't do that if you're creating a facade on my or proxy my cursor that keeps baiting legacy and this query in that legacy for all day I mean you can do it and that there are uses for such such applications but you can forget about any kind of performance or scalability if you query an existing legacy banking


systems for every time someone the queries your API on a micro service and needs to get some data that's the most important peak we will talk later even will talk about what are good ways to get data out of legacy in inter macro circuit so I'm going to that you'll hear that later other thing that is important is how you design your micro service what is important is a lot of times


people have a set of functionalities you put it in a micro service and you you just go from there it's a great way to build a my product what that means is build a micro service that's actually monolith just your deploy it on docker and the quality Mac series in micro service design you should really look at domain driven design that's another concept you have great books about it


especially the part you have a book by Eric Evans domain driven design when he talks to bounded context but what that means actually in a nutshell is that when you design a data model for an enterprise you can't design one data model that will work for the entire enterprise because that's its action is called an enterprise functions for example you take customer entity and you


talk to finance you talk to say all the top customer customer care each of those Department look at the customer differently in finance they look at did he pay his bill and suffocated in sales they look at good services is he using can we upsell cross-sell upgraded in customer care they are looking at does have problems does he have problems in the past what


kind of problems etc so the models are not different and what you need to do is you need to establish a boundary in which your model is unique and that is basically in one domain we will could have one model that is unique and then when you talk to another team or whatever the physic designing another domain you need to establish what the boundaries are exact like and what is


important how to transform and connect your model with their model it's really a good concept I haven't talk any more about it but you should look at it really a lot of materials online about it so the next topic when it comes to micro services actually this is one of my favorites and also a lot of debate is around debt when it comes to the communication patterns


between micro services how do they communicate with each other there's actually two big patterns one is choreography the other is orchestration choreography you have micro services that are independent they function as let's say individuals with a set of rules in which they talk to each other but there is no central micro service or whatever that is orchestrating them in


orchestration you have a central entity that is orchestrate that is telling the other micro services what to do which one is better neither because it depends on the use case that you have mostly in whatever you are designing NIT there is no one-size-fits-all you need to be open-minded and you need to look at exact use case that you have so for example a choreography is a really great


it is actually my preferred method because in choreography the main benefit is that these micro services are completely decoupled when one goes down it doesn't influence the rest if you need to remove one micro service and implement it in using a different technology or whatever you can do it because they communicate asynchronously they have a set of interfaces that are


standardized and this really gives you a lot of flexibility but what is a problem with choreography is that if you have a complex system or a complex process that you need to implement it's really hard to visual the communication so if you can't visual that which visual visual visualize that communication don't use choreography you can visuals visualize it by using open tracing and


technologies like that there there are ways but if you can't do it don't want choreography orchestration on the other part is great for example when I use it in an order execution process when you have a process that is sequential and you really need to follow the exact amount of steps that are needed to talking for example in telco when you do order execution


you need to create a customer you need to create his assets you need to send his equipment to the delivery service you need to talk to other telephone operators regarding number transfer and stuff like that you need to activate the subscription for the customer in billing there's a lot of activities that you need to do all of those can be implemented as different micro-services


but many work is straight you are really sure that everything is happening the very data truth but you shouldn't do orchestration in code because the same is choreography you won't have any visibility of that when you do orchestration my advice is use a BPM tool if a really good BPM tools on the market that you can use and they intend visibility in the control the process is great so just


to show you this is one BPM tool and this is how it how it looks like you have where are the process instances some are in incidence some are not so it's a it's really a good way to see what is happening in that process you really do if something is amiss in incident you can easily see what's happening so the level of control here is really great so that's my advice when it comes to


orchestration but the most important part is no one-size-fits-all so let's move on just some quick best practices when it comes to micro-services design actually the only don't here is don't put everything in code use the technologies that are on the market and that are really great for example if you have a lot of business rules that you need to implement there


are great rule engines that are fast and that you can use instead of writing millions of ifs and cases in your code the only trick here is if you're losing in a row if you are using using and there are there two to two ways you can use the rule and you can embed it in your code and then it's very to just use the engine and edit code or you can build it as a independent standalone


service but if you do that it's important that it's a passed rule that the rule engine only executes rules it doesn't query any database or back-end or anything for data it should look something like that this is request this is response you give in the the rule that it needs to execute you give him the data and then it executes the rule inhibit the response back and it should


be in memory and it should be really fast as you see here it should really be a number of milliseconds the seconds that you can count on your fingers and toes because if it's slower than that you can forget about any kind of performance that uses the rule engine so it's really important that it's fast proof it's in memory and it doesn't query anything it's just an


engine also use artifact repositories they're really easy to use really beneficial use tools for logging don't log to file system database and then if you have an incident spend three hours wearing debt use pools the terror in on the market protect the self is for monitoring use time series databases because they can handle a lot of data and they have great visualization tools


that you can look at in the operations part so I'm not going into specific technologies that you can use but for all of these technologies you have open source solutions if you want to know I can tell you what we are using but maybe later on or in the question space and the last but probably the most important things he is work together with business because a micro service or any softer


that is its own purpose doesn't make sense so you should you should build it together with people from business and you should build stuff that really solves some business issue that can be some new capabilities of extra functionalities they can be just that you are doing refactoring transform suddenly some old implementation into micro service because you want better


performance which will result in better customer experience these are all valid reasons but don't do it without talking to business and having really good memories because basically micro service should be analog to a business domain and it should implement business capabilities so that is really an important part here so they could actually be the first step when you're


designing the micro-service know what is the challenge and what are the capabilities from the business side that you need to solve and then go to the technical part and that's it about the micro services architecture I will now give the work to even we will talk more about integration about integration patterns so when we were doing this kind of migrations basically integration


become as you move to micro service integration becomes more of a hot topic than it was before so some of our experiences don't use multi layer of API clothes what I mean by this we have a situation currently were fronting is going bacon that is calling second packet that's calling terror that comes forth bacon so basically you have this connection of flows where each layer is


introducing their own bottlenecks there are slowdowns so don't do this second is what Luke also mentioned in micro service architecture try to do the main driven design in telco industry where we are happy that we have a global guidelines regarding this there is a community gathered around TM for telemedicine forum organization that already built for us some models so we


know what are the customers what are the products what are the services resources payments so we already have domain driven design that can be followed basically we already have domain prepared that just need adjustment for a specific tau and this domain is extensive enough so that you can extend it without let's say many travels of course no brainers don't use


non scalable or low performance by non-scalable I mean try to not reach the limit where you need to pay for extra licenses or where you are on all the technology that you cannot horizontally scale I mean you can always add more CPU power but this is something that needs to be avoided and also try to use the try enough to use no documented API I know we have cases where there's an API


working for 10 years it works good it's just that developers that did that long time goal of the company and you don't want to rely on such API because when the problem starts then you will need to redesign the API in a matter of hours just for it to work so if you have something that is old and I mean how could we have a lot of old technologies that are there because they work and we


have systems that are old 10 or more years you have stuff that is not documented so what to do in integration patterns try to use data provider API so if you cannot come close to the data by varying the database try to come to the layer that is closest to that database layer in some cases you can of the show some on the shelf solution where it is a black box you only have the API provided


by the solution no one is telling you ok in the transformation let's replace it you purchased if you want to have return of investment over it and basically you should use it but you don't want to use first API that is going second API that is calling this code safety I try to consume it directly and then use rule engine to apply any rules that you have over data to provide


domain-driven the main data that these needs for that particular purpose and try to do something that is a try to ruin something that is easily upgradeable to new principles so if you have old APR don't let you see okay you need to spend a little more effort to be compliant with the new proposals new strategy invest in that API clean it out and upgraded don't built everything from


scratch but of course when you have 10 or 20 years of development a lot of things are piled around so sometimes you just need to have a clean cut and do it from the beginning regarding the integration patterns we found let's say something like five turns I will present some of here and what is important is that one pattern doesn't fit all so first when we are


trying to figure out what betters we first want split it up by CQRS principle when we looked at our logs and how users are accessing our data most of the data access is read access so a lot of people on the self-care device is going to see what is the state of their consumption are they paid have they do the bills and stuff like this so most of the data is coming from down code to the


customer and then then you have a payment of bills activating some new adam strange's tariff and this is the smaller amount of command like queries so basically one pattern will not feel cold try to separate your integration patterns in your API by CQRS principle do stuff enhancing if if you have problems with executing the commands give the user the info okay it is your


request has been received and do it quickly and then we're on if you have five ten or 20 seconds where you need to process this data is Luka mentioned our orders are complex sometimes we go from creating the customer to checking the dista to see if the speed is good enough so that he can receive some HD channels it takes some time so try to do it innocent way


and try to keep it simple so these are some of the patterns I will share with you so this is the CDC of data replication better so we have legacy beckons legacy API what we are trying to do is copy the data from these databases to our application database and then do a data transformation from legacy model to new the main model so in legacy VIII you often have situations where in some


applications there is a mix up of many models we have for example customer data and with five different databases so this shouldn't be the case in the domain driven design so what we are trying to do is pull this data as fast as possible through the data replication layer and then transform this data to a domain driven date and then when fronton describing your microservice you have


data already prepared in the model that is by the domain driven design and what is important here data replication it's not only a CDC so depending on how and is the data change how often users needs to be aware of this data change it can be a job it can be a night and drop so basically it's up to you to see what fits your purpose and how you do the replication CDC


he's only one of the options that that is applicable the second pattern that we saw is when you have off-the-shelf solution or where you need to consume something not directly from the database so how we did it for example in our case this is the users consumption API that is connected to a different billing systems and this data exchange really really frequently CDC and the amount of


data that is coming through through the mediation system it's really big so CDC would just introduce the override that is not good enough so what we did first we simplify the architecture currently we have these multi layer API flows that we're introducing their timelines and bottlenecks now we connected either directly to the database or where we had all the shells who should be connected


to a soft services that that of the shell solution presented and then we are doing the query this solutions transforming it in specific service layer and then presenting it to the customers of course I put the cash here because usually users don't want to see every second but what their data consumption so you can put this kind of data in a cache for 10 or 50 minutes 10


minutes should be enough for users to buy safe if he wants to return to the to the consumption data he can check it out but also need to be aware of you need to sometimes give him a pull to refresh capability if he really wants to see data exactly this time you can do it by demand but most of the users just when login to the South Korea they want to see the current consumption and if they


jump over to the details you already have this data cache you can you can show it to them okay and the third layer I was mentioning regarding the commands that are being executed basically if you have situation where we are executing for example changing the death of a customer and this takes some time because a process needs to be run you need to connect to all those legacy


systems that are responsible for changing the tariff from the what's a BSS layer to OSS there sometimes this takes time so trying to see what are the transactions that you have minimal number number of errors so if you have a change start process that is really if qualification of well staff user can jump into is really good at first then your execution part will mostly be


successful but if it's slow you can use the pattern where you store the message you tell immediately to the user your request has been stored and then you start this in a synchronous way executing this message when this is successful send a push notification to the user so we have self care applications we have SMS these we can send to the user now your type has been


activated so try to use whether you see that you have a really higher percentage of successful executions trying to do this in an ASIC way okay so other things regarding data aggregation and data consolidation don't do it on demand so this is more let's say applicable to beckoned for fronting players or front-end closer api's don't try to do on the on demand or on fly aggregation


to Mapes try to set up a domain and prepare it how how easy it is fitting don't try to do aggregation over many domains it really means that you did something wrong if you need metrics if you need aggregated metrics try to prepare it in advance by relying on event-driven messages so instead of querying the database to see how much SIM cards customer has you can do once he is activating a new


SIM card or something like this put this invent and store it somewhere in the bucket and then when you want to know how much SIM cards because queried bucket don't go to the database and try to query select counter from now number to return number of SIM cards also if you have situations where some of the micro services are sharing the same database but in a different schema don't


try to consolidate data on the database level database should be treated as private fields so they are owned by microcircuits and there is a layer of a business logic above this data where perhaps when you are querying Sunday you won't receive a correct response so if you need to aggregate something prepare in advance do it in advance and don't do it on the fly especially directly on the


database later it is okay as this is done by data where perhaps this is their job but I'm speaking about direct confirmation of data from digital channels from self-corrects also regarding the micro service approach and api's try to do some sort of management this really makes things easier so you can free API management tools you have a really expensive one so depending on


your budget try to fit something but it is really important that over your api's you know who is technical and business owner you have the governance you know when new version of API will be set up you know when old version will be retired you will know who are in some cases we needed to introduce throttling to find out who are our consumers because some people we didn't


even know we're consuming the PLC cool procedures started complaining about timeouts so API management where you know what is the current version of API where we know who is consuming it and who is the owner of it this is a way to go don't treat ideas only as one protocol API so this is what is the domain and layer separation the main separation is domain driven design separation and


layer separation is try to keep things controller service and repository to keep them out of each other way so every layer has its own boundary and the boundary shouldn't be crossed if you manage to do this then it's not a problem for you to have an API that has repository and service and then it has controllers towards rest towards GRP see towards the Kafka or other streaming


platforms so try to separate it both horizontally and vertically clean architecture programming the development practices so I try to split them up by organization level and T blow so in order to have a good development and good api's some rules in the organization needs to be set up it talking in small companies when you have a small team and startup you are


creating your own rules but on organization level you need to have support from operations department commits have support from DBA from system department so some rules needs to be set up what you don't want to do is to have multiple text acts try to find the text type that is okay for you and try to stick out with it you don't want to get yourself in a situation where some developer developed


micro services in I don't know Godwin ergo because it was really right technology for him at that time and that feel of the company cool govern disk so try to have a tech stack that is let's say a future proof and that you see it is really something used in beckons on beckons where let's say lucky here we are not as volatile eyes for example JavaScript frameworks became


Java before we have Java now just we have different flavors but this is it also try not to limit the tech stack in a way that I don't know if you need something where you see graph databases will be good don't be limited by ok do it in the positives or something like this don't do like I say tech development I mean this is no transformation you are trying to move


your team also from all these new technologies and you have a bunch of experts on all technology and their juniors in new technology and sometimes when you have deadlines the decision will be you we can do it in 30 minutes in all technology or in 3 hours in new technology invest in new first time it will be three hours next time it will be two and a half I mean no one no one no


one learns King in 30 minutes so you need experience you don't want to go back because then you achieve nothing don't skip continuous integration I know that for enterprises such as ours continuous delivery where you with your coat production is usually a no-go because we want to help human you need acceptance tests because we want to have deployments to production over several


systems that needs to be synchronized so it's ok to split CI and CB but don't skip CI so caliber books that has minimum CI minimum CI at least that is running automatically code review in unit tests and whatever tests you put in the code don't do a constant move forward so we also can experience where new user stories are just arriving arriving arriving and you didn't manage to have


time for optimization I don't mean just a small organization when you are solving some visible technical depth where you put something to commit to do and then you find some time in the next sprint to fix it I'm talking about getting the overall picture seen so as developer I learn everyday I find some blog I find some new technology so because of the move forward so six


months from now I will be smarter regarding some things that I am current and kind of writing some code so six months later perhaps I I need some Sprint's to sit down to the overall picture and to see okay what can be optimized what I learned in the last six months that can help me move further otherwise you will just have let's say cloak that all parts are working but


it's still showing the wrong time and try to cover clear member robz try to have a governance that is known when exactly something in is expected developers like to know when they have meetings with their product owners they want to know up until when the user story will be groomed and finalized but they can start development so scrum is a really good principle here because you


can set up the deadlines you can set up when it's expected what is expected and what amount of work needs to be done in the next five or ten days so on the organization level try to stick with these principles try to have this in a dedicated time slows so that developers can plan this is the greatest thing that can be done when you have the sprint and when you have the agile approach on the


team level you want to have guidelines especially when you're doing digital transformation for something new you need to create the guidelines you need to tell either to let's say new technology junior developers course and many are experts that you have that they which where they don't know the telcos tech you want to have for them the guidelines how things are built so for example we


have our horizontal split finger our own products where it is not what each product does and what kind of code should be in some kind of credit so this is a guideline that is really helpful to a team don't prioritize that line over tests this is easier said than done but what I would suggest is and never communicated to business how much time you need for writing only code when


you're writing a code without tests you don't write code you you write you're writing a wake-up call into a by the gracious theme that something is not working product so you are the ones that will be cold when something is not working not your stakeholder and in my experiences older you get you are much let's say much less open towards this kind of course try to do code reviews


and try to establish recording practices so this is basically the constant work so you need to on the team level to help retrospective to gather feedback from your team what was good what was not good this is the only way how team will work on and you need to also do a knowledge transfer so basically it's not just knowledge transfer to a new team members it's not just transfer when you


found something you race and blow we found something that can Ament assertions you will do search J or compass so basically when you find something that will speed up the team you you hear some R&D priming sprint because this is how you move forward of also regarding the library dependency management it is okay to make a test out but you will run into problems where you


have one library in Springwood - you have second in two lows one to live - so when they when you start connecting them together things will break out because there will be resistance is so to try to create a project that will have your Bill of Materials of dependencies and then try to agree okay let's use this for next portal and then after three months we will see what has been upgraded and then


move forward any pressure let's say a bit slower here because they are not always let's say on the latest on the edge technology but this can also be good because you can check you can leave others to solve the initial bugs that new version of technology growth so you can be much more let's say seven safe side here also what I wanted to want to show is basically do the unit tests they


are really helpful when you are moving forward and you are doing this dependency upgrade if you run your unit tests when jumping from java to java and everything us it will be sure that okay this can work so this is let's say a really important thing to do so this is it from from my side post we are now for any questions that you have see there is only one question regarding two videos okay and


so I'm back I'm back with you guys okay let me let me publish question number one will there will those videos be available afterwards yes they will if the question refers to rid of this session yes video will be available at the developers website and that bug website so it may be two days let's see another another question do you recommend using graph QL guys yeah


great I think I like it a lot but for front-end to me that beckoned forefront and better and then there is you should use graph QL and it really makes sense especially when it comes to performance but when it comes to you know internal our integration between various systems in the landscape there are some other protocols like GRDC or rest like revenues but for front back in the Disco


as close to the front as possible but when you are providing domain driven design especially when you are an engine present you need to have authorization concept and who can see what and in this case is for us rest or other let's say different communication or district GRP C or even driven are better choice because you have stabilized model and you know what to expect and what to


return and then over this you can easily provide authorization rules what needs to be removed or pre-checked and Jeff Kurr can be a part of BFF that can then query the main driven micro services yeah yeah I would say that graphic is definitely a future-proof fronting because you look at a lot of VI that expose the front and the mostly have too much data so they are big and clumsy and


have a great old formance or they don't have enough data so you have to carry several api's which is a even worse than you have a lot of network latency so yeah forefront indefinitely I think that is the future but we have another question regarding grant how do we handle graphically on with microservices know the kind of severe let's say focused on the banking services as we


are trying to provide clinical if you have spec sheet there I know that it's a moment of time I piloted I think it was a framework that had this kind of support on micro service though where it can consume a different micro services and then do the graph QL processing go read some of the caps you can check that framework to see if it works for you we are not using ok Mario is asking how


larger the teams and how do you break down big organizational goals to team product stories ok definitely actually the Arita entire company is now let's say in an age of transformation we went from a standard way of doing project which was basically waterfall you know you have marketing that thinks of an idea then do a specification it goes 2080 implements now a transferring to the


agile way of working where we have sort of a matrix we have agile tribes that are in charge of larger domain with the squats inside that they charge of smaller domains so that's what we're doing on the level of the entire organization and when we connect it to the architecture what we want to do is have one squad in charge of one micro service that's that's our


goal so the tribes handle the backlog when it comes to functionality capabilities that stock we want to do when it comes to develop development use force that are in charge of each squad instead of one micro service and that's how we want to achieve that but we are in the setup phase okay Marty McFly is asking can you share your software stack which databases are you using basically


I put stack on the one of the slides we are using for some cases yeah okay if you have a lot of Oracle databases in our legacy stack but for all new stuffs we are using all the center also databases okay what approach you use for performance and integration tests in micro services distributed architecture so we are relying on most here regarding the integration test so of course I


mentioned that we always have user acceptance testing that is done by testing team but when you are developing for us a great Mowgli's word test containers where you could mock a database and also a wire because most of our integrations are based on I just saw or PLC code but this cannot replace the real end-to-end testing but it can speed up development because you don't need to


be let's say you don't need to create test users fitting for some of the needs that you want to test you can just set up a test container with test database and then put some your own test data values or set up a variable that is returning what's officers should return okay so Mario is asking how do you do public API is in micro service environment does every team own their own public API or


is there some common part currently we don't work most of our API are punished either to our South Carroll occasions or to our business partners so this is something where we don't have much experience between Luca mentioned how we are owning the ice but they're usually consumed by our own applications okay so you said spraying boot-up doesn't equal micro service what technologies do you


suggest to use we are using Java spin boot actually it's not enough just to implement an application Java string boot to call the macro service to implement a micro service in Java spin would you need to have a Java string motive you need to have a database with data you have to expose API on that micro service and that micro service should encamp encapsulate one specific domain


that is connected to business domain that is automatic services so feel free to use Java spin booty reuse it also but it's just that a lot of times people build Java spin boot applications expose an API but they have no data the Java spring boot application and there is a lot of different systems for data and this is not a market service this is a proxy you can you can


implement it whatever technology but micro service should know on its own date that's what disk I mean we also have the pattern that is not gone into data because as I mentioned we have the technologies or systems that are purchased the billing system mediation system so you don't want to say now ok let's draw billing out of the portfolio and do our own billing you don't do that


but if you are consuming data from be linked and you want to create micro service that is not real micro service bye-bye we can officially path you want to go as closest to the data as possible and then provide your own business rules again business rules exposed to our standard business rule solution and then expose this to the outer layer but if you just create a spring boot that that


is consuming some legacy API that is going God knows where then you have that multi layer flow that you really want to avoid yeah and you are not scalable it doesn't matter how many micro services you deploy because it still where is the one single database for example billing system for data so that should get your bottleneck and single point of failure if that goes down all of the micro


services doesn't matter if you have one more connect so in order to build really scalable like service has to have its own date but as even says if you clearly can't do that every time so the those patterns were you connect to legacy systems but connect as little layers as possible ok so we have our last question coming from Portugal hello from Portugal great talk how do you deal with


scalability of software from vendors or do you avoid using software that are behind licensing okay he was vendor software definitely and we use some license after all so you know Intel code there is really a lot of domains and for some you have a excellent excellent out-of-the-box vendor software that you can use and it really doesn't make sense to you know invent the wheel and implement their own


billing yeah yeah you know implement 20 micro services that does not tell Kabila for example then you should use you use a vendor solution you paid the license and when it comes to scalability those softer scalable you know you can create a cluster deploy so several instances and that's let's say well no one approach how you can make monolith soft who is consuming and how much today so


for example users consumption API that I mention it is connected to a billing system that this purchase con solution so if you can query data from billing then put in cash or even a long term cash because you see that this data won't be changed regularly for example we have a say is containing god bills to baby so if you once query the pay bill you know the amount you know when it was


paid you can put it in cash if user comes inquiries he must to see his last 12 bills or some aggregations I don't know average bill amount buried for last 12 months you don't need to query yes it be you can have it in your cash and query the cash or in memory store in this case cash is more like a memory storage and so it's dependent scenarios you try to find how data is