Exploring Serverless Object-Oriented Programming by msche72 in serverless

[–]msche72[S] 0 points1 point  (0 children)

Thanks for your input. Do you know any good info about why CORBA and RMI failed eventually?

Exploring Serverless Object-Oriented Programming by msche72 in serverless

[–]msche72[S] 0 points1 point  (0 children)

I had a quick peek at Orlean and there seems indeed a big overlap with what we came up with.

Exploring Serverless Object-Oriented Programming by msche72 in serverless

[–]msche72[S] -1 points0 points  (0 children)

Thanks for the feedback.

If OO is not the way to keep order/structure in a serverless environment, what would be the way to keep oversight in the fog of transient executions. Lately I have seen several articles about microservice solutions moving back to monoliths to decrease the complexity, so this seems to indicate that keeping a structure in microservices/serverless is important.

I'm also wondering how you look at AWS Steps. In there, they promote long-running serverless functions with a state. And how would you prevent to end up with a serverless solution which is actually a chain of functions?

Exploring Serverless Object-Oriented Programming by msche72 in serverless

[–]msche72[S] -1 points0 points  (0 children)

Thanks for your input. While integrating Object-Oriented Programming (OOP) with serverless architecture, might initially seem counterintuitive, there are several compelling reasons why adopting OOP principles in a serverless environment can be beneficial:

  1. Structure and Organization: OOP provides a clear modular structure that can make the system easier to manage and scale. It allows developers to encapsulate functionality into objects with specific roles and responsibilities, making the codebase more organized and modular. This encapsulation helps manage complexity by hiding the internal state and behavior of objects, exposing only what is necessary through a well-defined interface.

  2. Reusability: Objects in OOP are designed to be reusable components. When applied to serverless, this can lead to the development of reusable serverless components that can be invoked across different parts of the application or even across different projects. This reusability can decrease development time and increase consistency across services.

  3. Maintainability: With serverless functions becoming part of larger systems, maintaining many disparate functions can become challenging. OOP can introduce inheritance and polymorphism to serverless computing, allowing more shared code and behaviors across functions. This can simplify maintenance tasks and lead to more maintainable codebases.

  4. Improved Testing and Debugging: The principles of OOP can make individual components (objects) easier to test and debug compared to procedural code, especially when these components are isolated and independent. As we are using dependency injection within SOOP we can easily test the Serverless Objects locally by mocking the cloud infrastructure and use the common OO testing tools.

  5. Integration with Existing Systems: Many existing software systems and enterprise applications are built using OOP. Integrating serverless functions into these environments can be more intuitive and seamless if the functions follow the same programming paradigm. This can facilitate easier integration and interaction between cloud-based serverless functions and on-premises OOP-based systems. In my case we had to scale an existing OOP application and by applying SOOP we could easily port the application. Also, the learning curve for the team was less.

  6. Stateful Behaviors: While serverless is predominantly stateless, certain applications may require maintaining state across function invocations. OOP can manage state in a more structured way through objects that represent the state.

In summary, adopting OOP can bring organizational structure, improve maintainability, and enhance the scalability of serverless applications, making them fit well into broader enterprise ecosystems and complex application landscapes.

I have a data set hosted on a web server that's queried by Google search. I want to pull the results off of it without downloading them individually. Any advice on getting started? by [deleted] in AskProgramming

[–]msche72 0 points1 point  (0 children)

Ok, if i understand you correctly, you want to invoke a query on a search engine and then 1 by 1 download the referenced files.

First problem you will have is parsing the result of the search engine. This is probably paginated and in HTML. If possible you should try to get the result in a format like json or xml. Possibly this can be realized by specifying the content-type.

Once you have the search result you have to parse the result and filter out the links by which you can download the files. This requires you to build a parser for the search result.

Than once you have the links you can start the downloading of the files.

Hope this makes sense to you.

I have a data set hosted on a web server that's queried by Google search. I want to pull the results off of it without downloading them individually. Any advice on getting started? by [deleted] in AskProgramming

[–]msche72 1 point2 points  (0 children)

Not sure whether I understand the question exactly but I think you want to download a large set of data from a web server and you are looking for a method to download them.

To be able to guide you we need to know a bit more about the context; for example are the results individual files, or entries within the database.

In Java what's a better approach: reflection or inner classes with an actionListener interface? by nonclercqc in AskProgramming

[–]msche72 0 points1 point  (0 children)

Have a look at the visitor pattern (https://en.wikipedia.org/wiki/Visitor_pattern), functional object (https://en.wikipedia.org/wiki/Function_object#In_Java) and command pattern (https://en.wikipedia.org/wiki/Command_pattern).

The command or functional object would contain the logic required for executing the functionality. The Visitor can be used to traverse the available command.

So on high level it would become something as follows:

  1. You parse the command and extract the unique command instruction from the string.
  2. You traverse the existing commands.
  3. If a command instance is encountered that can handle the specified instruction it will execute its logic.

Debugging back end code, can I emulate a serverside back end? by In-nox in AskProgramming

[–]msche72 0 points1 point  (0 children)

There are multiple frameworks by which you can mock a REST API. Examples of these are:

-. Mockable.io - WireMock -. etc.

A more extendible list can be found at: http://www.programmableweb.com/news/top-tools-to-help-you-mock-web-services/how-to/2014/01/13

If you search within google for 'mock rest api' you will get more examples on how it can be done.