|
This is the type of thing that I would be tempted to solve using GraphQL.
This space for rent
|
|
|
|
|
"Micro services" are relative; what was "macro" yesterday, is micro today due to increased bandwindth, larger back-ends, and / or better design patterns.
Any service is micro if it is "fast", and doesn't require round-tripping and / or maintain state; regardless of the environment.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
The plus with microservices is that you can express them much as you would in native code. If you need a data structure, implement a data structure.
/TeamMember/{TeamId}
Get
Post
Delete
And so on. Don't start breaking the standard just to take shortcuts.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
microservices.io wrote: How to maintain data consistency?
In order to ensure loose coupling, each service has its own database. Source[^]
(It has a bit more to say on the subject than the one sentence I quoted, so I'd suggest reading it)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Basically, I agree with Eddy Vlungen. What I would like to add is that in your example your microservices are too granular. Naturally you should split your microservices by business capabilities, not by entities.
|
|
|
|
|
In all the docs, it's said that Node makes use of non-blocking I/O.
I guess this is not something totally new. All high-performance servers have been using the same. Even on OS level or network level.
What's making Node.js claim this "non-blocking" tag so much?
I was thinking Apache/IIS or any servers meant for high-volume connections, should be using non-blocking I/O. (i.e I/O port completion model for IIS on Windows).
I still believe IIS should be using IOCP internally, but may be only to a limited extent? as the documents say traditional Servers (Apache/IIS) does create 1-to-1 thread for each client.
It's a bit puzzling, why Microsoft did not think about a Node like pure-Single-threaded solution for servers.
Summary of questions:
1. IIS is really a dumb, 1-to-1 thread spawning server for every connected client?
2. Why Microsoft couldnt think of a Node model for web server, when I/O port completion has been so widely used in so many enterprise level network, I/O frameworks?
Full Reset
modified 17-Dec-18 7:38am.
|
|
|
|
|
On the OS level it is not "non blocking IO", but simply threads and fibers.
Eytukan wrote: 1. IIS is really a dumb, 1-to-1 thread spawning server for every connected client? Yes and no. If it is serving a picture, it doesn't need 40 threads for that. IIS also serves applications, which may launch their own threads.
Eytukan wrote: 2. Why Microsoft couldnt think of a Node model for web server, when I/O port completion has been so widely used in so many enterprise level network, I/O frameworks? Node is limited to what JavaScript can do.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: On the OS level it is not "non blocking IO", but simply threads and fibers.
I meant OS objects, i.e Pipes, File, Sockets or anything that's compatible to work with IOCP.
Eddy Vluggen wrote: Node is limited to what JavaScript can do.
Yeah just saying about the architecture it's providing for scalable solutions.
Eddy Vluggen wrote: Yes and no. If it is serving a picture, it doesn't need 40 threads for that. IIS also serves applications, which may launch their own threads.
thanks
But Microsoft is now, happily embracing Node. I was just thinking why they couldnt think of doing this by themselves. And I was believing IIS puts IOCP to max use and an invention called "Node.js" would never be a surprise.
Full Reset
|
|
|
|
|
Eytukan wrote: I meant OS objects, i.e Pipes, File, Sockets or anything that's compatible to work with IOCP. JS isn't allowed to touch most OS objects, as it poses a security-risk.
Eytukan wrote: But Microsoft is now, happily embracing Node. I was just thinking why they couldnt think of doing this by themselves. They made that error before; they did their own version of Java, and it drowned.
I prefer to see them support existing stuff, over inventing an incompatible wheel again.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: They made that error before; they did their own version of Java, and it drowned.
Yep, that's the best thing they can do. I was just thinking, why they couldnt think of it first, may something called "IIS-lite", as they had the technology already.
But anyway, bummer! they are just followers now.
Full Reset
|
|
|
|
|
There already was an IIS lite; there was both IIS Express and PWS.
Eytukan wrote: But anyway, bummer! they are just followers now. With most of the world running Windows, that sounds far-fetched at least.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: There already was an IIS lite; there was both IIS Express and PWS.
If IIS was a rhino, IIS express & PWS were baby-rhinos. I was just wishing for a cheeta or a baby cheeta.
Eddy Vluggen wrote: With most of the world running Windows, that sounds far-fetched at least.
Where Microsoft leads today, exactly? OS/Office? this is primarily because of the 80's , 90's market-share establishment.
Anyway, there's still some bits of 'ms-fan-boy' left in me. That's why I'm wishing they do some "breakthrough" technology. Keeping aside OS & office tools, of course, Microsoft is following the industry lead by Google ,Amazon & co.
The only thing that reminds me of something totally good & breakthrough from MS , might be the introduction of MVVM pattern to the world. That the whole industry is following in one or other ways.
And possibly, Visual Studio Code IDE - it definitely made a punch into open-stack world.
These are all just good!. But a total industry leading tech, MS can easily do, if they innovate better.
Having thorough expertise over non-blocking I/O, IOCP, MS should have done it first, Before someone else could do a thing called "Node.js".
Cheers!
Full Reset
modified 19-Dec-18 3:41am.
|
|
|
|
|
Eytukan wrote: If IIS was a rhino, IIS express & PWS were baby-rhinos. I was just wishing for a cheeta or a baby cheeta. Don't underestimate both power and speed of a rhino. IIS is not a simple webserver, but a rather optimized one, with lots of options.
Eytukan wrote: Keeping aside OS & office tools, of course, Microsoft is following the industry lead by Google ,Amazon & co. Technical "lead" is not determined by stock-value. Most of us use .NET, not "Go".
Eytukan wrote: Having thorough expertise over non-blocking I/O, IOCP, MS should have done it first, Before someone else could do a thing called "Node.js" Executing JavaScript on a server? While we have .NET there? I can easily open a port and serve whatever I want, without the need for anything like interpreted JavaScript.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
First. Thank you for your replies with great manners.
And second, you can easily guess, I'm novice to "Node" or even IIS. But I could fairly figure out how things work. & More with your replies.
Eddy Vluggen wrote: Executing JavaScript on a server? While we have .NET there? I can easily open a port and serve whatever I want, without the need for anything like interpreted JavaScript.
True, but I still see various other things with Node & it's eco-system, and what it has opened up. Will write back once I get some time. I'll be happy if we can achieve the same with .net.
Please note, I'm not arguing on this topic. I'm just trying to discuss and figure out things. I don't know if i'm sounding so anit-Microsoft, in the process. I'm not.
Cheers!
Full Reset
|
|
|
|
|
Eytukan wrote: First. Thank you for your replies with great manners. Must have gone something wrong here, I'm the rude one usually.
Eytukan wrote: And second, you can easily guess, I'm novice to "Node" or even IIS. Write your own "tiny" webserver; all you need is to open a listening socket, and send some files
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Must have gone something wrong here, I'm the rude one usually.
Eddy Vluggen wrote: Write your own "tiny" webserver; all you need is to open a listening socket, and send some files
Full Reset
|
|
|
|
|
|
He uses the canonical example of launching a webserver in node, and compares that to:
Want to do the same thing in .NET? Be prepared to learn about IIS, the Machine.config, the Web.config, the Process Model, how Global.asax works, either ASP.NET MVC or WebForms (huge paradigms in themselves), and how Visual Studio works That's rather unfair, and you can do without most of it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Yup, "kestrel" might be a right fit for the comparison. Just looking at this after Pete pointed out a while ago.
Alright, Now I got the next pile of things to break-head & learn. Kestrel, OWIN, Katana, whatnotana
PS: I was thinking OWIN to be yet another services like OAuth., until I read the article I just posted above loll
Full Reset
|
|
|
|
|
|
This might be news, but CodeProject has more .NET related articles
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: This might be news, but CodeProject has more .NET related articles
Well now it's Code Project: For those who code.
But when I joined the community back in 2005 it was Code Project: Your Visual Studio and .NET home page.
So yeah maybe it roars like a lion now, but nonetheless still a kitty inside.
|
|
|
|
|
Eytukan wrote: Having thorough expertise over non-blocking I/O, IOCP, MS should have done it first, Before someone else could do a thing called "Node.js".
...so, real programming languages already do "non-blocking IO", through this fun concept called "asynchrnous" or "parallel" programming. It's not new, it's been around a long time, and IIS has been leveraging it for well over a decade. You're also confusing a runtime with a software module, which makes me wonder how anyone on this site (outside of QA) can be so uniformed about basic computer operation.
The reason Node needs to advertise this capability is that JavaScript does not normally support non-blocking IO. That's because JavaScript was never intended to do the things that Node allow it to. Please think about that for maybe a minute before your uninformed, tiresome, and inevitable anti-MS response.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
You have missed so many points just with a single reply?
1. First - I'm not anti-MS. I said I'm FOR Microsoft to do things better.
Nathan Minier wrote: ..so, real programming languages already do "non-blocking IO", through this fun concept called "asynchrnous" or "parallel" programming. It's not new,
You just repeated my statement, did you actually read my original post?
Nathan Minier wrote: You're also confusing a runtime with a software module, which makes me wonder how anyone on this site (outside of QA) can be so uniformed about basic computer operation.
If I am, with computer operations, you with manners ? this is rude, when I'm not claiming here to be an computer expert.
I'm merely trying to understand things. That's why I'm here talking people with good manners. Who could explain things.
IIS is a server module, doing various things. Yes I can understand, never disagreed.
Node - just because it's Javascript. You want to call this just a "run-time"?
My only question was, Why MS could not think of dedicated, light weight offering, that can completely open up the world for micro-services pattern. (Don't say micro-services has been there before they are called so). Every technology has been there in every era but on a dim light, many times not even seeing the light of day, not doing anything significant. Mainly not reaching to the public usability.
Micro-services, mainly after Node took over, YES, it's changing the landscape of a Web-server "module" & distributed computing.
When Microsoft had all the technology and equipped with good server experience, they should have thought about a Node like "Run-time" or Light-weight Server "Module" - (Whatever you wish to call).
Nathan Minier wrote: Please think about that for maybe a minute before your uninformed, tiresome, and inevitable anti-MS response.
Well, thanks for your advice sir! , but request you to read the messages clear, before trying to post rude replies.
Full Reset
modified 20-Dec-18 7:07am.
|
|
|
|
|
Eytukan wrote: Why MS could not think of dedicated, light weight offering, that can completely open up the world for micro-services patter They did. Have you looked into the OWIN stack yet? This is something that Microsoft invested very heavily in with .NET Core. Check out the Kestrel web server[^].
This space for rent
|
|
|
|
|