Why load shared library from remote in module federation? - webpack-module-federation

In Module Federation example
https://stackblitz.com/github/webpack/webpack.js.org/tree/master/examples/module-federation?terminal=start&terminal=.
Why load shared library from remote in module federation?
Shared libraries should not be loaded from host for performance?

Remove eager:true from webpack module federation plugin config.
Like that
Make sure react is a peer dependency as well.

Related

SkiaSharp on AWS Lambda

I have a .NET core 3.0 API deployed on AWS Lambda. I am using SkiaSharp dll. I get this error:
System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. liblibSkiaSharp: cannot open shared object file: No such file or directory.
I have tried nuget packages of Skiasharp, skiasharp.NativeAssests.Linux, Avalonia.Skiasharp.NativeAsstes.Linux and also tried with Skiasharp.NativeAssets.Linux.NoDependencies but I'm still getting that error
You need to add the SkiaSharp.NativeAssets.Linux package to your NuGet dependencies. Found that into on this AWS Form post.

Load OpenSSL API code Apache

Is posible to load a custom module, or patch based on OpenSSL API to an Apache reverse proxy using C/C++ ???.
I can build a .so object using OpenSSL API and preload it to some TLS clients (like wget) but I dont know how to do that on an Apache server.
Any idea?
You can build your own OpenSSL libraries libssl.so and libcrypto.so. Then you need to specify those libs in the LD_PRELOAD= variable of your apache process environment (see more about LD_PRELOAD here)

Packaging python application as a zip including all dependencies in the sub-directories

I have a python application using paramkio libraries. I use the pycharm for development. In my case, I have pip-installed the paramiko libraries in my virutal environment so my application could use it. However, I have to deploy this in an application server with no connectivity to internet and the paramiko library is also not available in the local repos.
I tried to add the following to the setup.py:
from distutils.core import setup
setup(
name='appname',
version='',
packages=['MyTestPackage'],
url='',
license='',
author='myname',
author_email='',
description='', **requires=['paramiko'],**
)
I try to build this using the sdist but I cannot find the paramiko libraries in the sub directory.
I come from java background, so when I package jars, I can usually build them into a bundle using dependency management tools like graddle or maven, and distribute them as an application.
However, with python I do not seem to be able to do so, other than probably creating an RPM.
Can someone help on what needs to be done in order to package my application as a complete bundle(so I do not have to depend on client to have the libraries in their repos)?
Note. I use python 2.7.14

Apache 2.2 does not load custom module

i build an custom apache module mod_spnego using visual studio 2015 and c++ sources, using apache 2.2.31 libs (apr, apr_util) and header files on testing machine. I loaded that module successfully in that apache 2.2.31 on testing machine, but after migrating module on production machine, it fails to load and apache 2.2.31 on that machine throws misleading error "The specified module cannot be found"
I believe, that underlying error is with some missing os .lib, or incompatible os lib, because apache 2.2.31 libs on production machine are the same as on testing machine.
One difference during compile was necessisty to add wss2tcip.header file. Linker then linked ws2_32.lib, but this library is not on production machine
I am really new to c++. Please help me find out the reason why apache on production machine does not load module.
I solved that issue. Production machine missed vc15 redistributables. After installing vc15, module loaded ok

Load .dll library as a Microsoft Service

I am writing a Microsoft Service in C++. This service should dynamically load at runtime a .dll library located in a subfolder in the same folder as the executable. However, as someone told me, the actual working directory of the service is not the same as the executable directory, therefore the library is not found and not loaded.
As proof of this fact, I am able to load the library if I start the service executable as an application.
The folder structure of the application is as follows:
FOLDER\Service.exe
FOLDER\SUBFOLDER\library.dll
How would you access it as a service?
You can extract the directory from the current module path. You can use GetModuleFileName to retrieve file path of the current executable