Hacker Newsnew | past | comments | ask | show | jobs | submit | bloomthrowaway's commentslogin

Just throwing this out there. I've had hundreds of lucid dreams and it's the most amazing experiences I've have in my life. It takes practice to 1) figure out you're dreaming with some level of reliability 2) learn to take control 3) train yourself not to get too excited so you don't wake yourself almost immediately.

I believe the first step is to train yourself to recognize a dream. It becomes easier once you've done it, so I assume a few lucid dreams can lead to many more. There are devices that supposedly trigger lucid dreams in many that have never had one, I highly recommend trying it. Example of one of these products: http://sleepwithremee.com/ . They detect REM cycles and signal you in-dream with light through your closed eyelids, since vision isn't actually suppressed during REM.

I've hit the point where I've had lucid dreams the seem to last over an hour. Its insane, not even something I can describe to someone that hasn't lived it. Like closing your eyes and thinking about flying, but with the same level of detail as the real world. The sound, sights, feeling of the sun and wind, even pain. To be a little inappropriate, sexual experiences also feel just the same as the real version. I've had hyper real dreams too, especially with vision. Colors that are impossibly bright and saturated, or impossible acuity.


I used to lucid dream pretty naturally, then stopped because I started getting very regular sleep paralysis.

Nowadays when I do end up lucid dreaming (most often by accident) I notice a fairly significant drop in sleep quality.

Even worse, I sometimes lucid dream, then "awaken" into another dream where I'm not lucid and those experiences really fuck with me.

On a different note I'd love to get a high quality sleep-tracking night mask. Most of the "smart" ones I know of have awful battery life. I don't want another device to charge every few days.


Learning to lucid dream is basically giving yourself a sleep disorder on purpose. Having done this deliberately in the past and had some fairly wacky side-effects, I think it's worth people considering the negatives if they style trying to induce lucidity.


I could believe it ruins sleep quality definitely. Even with experience it's hard to keep your mind from fully waking during periods of lucidity. I've managed to go an hour or two many times but it invariably ends with me waking at a random time in the middle of the night


Anecdotally I tried for a few weeks to lucid dream and had success a few times, but both mornings after the lucid dreams I felt absolutely exhausted.


What side-effects did you experience?


Having done this deliberately in the past and had some fairly wacky side-effects

Such as?


False memories are one which many have experienced, as well as mentioned above, increased chance of sleep paralysis. Increased SP doesn't seem so bad, just maybe inconvenient. Building up more and more false memories doesn't seem like a great idea.


Thanks for sharing your experience. Can I ask how you found your sleep paralysis encounters? (for want of a better word).

Personally I've found them deeply disturbing. Throughout my life I have experienced moments of sleep paralysis at most on 10 occasions. They've left a big impact though, and I sympathize with anyone who has the misfortune of feeling as though you are trapped and unable to move.

After watching the film "Waking life" I spent a long time thinking about lucid dreaming and perhaps maybe had 1 or 2 myself. I had never connected the two however, definitely food for thought.


I used to get sleep paralysis a lot when I was younger. It could be fairly terrifying sometimes. I remember the scariest i was probably as a teenager lying on my stomach while it felt like someone eas holding me down with the blankets. The first one i remember i was pretty young. My brother and me still shared a room and had bunk beds. I remember waking up one morning and watched a giant spider crossing the ladder towards my face and freaking out but not being able to move or yell or anything. Then suddenly I could and the spider was gone.

When I actually learned what it was I tried lucid dreaming and stuff with it. But, I always find the feeling uncomfortable. I don't like not being able to move or do anything while your dreams mix with your bedroom.

It doesn't happen so much now. Every once in a while if I wake up in the morning and go back to sleep, the second time I wake up it'll happen. I don't tend to sleep in any more and once i'm awake I get up.

I don't know if it's related but i've always had problems sleeping. When I was young I was scared to sleep, even as a baby i didn't sleep well. I can usually fall asleep alright now but the slightest noise in the night wakes me up and I still feel wary about losing conciousness.


I'm not the parent but I experience sleep paralysis fairly regularly - maybe once or twice a month. It's happened enough times that I can usually recognise it and can either try to wake myself up or wait until I go back to sleep, so it's not particularly scary. It depends though - if I get sleep paralysis coming out of a nightmare it can be fairly uncomfortable, but not much more than if I were to have just the nightmare on its own. Probably the worst part is the embarrassment of someone witnessing me thrashing around trying to wake up or hearing me moan in my sleep.


Have you ever been checked for sleep apnea? Sleep paralysis is a common symptom.


I haven't actually. I feel like my previous girlfriend told me I was an extremely quiet sleeper so I don't think I have problems breathing when I'm asleep.


I've always had trouble with false memories. Not of anything important, but I sometimes dream of very mundane things, like moving my wallet or keys. Or telling someone something.

Makes it very difficult to keep track of things.


I used to have regular hypnogogia, and I often imagined that monsters were coming to steal my wallet and keys from my bedside. Those items started "moving" during the night, to under the mattress, or into blankets in the closet, so "they" wouldn't find them. It is genetic for me, as my mother had some similar experiences. I only happened to learn it was a "thing with a name" because I was dancing Argentine tango with a postdoc sleep researcher, and we got to talking. Oddly enough, her suggested solution worked perfectly - a night light. It is a very long story.


Would love to hear this very long story!


That is why you keep a dream journal. To understand what is real and what is not in the long run.


I used to read lucid dreaming forums. A lot of people complain that their sleep becomes less restful, the more they lucid dream. Also that it becomes impossible to have a night without lucid dreams once you get enough experience, so you can't catch a break.


I experienced this for years, but it never seemed to actually affect "rest". I'd have multiple intense dreams per night, waking up often between them. But not feeling sleep deprived at all, if anything the opposite. However i was also in my early 20s so maybe it would be harder now.


I used to lucid dream all the time as a kid, it just happened naturally, and never left me tired. It mostly stopped and in my 20s I tried some exercises to induce lucid dreams. My experience was like a restless night of sleep after studying late for a big test the next morning. Because, there was something I was supposed to be remembering, instead of just sleeping soundly.

So I think lucid dreaming is not necessarily a problem in itself but forcefully training yourself to do it can be rough going.


> I started getting very regular sleep paralysis.

I do not blame you. I've experienced sleep paralysis more than once, and it is not pleasant at all. I remember trying to scream at the top of my lungs in my head for... I don't know how long but my perception of it was that it was for hours on end. Then all of a sudden something broke through, and I woke my wife up with the loudest scream she's ever heard out of anyone.

Took a while for me to sleep again after that.


Coming from a religious background, I believed that I was being possessed to explain the lack of control over my body. I even hallucinated an "evil" "form" coming towards me before my body locked up and I felt tingles. So ~weird~ terrifying being able to scream without your body doing anything.


Sleep paralysis is mortifying if you don't know what you're dealing with. I can completely understand how that's been the source of many people believing in possessions over the centuries.

Most of my paralysis episodes didn't involve the "evil presence" people often talk about. That is, until a recent one less than a year ago, where I woke up with a giant "invisible" spider on my chest

It's terrifying to be in this state of mind where you know what's happening, but you also really, really feel that presence. I wonder if this is similar to what schizophrenic patients feel.


Yeah I just had one of these a couple of weeks ago. Lying on my side and could feel an evil presence behind me, but couldn't move my body at all, even though I was (or at least believed I was) fully awake. Not fun.


When I had massive dental problems a few years ago I was taking codeine 60mg and an over the counter sleep aid (which it turns out is a potentiator for codeine).

I had the worst sleep paralysis I've ever had, I was laid facing the wall with the light and I would have sworn there was absolute evil behind me, it was frankly terrifying.

It broke suddenly and I kept out of bed and shot out the room, took me about 15 minutes for heart rate to come down.

I don't scare easily and I'm a life long atheist but I can see how if you where raised religious you'd assume it was whatever evil presence your religion has.


Seeing figures and humanoid shapes when experiencing sleep paralysis isn't uncommon. I've never seen them myself, I just get a progressively louder ringing noise in my head until it feels like my head is going to blow up. I was always able to break out eventually, but it's terrifying. You can't move and are in pain. The only way I could get out was to find one finger or toe I could wiggle a tiny bit, then keep doing that until my body started to slowly come back to life. It takes some time but eventually you hit a threshold and you come back online pretty fast. It doesn't happen often, but when it does it takes me 2-3 tried to fall alseep as it happens consecutively.


" find one finger or toe I could wiggle a tiny bit"

Do you know for sure that it actually wiggles? Because that's what I tried doing once, and my wife told me that my entire body was still and I just woke up all of a sudden.


I've had sleep paralysis but never had the feeling of the presence. I just know I'm stuck. As if some kind of force has frozen my whole body. The first few occasions it is extremely scary, I think after that you know what is happening but it is still very disconcerting.


It's not a fun experience.

A year or so ago, I woke up during the night and felt tingling in my feet. The tingling kept increasing in intensity and seemed to slowly rise along my limbs. A few seconds later, I suddenly heard someone shout with an aggressive but soft voice next to my ear, and felt eerily realistic hands grab my arms and vigorously scratch my right palm. In absolute terror, I remember trying to scream and shake it off, but I couldn't move. And it felt so real. A few seconds later I managed to snap off the paralysis, and rocketed out of my bed. I didn't sleep that night.


I've woken up others the same way. At some point I learned to recognize sleep paralysis and just wait it out. It's still unpleasant though, I get sensations like needles pricking my skin all over.


This happens to me every so often. The worst is the feeling of not being able to breathe, but it's happened to me enough that I figure my body will take care of oxygenating itself if necessary.

Once you come to terms with the fact that sleep paralysis is a thing, I think it's just another interesting mental experience. The lack of control is also kind of fun. Who knows what's going to happen next? But you probably won't die. Not the worst thing in the world.


> even pain

Lucid or not, I realized a while ago that I don't experience physical pain in my dreams. I have started to wonder if this was a general experience. Experiences I'd expect to be painful (like getting shot or carried away by a wall of fire) simply startle me awake.

It's interesting to hear you do feel that. I've experienced all kinds of things emotionally - embarrassment, fear, anxiety. But never physical pain.


It's not pleasant. Sometimes intense enough that I'm in a state of shock through much of the next day. Most of the pain I remember has been in the form of lucid nightmares. Usually snake bites, gun shots, knives, etc. Almost never from environmental realities like hot surfaces, crashes, or falls.

Self-aware nightmares are way more terrifying than the regular variety, a lucid dream where I sometimes can't take control. I usually try to wake myself immediately, but sometimes this leads to repeated false awakenings. The worst I remember is 5 false awakenings before waking up for real.


I can't agree with you enough in everything you've said. I taught myself how to lucid dream in 2011. I used a technique where I made a habit of checking reality through the day every day. Eventually the habit became ingrained enough that I started remembering to check even during dreams, triggering a realization that I was actually dreaming and initiating a lucid dream.

It is exactly as you described. Nobody can ever understand it until they experience it. Comparing it to the matrix might do it a little justice. But there are limitations -- waking up, falling back into non-lucidity, false awakenings and so on.

The first lucid dream I had was glorious. I was dreaming about being on a very tall grey building with overcast skies, on a wooden deck protruding from the side of the building. I became lucid and commanded the sky to crack with lightning and it did. I flew upward and created a swirl of clouds and was generally having an amazing time. This all was as if it were completely real. Then, too excited, I woke up. But it was a terrifying false awakening where a black figure sprinted toward me and attacked me. Then I woke up for real, absolutely terrified. It was so scary that I decided not to lucid dream anymore. But with recounting all of this, and thinking about it for the first time again, I think I might start doing it again.


Its a LOT like the matrix. Perception of your ability to alter reality makes reality altering possible, with the only limitation being your own faith in the extent reality can be altered. Very meta.

I never consciously do reality checks, but I'm a very inquisitive and skeptical person. Easily distracted by cracks in the wall type.

I wouldn't let one bad experience stop you from lucid dreaming :( . I might be an outlier, but my experiences have been overwhelmingly amazing. Yes, I still have nightmares are the lucid ones are waaayyy worse. But lucid dreaming is such a great experience I would never wish it away


The faith part is hard. When I've managed to be lucid flying is a skill that is hard to master. I get a lot of big hops but can't seem to actually fly.


Yeesh, yeah, now you mention it I've had those exact same symptoms when trying to awaken from a negative lucid dream: A bunch of false awakenings in a row. I wonder how linked those things are... I rarely have false awakenings without having been lucid before.


same, I can't think of a single false awakening outside of trying to end a lucid nightmare. Maybe the same "your wish is my command" type control you get over reality perception is a double edge sword. You want to be awake so you "wake up" into a fresh dream world, because your mind has no way to take you to reality. Kinda terrifying.


I’ve had the false awakenings bit - that realization in dream can be frightening, mostly because it makes me panic that I’m dying - when I can’t seem to shake myself out of it.


I've only experienced false awakenings a few times, but I like them. I do a reality check every time I wake up (made it a habit) so it's a free lucid dream.


>I've experienced all kinds of things emotionally - embarrassment, fear, anxiety. But never physical pain

I am the same, I've never felt any pain in a dream, extreme fear is the strongest negative emotion or feeling I've ever experienced, but that usually wakes me up and ends the dream.


I am jealous! Pretty much any time I experience a nightmare, it's a dog biting me, or I'm being stabbed, or some wild animals are attacking me, and there's almost always vivid and terrible pain. It goes away the moment I wake up, but I cannot for the life of me control it in my dreams, regardless of if I'm lucid or not.

Interesting how we're all wired differently!


It's one of those weird personal secrets, things that never come up. I realized years ago that lucid dreamers are fairly rare, and most of those that have had lucid dreams don't have many.

It makes for a really awkward discussion most of the time. And it's impossible to explain well to somebody that hasn't experienced it.

Might be generics or wiring, or just figuring out how to recognize dreams, who knows. Its real weird that some people can have this otherworldly incredible experience with no drugs, and yet most of the population never experiences it. I'm lucky I guess, but to me its normal


I guess the experience is agreeable to you? I have lucid dreams sometimes, and something about it is very unsettling to me. I sometimes have non-lucid nightmares where I can feel myself losing my mind, with uncontrollable visual hallucinations and a sense of falling apart mentally. I also have nightmares where I wake up from a dream, only to realize I'm still dreaming, over and over again. Somehow the lucid dreams I have feel similar to this, there's a strong sense of being at risk of going mad. Maybe it's that I haven't trained for it, but I don't particularly feel like I want to learn to have more of those.


Almost always exceedingly wonderful, better than anything 'IRL'. Except for lucid nightmares which seem to start out as regular nightmares anyways. Sometimes I'm able to overpower the nightmare and go fully lucid, other times I can't and its horrible. Way worse than a regular nightmare because I'm fully aware of whats happening.

Its definitely unsettling at first. I started lucid dreaming by chance at ~11 so I guess I'm used to it. I don't think much of it when I look away from the window and it turns into a flock of birds, just roll with it ya know :)

I think the false awakenings are part of lucid dreaming. The awareness that you're not actually awake yet is a small step from control of your dreams.


You forgot the most important step: keep a dream log so you actually start to remember your dreams! Otherwise you might have a lucid one but either forget it during the remainder of your sleep, or forget it within a few minutes of waking up.


yes, or get in the habit of ruminating on the dream for a while still in bed. Whenever I have a nice lucid dream I lay in bed and run it through my memory over and over for a couple minutes. Otherwise some mysterious process will clear any figment of the dream from your memory within an hour or so


This sounds wonderful. I've only had a couple of lucid dreams and am currently trying again to be able to invoke them. I am starting by keeping a dream journal again, which I did consistently during the time I had my few lucid dream experiences. At the same time I have to fight the urge to record every single dream throughout the night because I don't want to break up my sleep. I only record what I remember upon wakeup time in the morning, which is often just a fraction of the night's dreams.

How did you train yourself to recognise a dream; was it a particular kind of reality check? Do you find you also have great dream recall in general?


If I think about the dream right after waking up I can generally recall most of it. Working 9-5 these days I sometimes just don't have time to make sure I commit it to memory though :( .

I don't do a certain reality check, but I've been lucid dreaming on and off since early teens so I just notice sometimes. Most often when I remember noticing its because I look away and things are different when I look back


you should read hackernews during your next lucid dream and bring us back some of the topics


Reading is weird during dreams, lucid or otherwise. I recently had a very odd dream in which I thought I was awake, but lying in bed with my eyes closed. I was amazed that I could still see! I picked up a piece of clear plastic package and opened my eyes, and it was totally blank. Then, I closed my eyes, still able to see, and suddenly the packaging was covered with writing in all kinds of fonts, points, and colors. Total... gibberish. I thought some of it was sort of funny, so I reached out for my dictaphone (nowhere close in reality, but right there in a dream) and was going to record some of these whacky lines. The problem was that I could hear my radio, and I knew I’d be recording that too, so I reached out to turn it off. Nothing, still on. I kept doing that until I woke up, realized my radio was on as an alarm, there was no dictaphone, no plastic, nothing.

Very odd experience, but it fits with my memories of trying to read in dreams. The words are either nonsense, mad-libs, or they make sense, but change the moment your attention shifts.


I've had the experience of dreaming of a book or even a movie that I'd seemingly created, with an agonizing desire to somehow copy it to retain it before I wake up.

Such things made me think about the difference between actually reading or watching something in a dream, and merely having the feeling that I did. Did the writing I thought I read/wrote really exist in my mind such that I lost something on waking up?


Have you ever done psychedelics? If so, how does it compare?


No, mental illness runs in my family so I consider it too risky. But I've been told by a friend that lucid dreams occasionally, that lucid dreams are different from LSD/mushrooms in that you have much more control over the experience and it seems more real.

There's definitely other psychedelics that produce "real" seeming illusions but I'm not aware of any that give you direct control over them like lucid dreaming can.


Simple. They don't. My stream of thought during a lucid dream isn't much different from my stream of thought during normal, sober waking hours - it is just the stuff going on around me is weird and I have different constraints on what is possible.

On psychedelics, I view the world and myself differently. I know I'm on drugs. My stream of thought is different I'm obviously still in my house, for example, and I know I can't fly or make things appear out of thin air. By the time any hallucinations would be dream-like (strong and heavy), I freaking know I'm hallucinating. Even with lighter things (much more common), I know it is a hallucination. I know that my painting doesn't really move like that, for example.


They're completely different. Psychedelics change your perception and thought processes in a way that's completely different than a lucid dream.


Ive noticed that my lucid dreams correlate very heavily with sleep paralysis and while lucid dreaming is fun the risk of sleep paralysis, which is like my worst nightmare is almost too great. I have a technique for getting out of sleep paralysis where I kind of metnally think of jiggling my head on my neck very rapidly but sometimes i keep falling back into paralysis so the whole experience is really uncomfortable. As a result I think when i lucid dream i get kind of amped up and wake myself up or ill remain in the dream but the quality is really low, eventually I realize im just laying awake with my eyes closed for many hours and get horrible sleep. Any tips on not waking yourself up specifically? Am i lucid dreaming in the wrong stage of sleep or something?


I think staying asleep is just experience. I remember my lucid dreams when I was really young were rarely longer than a few minutes. Sometimes seconds. Its really all about staying calm from what I've learned. And trying not to focus too much. If you put too much effort into control it seems to increase awareness to a point where you wake.

All conjecture of course because we know startling little about how dreams work :)


I had only a few lucid dreams. In that moment I was pretty sure to be lucid, but after waking up, it felt like a dream in which I just thought I was lucid.

How do you differentiate between the two? Is it even possible?


I tend to have my waking stream of thought during a lucid dream. It isn't really different from waking stream of thought. I can control my own actions, but my dreams are usually fun and I get curious to see where the current story is going.

I don't know if that helps or not, but that's what it does with me.


Its pretty clear to me at least. I can sometimes remember the moment I figured out I was dreaming. With some great ones being jumping through a closed window and off a skyscraper.


That seems terrifying. How do you separate that experience from the real world if you're say standing on the edge of a roof or bridge? How do you know _for sure_ you're dreaming and it's ok to jump?


I’ve had a few lucid dreams. The first couple of times were after making a habit of counting my fingers. In real life you always have the correct number. When dreaming it might be an incorrect or seemingly indeterminate amount of fingers.

So at that moment I would realize I was dreaming. But I don’t see why you’d just jump off of a bridge neither in a dream nor IRL. Personally what I chose to do was to attempt to fly by imagining jet motors on my legs. And it worked! And then I got excited and woke up :P

Anyway, when you become lucid it is because of things that are not like reality, so it will be obvious that it really is a dream. I see your concern but I could never imagine anyone thinking they were dreaming when they were not.

Another couple of times I’ve realized I was dreaming because the text in books or in papers were a jumbled floating mess rather than the static arrangement of letters that one would expect, and no information was conveyed as opposed to real life where most books and magazines are written to present some form of information in writing.

And one time I had a nightmare where my fingers and hands got holes in them and something was coming for me and I said “this is not possible”, and I realized then that I was dreaming and I took control and turned the nightmare into a pleasant dream by projecting the disease over on my assailant and escaping from it :)


Not the parent, but I have had similar experiences. What I do is check my wristwatch twice in a row. If the readings are radically different, or other weird stuff happens (no hands, more hands than usual, hands moving really fast, etc.) then I'm pretty sure it's a dream. And viceversa (apparently, my mind is not capable of generating a coherent watch in a dream, so if the watch behaves normally I know it's real life).

I'm also not able to generate a complex text in a dream, so trying to read a book can also work, and I suppose there are many similar possible tests based on the limitations of your dreaming mind. But the advantage of the wristwatch is that I always wear it in real life, so I know I will also be wearing it in dreams, so I can always do that test, while a book may not be available in a dream.

If you want to kill me, give me a wristwatch that does weird stuff and I might jump from a skyscraper trying to fly in real life at some point :)


My go-to reality check is to hold my nose and see if I can breathe through my fingers or not. If I'm lucid, then I feel the air going past them. I guess my subconscious doesn't bother trying to make everything completely realistic.


Hahaha you can't be 100% sure :) .


Ever do one of the tests to see if you are in a dream and find out that you are awake?

I've always been a little scared that I would be awake, think I'm in a dream, and then do something stupid, like try to fly.


When I've flown in my dreams, it always begins by zooming up from solid ground, not by leaping off a roof or out a window.

So, no harm in accidentally trying to fly in reality. Except looking weird.


My parents took me to a dream/meditation therapist when I was 8 or so for nightmares. He taught me to lucid dream and it has been a benefit ever since. Except, I just haven't been able to fly like I used to in my teens & twenties. In my forties now, I am lucky if I can get some gliding lift from running on a slope anymore.I used to rise from earth all the way past LEO. Sigh.

What has helped me stimulate higher consciousness is drinking a half cup of coffee right as I go to bed. Caffeine does not amp me out like most, but it does make the dreams more vivid & memorable.


This is entirely hearsay but I've also heard that eating a banana before sleep can stimulate more vivid dreams. I'm going to do some reading tomorrow to see what exactly this is meant to be based on.


Quick search results are lots of claims of eating foods high in tryptophan to raise serotonin with little research results included.

However, the NIH research suggests(which I am more inclined to trust over commercial sites): Sunlight, happiness, exercise and diet. Fatigue even reduces amino acids that may inhibit absorption of serotonin. As for the diet part:

"Although purified tryptophan increases brain serotonin, foods containing tryptophan do not."

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2077351/


For me, flying begins with high jumping while controlling my movement in air. I start by jumping 6 feet, then again and achieving 15-20 feet, then eventually over a house. After jumping over the house is when I start to change my lateral velocity while in air, and begin to control my speed of descent as well. Eventually, I jump about 100 feet in the air, start moving sideways at the peak of my jump, and slow down my descent as I get close to the ground, the point where I'm flying directly over the ground at a decent speed.

Once I get there, I have complete control and can fly however I want as fast as I want. I've never been able to hold on for more than a minute or so though before I wake up.


Hahaha, most of my flying is leaping off/out of whatever I'm standing on/in. Usually immediately after I become lucid. Could get interesting if I did psychedelics lol


The only times I've had trouble telling the difference is immediately after waking up. Especially after the false awakening lucid nightmares mentioned below. Turning the lights on and walking around for a minute is enough to dispel any doubt. Dreams are a different reality, and being so familiar with this one its easy to figure out when you're "home"


in one of my first lucid dreams i started reading a book and then thought to myself, "hang on, no way this is a dream if i can read a book!", and then fell back into regular dream state haha


Could you explain further? Are there phases of dream where one can or cannot read?

I heard an old tale (pre-internet days) where dreaming happens in a different part of the brain than reading, so supposedly it isnt possible to read in a dream and thus being able to read is a litmus test of whether you're dreaming or not....but i often read during dreams so I couldnt figure it out.

Searching the internet (present day) reveals a spectrum of opinions on whether one can or cannot read during dreams (and thus whether it can be used as a litmus test for reality.) Do you know if there is a definitive opinion on this?

I suppose I can always use a totem.


IME, often the text is gibberish, or at least nonsense semantically, and/or changes as you move your eyes, especially if you look away for a moment. The same applies to eg. clocks. Details never seem to be very stable in the dream world.


i've found that to be the case for anything (not just text) in normal dreams; but one of the most surprising characteristics of lucid dreaming ive experienced is the stability -- for example in one dream i looked at a persian rug up close and could see the different colored fibres of the fabric. that said, things can certainly change dramatically and rapidly (...and now im flying!)


If you close your eyes and visualize reading a random magazine, what is in it? What do the words say? What is in the article? Can you actually read it? Is it different if it is a magazine you wouldn't usually read, like you might in a doctor's office waiting room? How about a new book?

Yes, this seems a difficult exercise, but it is exactly what your mind is against in a dream. And while a few people can read things in dreams, many cannot. Some folks can read simple signs. For me, most times, letters move around - if they are even latin letters at all. That said, sometimes I know what they say regardless. I get the illusion of reading, but not the actual experience.

Reading is sometimes a trigger for lucid dreams for me. It was unsettling at first :)


i'll also add that just "attempting" a litmus test can be a sufficient trigger for a lucid state. i'd heard about "flipping the light switch" from the film waking life. i tried it in a dream and the switch worked fine, but it was the fact that i was questioning whether i was in a dream in the first place that lead me to realize i was dreaming nevertheless (i think thats what the top comment is getting at -- strengthening these habits so that you do things like check light switches not because if they fail you know you're in a dream, but to put your mind into a state where you're always questioning whether you are awake. then you can spot the clues


I usually realize I'm dreaming when I can 'breathe underwater'


yes i'd heard the same thing -- that's actually what went through my head (in my lucid state) and convinced my dreaming brain that i was not dreaming (even though i was)! its interesting, the experience itself seemed utterly normal and convincing.


I also had a time with lots of lucid dreams and becoming conscious during sleep paralysis.

For me those things were very new and out of curiosity I often tried to verify if dream reality is some kind of "real" reality or connected to it. Among my curious quest, I also tried to read newspapers in my dreams and was also able to read pars of it, e.g headline/date. I even wrote the information down afterwards at that time (dream journal). The headline was not interesting btw and the date was in the future.

Had some dreams which I think were really interesting, maybe they are also interesting to read for you:

* becoming lucid in dream, all dark, a noise, flying towards me like a fly, emitting a sound which terrifies me to the bones. The entity comes from far distance, swiftly flying closer and closer whirling like mad around me. Had this dream multiple times - till I decided in real life that I should stop being afraid of imaginary noises in dreams. Next time the dream came up I remembered my decision and I tried to not panic with all my courage and it worked. First few times this dreams occurred, when the noise approached, I woke/sprung up from sleep which so much sheer panic, I did not believe I was able to feel so much fear/panic (sweaty + heart beats like crazy). * flying through a purple tunnel (like near death experience), while flying through (I could influence speed), my body was shaking as if in roller-coaster (but not my real body was shaking, since I was aware of it), it felt like something within my body was shaking, which was not muscles/bones, also feeling like my body was charging up with some kind of electricity. I could control the speed, finally reached end of tunnel, saw sky, mountains, nice landscape: since I was lucid, I thought: "Wait, am I going to die now?" -> I then hesitated to go further, the tunnel dissolved in a million threads and I woke up. * becoming lucid in a dream, with a new kind of peaceful mind-state, I felt like void, but was still aware of existing/being (everything was dark, I did not identify as something, but still was aware). A desire to "wish" something came up and with it my nice mind-state was broken and the wished scenery appeared. At the same time I felt, that my control/awareness of the dream diminished, till it was completely gone. In hindsight, I came up with the theory, that a dreaming-mind without desire (Scale: longing <---> fearing) is complete and aware (but nothing is there, no self, but still awareness). It splits up as desire arises and creates two halves: the desired (observed) scenery and the observer. I wonder if spiritual/religions people learned their theories from lucid dreams: at least for me this would make sense to me. * lucid dreams where I felt my body in bed and small orbs flying through my body, as the flew through, voices appeared in my head and some of the orbs tried to take my body resp. pushed me awareness out. I resisted and woke up. (After this dreams I thought I might have some schizophrenic disorder) * same dream as above, this time a wasp tried to enter my head, as it was trying to enter my head, I heard millions of voices talking at the same time. (Waking up -> schizophrenic disorder barometer rises) * waking up and for about 5 sec. had no memory of who I am, where I am, what this is all about what I am seeing. Very strange experience, like being completely out of this world. Had this 2 times (After each time, slight concerns that something might not be ok with my brain/circulation). * Impressing art dream: looking at ancient stone bridge, which was made of thousands of horses emerging out of each other like a wave (sculptured horses), similar to the painting from "The Great Wave" from Kanagawa. The bridge was broken in the middle. * Many dreams with fake awakening, also some with >5 times in a row and aware in paralysis. It often happened to me that I fell back to sleep with increased body awareness. Most of the time I then dreams to rob through a desert with numb limbs trying to move on and fighting to open my heavy eyelids. In such meta-state, heavy eyelids resp. problems opening my eyes seeing something was dominant. Often I could really see, what was around me, but my eyes were not focused and I misinterpreted the image I was perceiving. * Some dreams where I saw things from the future, e.g. I once dreamed about a scenery where I saw people with some kin of liquid space suite. They turned it on and I was impressed to see such superb sci-fi suits with such cool effects when activating them. Turns out, weeks later, I went to the cinema and saw the scenery in some superman movie. Critic: does brain gave me false memories about it? Did I unconsciously see some trailer and then had a dream about it?

Things I assume could have triggered my lucid dreams: * bad nutrition (fast food, almost just microwave food) * noisy room (under my room was a street) - it was like a bridge, below street, low traffic * snoring / maybe apnea in sleep? * very dark room (closed roller blinds) * to much sleeping * to less outdoor action/interaction * meditation (focusing on a point e.g corner of wall, not letting it go, not allowing yourself to blink or to look shortly away (surely its not good for your eyes!) - after a short period of time, if you keep your eyes on a point, vision blanks out and you become blind)


More of a pre-lucid dream question... can you dictate the content/topic of your dreams? That would be some powerful stuff - virtual reality of another kind.


I've had quasi-lucid dreams. I have free will in them (and certain "learned processes" such as flying), but I am not aware that it is a dream until I wake up. So far as those go, I can "physically" escape settings that I don't like but I can't decide what settings I end up in. I'm generally stuck with the people the dream starts with and they always have their own free will.


Yes. Once you're fully lucid you can do anything. I've flown across the US, into space, banged movie stars in the white house, drove Ferraris off cliffs, etc... Since your thought process is a bit disorganized the hardest part is deciding what to do on the spot, knowing you've only got a few minutes to an or so hour max


I don't have that much power. For example, I can indeed fly, or jump as high as I want, but I have problems creating objects or people out of thin air. It seems easier for me to imagine that the object is behind me, and then turning around, then it mostly works (not always). And people in my lucid dreams sometimes have their own will, so I can try to bang anywhere (knowing that I won't hurt real people and there will be no police) but I get rejected sometimes :)

I suppose it's all a matter of practice or of becoming more lucid, though.


Sometimes things don't end up like I wanted either, but I've gotten pretty good at "ejecting" those situations rapidly, a few seconds, in favor of what I'm looking for. Not absolute God Mode, more like browsing an unlimited movie collection for what you want


> That would be some powerful stuff - virtual reality of another kind.

Yes, like a holodeck :)


Are you still getting all the benefits of REM sleep if you are kick-starting some other parts of the brain to become conscious?

Have they done any fMRI studies on this phenomena?


Many REM sleep studies are done on lucid dreamers because they can signal the researchers by moving their eyes during sleep. Most muscles are paralyzed, but its been found that eye movements match the dreamscape. They've used this to determine that "dream time" matches real time for instance, by having lucid dreamers count with their eyes.

Two way communication is theoretically possible by measuring eye movements and signaling back with light flashes, but not sure its been done.

And yeah I have a feeling it affects sleep in some way, especially because being lucid for long periods of time tends to wake you up randomly at night


That sounds awesome! Thank you for sharing the experience, I really want to try that myself. Asking because it's related to my field of interest--do you mind sharing your IPIP-NEO result? http://www.personal.psu.edu/~j5j/IPIP/ipipneo120.htm


sure why not https://postimg.cc/gallery/1r7sd2iwo/

hit zoom button to undo the horrible default zoom


Thanks! I like to ask people with those kind of Adventurous and Immoderate results--did you ever try Ayahuasca? Other psychonaut-type experiments? Forms of yoga? What seems interesting next?


No psychedelics, too much family history of mental illness. I've always been a YOLO type person in and outside of work.

Risks are often greatly overestimated, and appealing to the corporate mindset disgusts me. I'm the type that loves risk and doesn't hesitate to call bullshit as long as it wont get me canned. Figuring out if you're in a dream is superficially similar to realizing someone is screwing with you lol.

Could be related to lucid dreaming but who knows.


I've heard that in recent years there's an increasing understanding that while achieving lucid dreams is very doable, full dream control is rare even with years of practice. (I'm pretty sure there's at least one journal article on this, but I can't find it now.)

Do you find that you have pretty much full control, or are you just along for the ride a lot of the time?


To contrast with the parent poster,I've had lucid dreaming before and it was a quite boring actually. Everything was muddled and blurry, nothing comparable with the real world. It felt like I was telling myself a story and my unconscious mind would go along with it and the dream would follow it.


At 65 USD I thought it was interesting, checked it, but... the Remee does not actually detect REM cycles.

It flashes the lights at a predetermined time.

There are devices which detect REM, then flash, but the Remee is not one of them.

Do you use some device yourself? Which one do you recommend?


Ive read that Remee doesnt detect REM phase, just acts as a glorified alarmed clock. Is it actually useful? Sometimes it takes me a long time to fall asleep.


Are you sure it's really the same level of detail, or do you just think it's the same level of detail?


how could one tell?


Probably just focused self-reflection


what really helped me was reading about how airplanes work. The technology was fascinating to me anyway, but once I found out how crazy redundant all the systems were I feel much safer than in a car. A car has redundant brake systems, but that's usually about it. Big commercial planes have 3-4 of nearly everything


if you like Spring Boot try DropWizard. Similar support for REST interfaces but none of the stuff you don't need


> Recycling cannot replenish supplies. Lithium-ion batteries last for 15–20 years, 3 times longer than the 5–7 years for lead-acid batteries

Over 90% of car batteries are already recycled. Assuming this stays constant when batteries get bigger(why wouldn't it), we'll hit steady-state on materials about a decade after electric cars become dominant.

Due to recycling, this whole article is baseless. Eventually we'll only need to mine enough to make up for a the few percent of batteries that aren't recycled. Car batteries are already recycled at extremely high rates, and there's no reason to believe this will change.


I think it might be the other way round these days. Java programmers are outsourced because they're so expensive. Javascript seems like the best target now for low-skill outsourcing. Much lower barrier to entry, and arguably a much more forgiving language


I think you're right when it comes to the lower tier of JS developers, but IMHO there are a lot less middle tier devs per-capita in JS than Java. Proficient fullstack JS is a very in-demand skillset right now, and if you're an expert you can find a new, high paying job, in just about any mid-tier tech town in 48 hours.


Try RxJava or JINQ! I believe RxJava was actually first, RxJs being a port of that, if you would believe it :) .


VS Code support for Java ain't bad


> Concern 5: Java is too slow/consumes too much memory

It's sad that this is still a thing. Compared to more trendy languages like Python and Javascript, Java is very light on memory. JS is known for being fairly fast and "light", but its actually 5-10x slower than Java and uses 5-10X more memory. And the whole "lightness" of it is a lie. Javascript's run-time is probably bigger and more complex than the JVM.

Java used to be painful, but there's a ton of tools that make it easy to use if you know where to find them. Some, like Lombok, get rid of a majority of the "cruft" by enhancing the language itself. Awesome Java is a treasure trove of useful stuff. https://github.com/akullpp/awesome-java

The combination of speed, flexibility, and robustness can't be found anywhere else, Although Go is slowly catching up.


> but its actually 5-10x slower than Java and uses 5-10X more memory

I am definitely against the "Java is slow" claims and think they are mostly rediculous but so is this claim.

Saying "uses 5-10x more memory and 5-10x slower" goes against every benchmark I've ever run and my understanding.

Mostly because JavaScript runs on several JITs (V8, JavaScriptCore, SpiderMonkey, Chakra) with different performance goals and characteristics and so does Java (which runs very differently with Art compared to HotSpot for example). Not to mention things like Graal :)

Slowness isn't a property of the language it's a property of the runtime. Usually performance is dominated by things like the speed of the packages used and standard library and not even the compiler.

There is no 5-10x factor _either way_ between JavaScript and Java VMs, not to mention you can run JavaScript on the Java VM anyway so that comparison doesn't hold in that regard either.


>Slowness isn't a property of the language it's a property of the runtime

This is true to an extent, but look at the time and money poured into PHP and how slow it still is after all these years.

Language design choices have a huge effect on how fast the runtime can be. In Javascript, objects are stored as a map of key->value pairs, and aren't strongly typed. This design requires more overhead for type checking and many optimizations used by strongly typed languages won't work. Even in toy benchmarks its clear that Java has a performance lead https://benchmarksgame-team.pages.debian.net/benchmarksgame/... . It's slower than java on every test.

You don't see the memory difference because these toy benchmarks don't allocate much. Node/JS will always use more memory for storing objects, sometimes far more because it isn't strongly typed. In Java, an array of ints will use 32 bits * size plus some fixed bytes. In Javascript, each item in the array can use 2-3x the max "size" of the number, because the runtime can't figure out what type it should be.


> You don't see the memory difference

You'll see the memory difference if you compare Java with C++: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Except for one benchmark, where memory requirements are likely determined by the implemented algorithm, Java consumes in order of magnitude more memory across the board.


> … Java consumes in order of magnitude more memory…

Not for reverse-complement.

Not for k-nucleotide.

Not for binary-trees.

Not for mandelbrot.

Not for regex-redux.

The others show the default JVM memory allocation mas o menos.


Other benchmarks from the same group do show the memory usage and both node and Java are quite bad, as expected. Node is spectacularly bad at some, using 1.8 GB vs Java's 384M or C++'s 155M for example.


Java's usage will never compare to compiled languages without GC because it has to cache a bunch of code in RAM and the garbage builds up between collection cycles. It's pretty bad compared to something like C for sure :)


Depends how well they end up implementing value types.

System programing languages int the 90's with GC faired pretty well in this area.

Naturally they had much more control over GC, how value types were handled and manually allocation on unsafe modules.


> This is true to an extent, but look at the time and money poured into PHP and how slow it still is after all these years.

PHP7 isn't a slow language at all - it's much faster than previous versions actually. There are servers like aerys [1] that easily handle 10,000 concurrent requests on reasonable hardware. The reason sapi (read "regular") PHP isn't "faster" is because caching and the ease of deploying more servers makes it less of a priority to stakeholders.

Like I said - this is more dependent on the libraries used than the language.

> In Javascript, objects are stored as a map of key->value pairs, and aren't strongly typed.

This is also not true - JavaScript objects are stored through a technique called "hidden classes" akin to a C like struct in most modern runtimes [2].

> This design requires more overhead for type checking and many optimizations used by strongly typed languages won't work.

This is also false, JIT engines store run time information about the object (see hidden classes above [2]) and use that to optimize by type. V8 does this a lot and monomorphic functions are much faster [3]. Inline caches (ICs) really help there.

> It's slower than java on every test.

All those programs are poorly written and are running outdated versions of both Java and Node.js. Moreover they do not represent a workload people have in any reasonable way. I think that regardless it is possible Java is faster in a lot of workloads. I wouldn't use Java nor Node.js for any of the above programs there.

> Node/JS will always use more memory for storing objects, sometimes far more because it isn't strongly typed.

See [2] and [3] - that's not how it works.

> In Java, an array of ints will use 32 bits * size plus some fixed bytes. In Javascript, each item in the array can use 2-3x the max "size" of the number, because the runtime can't figure out what type it should be.

V8 has explicit handling for arrays of SMIs (small integers) with bailout semantics. JavaScript runtimes figure this out - feel free to ask for V8 source references. Also see my answer here on a library I maintain (bluebird) https://stackoverflow.com/a/24989927/1348195

[1] https://github.com/amphp/aerys [2] https://richardartoul.github.io/jekyll/update/2015/04/26/hid... [3] https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism....


A lot of Javascript's optimizations are fragile, as in they don't always hold true, so there's overhead determining if the assumptions still apply.

For instance, Javascript's hidden class optimizations are disabled as soon as someone "breaks" the assumption by doing something like accessing a variable using a dynamic array index rather than dot notation.

Javascript runtimes also try to infer types as you say based on how objects are used, but this is also a fragile optimization. For instance, if you use an assumed "int" in a string-like way the runtime re-assigns the tagged type. And it's hard to know whether you (or the library you're using) does so.

Those programs might not represent a real workload but TechEmpower's framework benchmarks are closer. https://www.techempower.com/benchmarks/#section=data-r16&hw=...

On most of those benchmarks the fastest JS framework is ~5X slower than the fastest Java framework.

And yeah the array optimizations are related to what we both mentioned above, but again the optimization is not durable. It only works sometimes, and incurs its own overhead.


> For instance, Javascript's hidden class optimizations are disabled as soon as someone "breaks" the assumption by doing something like accessing a variable using a dynamic array index rather than dot notation.

This is definitely not true.

> For instance, if you use an assumed "int" in a string-like way the runtime re-assigns the tagged type. And it's hard to know whether you (or the library you're using) does so.

Also not true - if you assign an integer to a string the engine will still use optimized code - the caveat is different and in megamorphic functions - if your function can accept lots of types that's problematic.

> On most of those benchmarks the fastest JS framework is ~5X slower than the fastest Java framework.

All of those benchmarks are dependent on the underlying library and not the language at all.

> And yeah the array optimizations are related to what we both mentioned above, but again the optimization is not durable. It only works sometimes, and incurs its own overhead.

That's not really how a JIT works and Java is also a JITd language on some runtimes (and the same person wrote both JITs originally - Lars Bak). The overhead is constant and low for the optimizations. The Java JIT compiler does a ton of such assumptions and bailouts as well to elide creating and allocating objects.


> and are running outdated versions of both Java and Node.js

That does not seem to be true —

java version "10.0.1" 2018-04-17 versus "Java SE 10.0.1 is the latest feature release for the Java SE Platform"

http://www.oracle.com/technetwork/java/javase/downloads/inde...

— or not-very out-of-date —

Node js v10.5.0 versus 10.6.0 Current

https://nodejs.org


> All those programs are poorly written…

Please contribute your own much better written programs —

https://salsa.debian.org/benchmarksgame-team/benchmarksgame/...


Hmm. Just checked memory use on some services we run on Go, Node, and Java. I'm not part of the Java team but results:

Go: 40M Node: 64M Java: 4GB

Any Java service I've seen in production has similar numbers. Coupled with the incredible startup time it's hard for me to see why you'd pick it in 2018.


>Go: 40M Node: 64M Java: 4GB

This benchmark is completely useless unless you have 3 identical servers with identical algorithms using identical API and models with identical work load. so... why would you waste time writing them?

Also, these [1] benchmarks which are more reliable, because we know what servers they're run on and we can inspect source code, unless, of source, you can prove your statement.

[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...


If you tell your Java application server "here you have 4GB, use it as you wish" it will happily comply and trade memory for performance.

In most of the cases it's just a matter of setting a few Java runtime startup parameters.


It's disrespectful to take 4GB if you don't need it. This should never be the default...


It's the default because in any garbage collected language you can delay taking out the trash as long as you want... as long as you have memory. The most efficient thing to do is never run the collector at all.

JS does frequent GC cycles because its unacceptable to let a webpage eat all the ram. Not sure why Go collects so frequently. Java's default IMO is the most reasonable of the three. If you have a server with 4gb the best choice is to let the garbage collector use all of it


Read the comment again:

> If you tell your Java application server "here you have 4GB, use it as you wish"


JVM uses as much memory as you allow. Use `-Xmx39m` to beat Golang.


My guess is that it won’t work with less than 1GB bc of spring boot, hibernate and all the rest of Java enterprise “microservice” goodness.


IMO almost nobody is writing microservices with spring boot because its so gigantic. Hibernate isn't bad on memory use on its own.

There's a raft of more sane choices these days like Play, Dropwizard, Vert.X etc.. They all use far less resources. Spring Boot is huge because it has to support a decade of obsolete junk, its far more than just a REST app framework.

Checkout TechEmpower's framework benchmarks https://www.techempower.com/benchmarks/#section=data-r16&hw=...

(I added filters to limit to Java+Go+JS+Python and limited DB to Postgres and Mysql)

Java and Golang lead the pack, with JS a distant second and most Python frameworks hanging out near the bottom


>IMO almost nobody is writing microservices with spring boot because its so gigantic.

I've encountered plenty of spring boot microservices in my work and, from what I hear of other companies, it's not particularly rare.

Most of the time, if you have a team that's productive in Spring, a manager or lead will be happy to spend some extra memory and get more features shipped.


> My guess

So you actually haven't tried to run an application with those libraries, and you don't even know what libraries that particular application is using, and here you are speculating about something you don't know and/or understand.


I've used Spring and he's probably right :) . But there's better choices these days. Any Spring micro-services out there are probably by a team that knew Spring well and didn't want to learn a more suitable framework


Whats different about the equivalent libraries in other languages?


Spring is huge... The closest competitor might be Rails


Yeah, but they all seem to need high mem amounts or they OOMException.


Well, it may also be a bad code written by amateurs which use memory inefficiently.


Also, https://github.com/cxxr/better-java with recommendations for learning how to write modern Java.


While the gist of that page is nice, there are many many flaws with it. I could enumerate them all, but suffice to say don't just take the author's word for using Optional parameters or always prefer Guava immutable collections or any of that. Much of it is wrong or at least debatable.


Nice! I think it may be slightly out of date though. For example, you don't need Tuples library if you use Apache commons because it has Tuple support. Also, Javaslang has been renamed Vavr. Still a solid article though


How efficiently does Java run when compiled to the browser platform? (e.g. WASM)

(The browser is an important target these days, so imho this question must be addressed; besides, I want to be able to use the same code on the server as on the client; and sadly, the JVM isn't guaranteed to work in every browser).


I'm really excited for WASM, it should be nearly as fast as native code. Java and native code aren't far apart though, so I would say 1.5-2x faster generally


Ok, but I'm worried about the garbage collector, and if it can run concurrently without interrupting the program (as a native JVM would do it).


It should be able to... Hopefully Go and Java will be some of the first GC languages to target WASM, and we'll find out :) . Personally I'm more worried about the size of the GC getting added to the binaries than how fast it is.


AssemblyScript already does it, if I am not mistaken.


If the Javascript garbage collecter can do it then I don't see why not.


The JS GC can run in native code, in a separate native thread with shared memory access, and it can use things like memory barrier instructions, which have no equivalent in WASM yet.


In the auto industry its generally understood that the emissions limits are so low, especially for diesel, that its physically impossible to meet them in some situations like cold engine + cold weather and when driving up grade.

Emissions regulations have made great progress in cleaning up auto emissions, but now politicians keep squeezing the numbers without realizing some of the limits are becoming impossible. So everyone starts cheating, because otherwise we would have no combustion powered cars.

Insane irony is that ships and even some buildings burn horrifically impure "bunker fuel" or wood, and with car emission limits so low these sources are the vast majority of harmful emissions. Its like cities in Cali forcing citizens to make drastic changes to conserve water, when over 90% is used by farmers.


> especially for diesel

There's another way of looking at this, and that's that maybe diesel just isn't clean enough for consumer cars?


maybe, but its cleaner in other ways. It burns hotter and more efficiently, creating less CO2 and some other byproducts by a decent margin. It produces more SO due to fuel sulfur content, and more NOX which is produced because of high temperatures. So its a trade-off.

But at this point the limits are just politicians pulling levers. There's not enough science involved to debate which pollutants we care about and what the lowest realistic limits are.


Forbes says that it would have cost an extra $430 per vehicle for VW to meet the NOx requirements fairly. That's hardly the same as regulations resulting in no combustion-powered cars.

https://www.forbes.com/sites/lianeyvkoff/2015/09/28/all-to-s...


>Its like cities in Cali forcing citizens to make drastic changes to conserve water, when over 90% is used by farmers

yes, this is a common process by which private costs are offloaded onto the public so as to increase the private benefits of exploitation of public goods.

it's legalized theft.


I wouldn't do it. You should split your services out of necessity, not as a design pattern. Service meshes are also quite immature at the moment and basically guaranteed to give you lots of pain. Inter-service communication adds a ton of complexity and isn't a totally solved problem. The biggest issue is distributed transactions.

Say you have a service that updates two others within the same call. A write "fan out". What happens if one of the writes succeeds and the other fails? Since they don't share the same transaction boundary you need to implement rollbacks yourself. One for every single call you fan-out to. For writes to two services you need to write two rollback mechanisms to handle cases where either call fails.

But it gets even worse. What if the service doing the fan-out dies when its only made one of the two calls, and that first call succeeds? Well now you have no way to rollback, so the next step is to persist "fanout status" to durable storage as each call succeeds.

But it gets worse still... What if you get a service loop? So you write to one service which writes to another and that third service asks your service something all within the same call. WTF is the global view of data consistency when this happens? There isn't one, its undefined behavior.

If you go down this rabbit hole far enough you end up writing your own global database to synchronize everything. The proper way to do "microservices" is to share a datastore so it can handle the transactions and rollback for you. But once you share a datastore, why not just build a monolith that can horizontally scale easily?

I get that some companies are writing services with their own datastores, I've worked on several of these projects myself. They have all been a data consistency nightmare. Write your services like Google does, "monoliths" running hundreds or thousands of instances all connected to the same database that scales in the same way.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: