CORBA/ RMI and (D) COM are any still relevant today? - programming-languages

Are CORBA (language agnostic) / RMI (Java) and (D) COM (MS) still relevant today, or is there a technology that has surpassed them?
Cheers,
J

They're not so popular today as modern Java or .Net architectures typically do this type of thing using HTTP based web services.
However, many systems do use these architectures and they are more efficient than web service architectures as they normally use UDP based communication protocols. While these architectures are still in use today they are mostly relegated to legacy and niche market systems in practice.
In some cases RMI is used behind the scenes in java app servers. For example, a bean container may be moved to a separate server from a web app server. Java app servers make this fairly transparent - the bean container can reside on the same server through local calls or on a different server through RMI. With the right application architecture it's just a config item and the app server can do all the remoting behind the scenes.
DCOM gets used similarly with COM+ apps. However, COM+ is largely a legacy architecture on Windows. It was popular with VB6 but that is all but deprecated.
CORBA had a somewhat deserved reputation for complexity due to its design-by-committee roots. However, it pops up in a lot of unexpected places. For example, earlier versions of GNOME made use of a CORBA based component model called Bonobo but this has largely been replaced with D-BUS in current versions. Apart from legacy system infrastructure it has a few niche markets (mostly low latency applications) that benefit from its characteristics such as the UDP based transport mechanism.

Java EE EJBs still use RMI and CORBA as their wire protocol.
Perhaps that's one reason why HTTP web services, be they based on RPC-XML, SOAP, or REST, are ascendant. Simple and open usually win.

Related

Legacy VC++, Com based Desktop application to Modern web with microservices

I am in the process of moving my existing desktop application to web. The GUI is developed using MFC/VC++ and the buisness logic is written in COM enabled VC++ DLL. This Dll has various responsibilities. Currently this Dll is loaded as part of the desktop application memory.Now I am in the initial stage of moving this application to modern web application. Below is the thought process for design considered till now,
Converting monolithic business logic to micro services.
Deploy the micro services in a server.
My business logic VC++ Com layer can interface with microservices and get data.
Have a API gateway which can communicate to microservices and it can serve to the web client.
In this process I wanted to reuse VC++ Com business logic layer as much as possible. The current com Dll is not supporting multi threading or multi user sessions. This needs to be supported. The next thing would be reusing existing MFC GUI in web.
What are the technologies can be considered to reuse my buisness logic?
For the most code-reuse I think you're on the right track.
You definitely want to separate out the business logic into it's own service and you can expose that via any communication protocol you prefer. The biggest downside to this is that every time functionality needs to be added, it needs to be added in two places, or in this case three: the business logic server, the MFC server, and the web server.
As others have pointed out, MFC was really intended for desktop applications. A "modern web application" is one that is stateless and communicates via message-passing over http(s) with the web browser being the client. There's really no re-using the MFC GUI in the web. The architectures are just too disconnected.
Having said that, and I haven't looked into it too much, but Blazor is a WASM compiler. It has limited support for the .net framework, even less so around the communication portion of it, but it might be able to compile your project. I'd bet against it, however.
I think you'd be better off just focusing on a decent web experience with a SPA and abandoning the MFC/Desktop portion. Maybe later you can circle back and build a GUI through MAUI or WPF that consumes the web API.

Anatomy of a Typical Java Web Application

I am attending a training course where they presented the following graphic as the Anatomy of a Typical Java Web Application. Is it too sweeping of a statement, or is it largely accurate?
Here it goes:
(Disclaimer: My experience is drawn mostly from non-Java platforms, though I have some limited experience with Java - but mostly I'm not a fan)
It's accurate - but only for applications using that architecture - which makes this statement somewhat of a tautology.
I'll break it down:
Service Consumer Perspective
A "service consumer" is also more commonly known as a client.
"Service interface files" are not needed to build a client.
I assume by "interface files" it's referring to things like a SOAP WSDL document or Swagger file for REST services. These files are not generally used by clients at runtime but are used to automatically create client class-libraries at design-time - but you can always build a client without any code-generation or reuse of Java interface types.
If it is referring to the reuse of the server/application's Java interface types then the diagram is only accurate for client+server applications that are all-Java and are both designed/created at the same time (which is an old practice from the days of SOAP). Thesedays everything made in the past 5-10 years is RESTful and returns JSON data, but Java interface types are insufficient to model unstructured data like JSON (given you can't model discriminated-unions without concrete classes... in exception handlers, egods, and discriminated-unions are an important tool to model JSON in OOP languages).
Service Provider Perspective
I disagree with the use of the term "Front controller" being used to refer to what is commonly known as a back-end web-service controller, Servlet, or Spring Controller as "front-end" generally refers to the user-facing UI/UX, such as the rendered HTML+JS, an SPA front-end, or rich-client/fat-client (granted, this would be the "service consumer").
You don't need "service metadata" to have a web-application or a web-service - though if you're shipping a web-service designed to be consumed by disparate or non-first-party clients then its a good idea to make a WSDL, Swagger, or whatever metadata or service-description system your platform uses so that your consumers can generate their own strongly-typed clients.
"Service implementer perspective"
So this is my biggest objection: this diagram assumes that the web-service will be 3-tier and the controller/Servlet code is only a thin layer in front of "application" types located elsewhere in the system. While this is common in large-scale and complicated applications where you'll have host-agnostic application code that is designed to be able to run in, for example, an integration-test or unit-test host - or as a desktop application, in my experience I estimate most projects lump all application logic inside the host-specific (i.e. Spring, Servlets, etc) code because it simplifies things greatly (and because those hosts often support testability anyway - and the idea of reusing application code libraries as-is for desktop or mobile applications just doesn't work out well in reality given the massive differences between the disconnected and stateless model of web-service requests compared to the needs of stateful in-process client applications).
In summary: it's not wrong, but I don't believe it accurately describes the majority of (Java) web-applications I've personally dealt with... but this is my subjective opinion and I know that Java web-application and web-service frameworks like Spring and Java EE are designed for and encourage 3-tier architecture, I wouldn't describe them doing-so as an example of the pit-of-success - I feel this is partly due to shortcomings in the Java language design (and the fact these frameworks were designed over 20 years ago before things like generics were added to the language).

What is absolutely necessary to have a website running on the web?

After a couple hours of searching top lists of free "web servers" and "web frameworks" on google, I realized I'm not sure what I'm looking at.
Let's take a couple of example softwares I have come across :
IIS
Apache HTTP server
Apache Tomcat
Socket.io
Node.js
Django
Questions :
Do all these work on the same scope/do the same thing?
If not, what is absolutely necessary to have my "helloworld.html" acessible from anywhere with internet? Let's consider I already have a dedicated server and a domain
Also if not, how do these work together/compliment eachother?
Each of this software has a different description on their website for what it does, what it is, who should use it, it really gets confusing when you're trying to find what is "fresh", what the cool kids are using
IIS and Apache are web servers that support a variety of different technologies for plugging code into the web servers. So, if you were using one of these web servers, you would also use some other framework and language runtime to plug into them.
Apache Tomcat is a Java-based server framework for web applications. From the wikipedia page: "Apache Tomcat, often referred to as Tomcat, is an open-source Java Servlet Container developed by the Apache Software Foundation (ASF). Tomcat implements several Java EE specifications including Java Servlet, JavaServer Pages (JSP), Java EL, and WebSocket, and provides a "pure Java" HTTP web server environment in which Java code can run." It may be used independently of the Apache Web Server. The "Apache" in the name has to do with it being part of the Apache open-source organization. So, if you want to program your server in Java, this is one of your options.
node.js is a Javascript-based framework that is both a framework and it's own web server. So, if you want to program your web server in Javascript, this is your main option. There are additional frameworks you might use with node.js such as Express to make programming your web server simpler.
Django is a python-based framework. If you want to program your web server in Python, this is one of your choices.
socket.io is really not like any of the others. socket.io is a layer on top of webSockets that gives you a whole bunch of additional features over webSockets. This would run in whatever server-side language and framework you were already using and you would have to select a socket.io library that was compatible with your server technology. You can see a list of features that socket.io adds on top of a webSocket here: Moving from socket.io to raw websockets?. webSockets themselves are used for continuous communication between server and client (more efficient than repeated Ajax calls) and for push notification from server to client.
So, if you were looking to select a technology from scratch, there are a number of different ways you could start your selection process.
If you have a preferred language (Java, Python, Javascript, Ruby, C#, etc...) you either know already or want to learn, then you can look at the frameworks that support your language and start there. The framework will indicate whether you need a companion web server or whether than is already part of the framework.
If you have an existing hosting company that you want to use, you may need to understand which technologies they support so you don't select something that would require you to change hosting companies. Not all hosting companies support all technologies and some are better specialists in some technologies.
If you have specific 3rd party code or libraries you want to use, you may want to investigate which languages/frameworks it can more easily be used with.
What is fresh and what the cool kids are using changes pretty regularly. I would suggest that's a crummy criteria. What makes more sense is to understand which technologies and frameworks are doing well with accelerating growth and a rich development community behind them vs. which ones may be falling out of favor. I haven't myself done any sort of overall survey to offer any sort of list of what's on the upswing and doing well vs. what is more stagnant.
I'm personally partial to node.js and the huge NPM library of open-source and compatible code you can draw from and the ability to use one language for both front-end and back-end. It is certainly one of the choices that is growing rapidly and has a vibrant development community behind it. But, it is not the only choice that would meet those qualifications.

Thrift and other Rpc frameworks vs ms rpc

What is difference between rpc frameworks like thrift or gSoap and build-in MS RPC if we talk about security configurations. MSDN describes on http://msdn.microsoft.com/en-us/library/windows/desktop/aa379441(v=vs.85).aspx some aspects, so I can presume that there is support from Microsoft in rpc. Does this mean that if i would like to use different frameworks than MS, I need to take care of security by myself?
This is a very broad question. I'm not quite sure what you really expect, but I'll try to do my best to answer your question.
First, of course you have to take care of the security of whatever you are writing, be it server or client code. Security with regard to RPC services is a wide field, and any sophisticated security feature made available to you by a framework is still just a tool, and still only one part of the overall security concept of your service. To put it in another way: Using SSL will not protect your server from SQL-Injection.
Next, Thift , SOAP and MS-RPC each have different design goals. Thrift is designed with performance and portability in mind. Thrift is more focused on the basic RPC to provide efficiency and portability to any application, for any purpose, in the simplest possible way that works. Of course this approach implies, that there are not much higher-level features, because this is considered being out of the scope of Thrift and left to the user. However, for some of the languages TLS (SSL) transports are available.
In contrast, SOAP is a much richer protocol, based on XML as an machine-readable, standardized and extendable format which can be extended to support higher level features like WS-Security, WS-ReliableMessaging and so on. The downside is, that I have seen many frameworks and development tools which - despite the fact that SOAP has been standardized years ago - are still not able to deal with SOAP in the simpest fashion correctly, let alone supporting WS-Security. Yet, even in spite of this and even in spite of the fact, that SOAP messages tend to produce a lot of traffic and give bad performance, SOAP is still widely used in the industry.
MS-RPC as one of the foundations of DCOM is bound very much to the Windows environment and to Windows development tools. If you can live with that limitation and want to use DCOM, then DCOM offers a very high-level abstraction with good and proven support in today's IDEs.

Is there any Application Server Frameworks for other languages/platforms than JavaEE and .NET?

I'm a CS student and has rare experience from the enterprise software industry. When I'm reading about enterprise software platforms, I mostly read about these two:
Java Enterprise Edition, JavaEE
.NET and Windows Communication Foundation
By "enterprise software platforms" I mean frameworks and application servers with support for the same characteristics as J2EE and WCF has:
[JavaEE] provide functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server.
WCF is designed in accordance with service oriented architecture principles to support distributed computing where services are consumed by consumers. Clients can consume multiple services and services can be consumed by multiple clients. Services are loosely coupled to each other.
Is there any alternatives to these two "enterprise software platforms"?
Isn't any other programming languages used in a bigger rate for this problem area?
Why isn't there any popular application servers for C++/Qt?
Note: By "Application Server" I mean a server mainly for GUI-software and not a Webserver/Web Framework. See what is the difference between web servers and application servers?
Well, you can pretty much consider the high end IBM mainframe machines "application servers", they're pretty popular.
TUXEDO is a transaction manager that empowers a lot of high end applications, written in many things, like C++.
Microsoft had MTS (Microsoft Transaction Server) back in the day. It talked to C, C++, VB, etc.
Application Server is a nice, vague term. Tomcat is an application server, for example. Arguably ZOPE can be considered an application server.
But the thing, in my mind, that really distinguishes an Application Server from "just code" is the transaction manager. I don't consider a raw Tomcat an Application Server, for example, it's basically a really cool web server.
Most folks rely on the database for transactions, but a transaction manager works at a higher level where a database is simply a participant. And transaction managers are where a lot of the heavy lifting in terms of services and middleware offered by Application Servers happens. Transactions are really important in business processes.
Java EE has transaction managers. I don't know of any other "free" system that offers a transaction manager capable of distributed transactions. As I mentioned, most folks rely on the DB and stop there.
There are several transaction managers that support Java JTA (Java EE servers are JTA compliant internally), that's what Spring plugs in to in order to offer transaction services. (Spring is just a framework, it's not a server itself.)
When you add a TM to an OS, the entire machine can become an Application Server. That's what MTS does for Windows.
Java EE app servers stand out because they make much of these services first class (thread pools, object allocation, database pooling, transactions, etc.). Many OSes offer all of these services, at least at the process level. But folks didn't care much to dedicate an entire machine to a task, and having to tune the OS to service that single application. But, all that capability is there.
Add in modern VM systems, and dedicated, "single task" OS instances make more sense. "This Linux VM handles my DNS", "This Linux VM handles my email", etc. So, perhaps the OS will be returning to being a dedicated Application Server.
Spring.py is available for Python.

Resources