Disclaimer : This is a general question regarding App Servers, not a specific programming question. If this is not the right forum for it please redirect me to the right place.
I have equal experience in both Java & .Net technologies, and I have the impression that the approaches are radically different when it comes to Application Servers. In the Java World, App Servers cover a broad range of services and features, whereas .Net has IIS (very roughly equivalent to Apache/Tomcat) in one hand, and Windows OS itself to handle some specific tasks (Services for Examples), plus the .Net framework itself consisting in different boutique modules.
This may explain why Java Application Servers may appear somehow "massive" to a regular .Net developer, as much of the load managed by the App Servers in Java EE is an integrated part of Windows Server OS itself.
The usual issues seem to be tackled very differently between the two platforms, making it hard to really compare the features offered by any Java EE App Servers to a .Net Architecture, on a side-by-side basis.
Is this vision roughly correct or am I missing something ?
Sorry in advance if my question is not clear enough, but you I hope you get the idea.
Related
I am a .net developer and trying to learn implementing Microservice using .NET Framework >4.0.
All the article that I refer from internet search, they all talks about implementing Microservices using .NET Core. But I wonder, I could not find any article that says how to develop microservice using .NET Framework >4.0.
I knew that .net core has all the features and run time for Microservices but my question is as below
Question -
1. Is not possible develop Microservice using .NET framework at all ? If not then what are all constrain and limitation ?
2. What are the alternatives if we choose .NET Framework only to develop Microservices oriented architecture
3. Any example/ sample code will be helpful
Thank you
As mentioned in the comments, microservices (MS) is not bound to any language, it's an architectual principle.
Microservices are a software development technique —a variant of the
service-oriented architecture (SOA) structural style— that arranges an
application as a collection of loosely coupled services. In a
microservices architecture, services are fine-grained and the
protocols are lightweight.
https://en.wikipedia.org/wiki/Microservices
You can build MS/SOA with any language and a variety of platform solutions, but there are drawbacks of course to some implementations.
All you do is define a small service A and another small service B to act as your system, exposing data through lightweight REST API(s) (maybe even gRPC) and let them talk to each other - and voila! you have your MS system.
But why are e.g. Microsoft pushing to use .NET Core for MS systems? My best guess would be because of Docker (and other container solutions), to containerize each MS. The difference between .NET Core and .NET Framework in this context is containerization, .NET Core can run on all platforms, such as linux - and docker supports linux containers.
In computing, self-contained system (SCS) is a software architecture
approach that focuses on a separation of the functionality into many
independent systems, making the complete logical system a
collaboration of many smaller software systems
https://en.wikipedia.org/wiki/Self-contained_system_(software)
Why are the linux containers important? Well, I would argue because of Kubernetes (or other container orchestration tools).
Kubernetes (commonly stylized as k8s) is an open-source
container-orchestration system for automating application deployment,
scaling, and management. It was originally designed by Google, and
is now maintained by the Cloud Native Computing Foundation. It aims to
provide a "platform for automating deployment, scaling, and operations
of application containers across clusters of hosts". It works with
a range of container tools, including Docker. Many cloud services
offer a Kubernetes-based platform or infrastructure as a service (PaaS
or IaaS) on which Kubernetes can be deployed as a platform-providing
service. Many vendors also provide their own branded Kubernetes
distributions.
https://en.wikipedia.org/wiki/Kubernetes
Kubernetes is a very powerful container orchestration system. I't can scale your loosely coupled MS linux containers at will - and so much more.
Now, I'd suggest you to keep on reading, a good start would be this:
Read
https://learn.microsoft.com/en-us/dotnet/architecture/microservices/
Source code
https://github.com/dotnet-architecture/eShopOnContainers
https://github.com/EdwinVW/pitstop
Videos
https://www.youtube.com/watch?v=-AfZxdXa7yc
https://www.youtube.com/watch?v=qWUINCZHs6E
I am looking to build a small ASP.NET application using WebAPI and a html front-end, on .NET 4.0. I need to support authentication, authorization, data access (EF), logging / tracing. It can be an intranet/internet application, so it should support load balancing / clustering.
I am sure if I just go with ASP.NET and IIS I will get all these features. However I like OWINs idea of independent async modules and its goal of being high performance hosting environment. But how much of OWIN/ KATANA is matured and what functionalities are still missing/buggy?
The whole idea of Owin/Katana is to build a light weight server with only the function we need. Your question is better to be "What are things missing in Owin/Katana, which is available in IIS?"
The short answer is, IIS is a full-blown server. Many of the websites we developed only requires a small fraction of all its functions. It is like shipping a bag of grocery using an 18 wheeler.
If you look at Katana, all functions are modular. Say, if I need WebAPI, I can add in that function. When CORS is needed, I will extend appBuilder to the related functions. So in a sense, we have a fully customizable server. Since all functions can be added in, I would say nothing is missing.
Another thing to mention is that an installation of IIS would require you to run a Windows Server. If you are on a Mac or not a server version of Windows, you can host your website on Katana or any other OWIN implementation.
Are there any good books or websites on this subject covering subjects like:
different migration scenario's (big bang, module for module, function for function) pros and cons
do's en dont's
tooling
handling customer expectations
We have a rather large winforms based product which we would like to migrate to the web. Migrating in a 'big bang' scenario would probably take at least two years. We're looking for alternative scenario's.
I'm especially looking for ways to handle the inbetween scenario, what options do you have to keep customers happy.
Let them use the windows application at the same time as the new web
application?
Let the windows application use the new features from the web
application via a service interface?
Accept the cost of double maitenance for a while to keep customers happy?
You are more likely be doing a complete rewrite. Because web is conceptually different from windows forms, there would be a lot of changes.
Your best bet is stop new development on windows forms app. Start writing a new app for the new features. Then start moving one isolated feature at a time to web.
You have two options for the UI
webforms - matches closely with windows forms model. If you are
using any 3rd party controls like devexpress, you can find the
equivalents in webforms.
mvc - It is more like re-architecting the whole presentation layer.
If your UI layer is already separated from business layer, then it
would be a good choice to go down the path of MVC. However the
development experience is totally different from doing windows
forms.
State
Maintaining application state is comparatively simple in windows
forms. In webforms you have viewstate to do that for you. But you are going to run in to rude shocks as you run into limitations of viewstate, especially when it gets too large.
In MVC, you are completely responsible for maintaining the state.
New skills
You require new skills to mimic state-full scenarios
Strong understanding of javascript, ajax, at least one javascript
framework like jquery. 3rd party commercial tool kits can ease some
of these pains.
Depending on complexity you might need web application frameworks
like Backbone.js /Knockout
Expectations
It would be very expensive to achieve the same responsiveness as windows app, as you will be messing with multiple technologies. Probably your users are going to hate the new app initially. Having skilled web designers on staff is very important
Based on our own experience with moving applications from desktop to web: carefuly inspect the architecture of your winforms applications and if possible - try to provide a web interface at the service or persistence level so that your windows applications use web services instead of directly talking to the database. Then you can let your users launch desktop modules from the application server using clickonce.
Such approach let us move to web quickly and users got the same GUI and a new way to access the application. In fact, it took like 3 or 4 months to redesign existing applications so that they use web services.
Then, we were replacing modules one by one, implementing them as web applications and maintaining both (clickonce and web) for a short period of time so that users were able to get used to new modules.
The migration of consecutive modules from clickonce to web was prioritized in an obvious way - we've started from modules that were used by most users. In fact, the initial release of the system has only one web forms module ready and remaining modules are being replaced for over 2 years now, one by one.
We have a fairly large system involving multiple applications running on Windows, written in .NET. These include a number of web applications using ASP.NET.
We have a number of unrelated web applications written in LAMP - Linux/Apache/MySQL/Php.
The greatest advantage we've seen in ASP.NET is the ease with which code can be shared between web applications, win-form applications, windows console applications, and windows services. We have signficant code in .NET assemblies that are shared across all of these environments.
Apache/Php has some significant advantages over ASP.NET as a web programming environment, but if there is anything in it that is equivalent to .NET when it comes to integrating code that is shared across non-web applications, I'm unaware of it.
So I'm asking. Are there any technologies that provide the same sort of easy and seamless integration of shared code modules between Apache/Php and non-web applications?
The only environment with most of what you are asking for is Java.
Take the same code, stick it in a swing app, servlet, applet, heck even throw it in a mobile device, it'll work. JDBC should be a nice abstraction over most databases, so you're clear in that area.
Other than that, requesting something similar over the LAMP stack is something I believe does not exist at the moment.
Not that I know of, but I do know that Mono has a runtime module that can be plugged into Apache, effectively running an ASP.NET application under it. See here on the blog on how to do this.
Edit: As per Robert's comment, the link on that blog is broken! Here's the official link to sourceforge.net. Sorry!
Hope this helps,
Best regards,
Tom.
I am a junior developer, doing my last year at college. I'm mostly asp.net oriented and even have a part time job coding in that language. I am interested on converting to linux and since visual studio is unsupported write my code in Mono.
Are there any notable limitations in Mono that I should be aware of (regarding ASP.NET)?
According to the Mono website:
Mono's ASP.Net does not implement the
following features:
Precompiled Websites
Webparts APIs.
Also most if not all 3rd party ASP.Net controls are not compatible with Mono unless otherwise specified. ComponentArt controls for example are not usable in Mono. However, there's no reason to think that this won't change as Mono gains popularity. ComponentArts has already mentioned that they are considering adding support in the future.
I'd say the biggest thing you lose is IIS. ASP.net and IIS were very deeply linked. Many of the advantages from ASP.net come from the utilization of hosting features in IIS. The biggest one I can name is the ability of HTTP.sys to directly respond to a request in kernel mode if the page is in cache. This means that the socket open is responded to immediately and can allow for orders of magnitude more hits to your webserver.
Its a bit of an edge case but Microsoft's Web Service Enhancements are not supported on Mono. I ran into this problem trying to get some WSE services working on Mono.
Regarding web services there are two very good open-source alternatives: ServiceStack.Net (using it) and NANCY.
These area a lot easier implement, use and maintain, IMHO, than services built on top of WCF.