Design of a single microservice, size limit?

I’ve been struggling for a while of what would be the “recommended” approach for a microservice itself.

There are quite of top architecture designs that are the holy sacred for a lot of craftsman devs, such as CQRS, Hexagonal, DDD, etc…

But from my point of view, depending of how “big” is the microservice, because you know the word itself it’s giving you a hint… “micro”!!

Should I consider build all the packages, interfaces, divisions between layers such as Hexagonal, or split the content of the microservice based on DDD (its supposed that 1 microservice its 1 domain??? if not… 😐 kind of WTF??)

Or just keep it on its essence like split the entrypoints(rest,queues)-core(business logic)-outpoints(DB,queues, or whatever) and let it open for a “little” extension.

If its too big, think on a split? In order to avoid “minimonolits” and what would be the limit to consider an “app”/API a microservice or a little monolit?

Maybe to be more clear.

i.e:

Microservice/API
├── Product
│   └── DDD/CQRS/Hexagonal stuff
|       └── ....
├── Sells
│   └── DDD/CQRS/Hexagonal stuff
|       └── ....
└── Customer
   └── DDD/CQRS/Hexagonal stuff
       └── ....

Microservice with basic crud -> Product-Sells-Customer(with patterns such as CQRS, Hexagonal, etc…?) -> Its a minimonolit for me.

The kind of what I look forward…

Gateway microservice
├── Product
│   └── routing stuff
|       └── ....
├── Sells
│   └── routing stuff
|       └── ....
└── Customer
   └── routing stuff
       └── ....

Product

Product Microservice
├── Product
   └── Basic separation layer(REST/SERVICE/ORM-QUEUE)
       └── ....

Sells

Sells Microservice
├── Sells
   └── Basic separation layer(REST/SERVICE/ORM-QUEUE)
       └── ....

Customer

Customer Microservice
├── Customer
   └── Basic separation layer(REST/SERVICE/ORM-QUEUE)
       └── ....

The previous ones should have patterns such as CQRS, Hexagonal, etc…???

How to loop multiple images on a single page/post

Hello I am using openseadragon, and I was able to reference one image on my page via openseadragon, but how to do loop more images so I can have 5 more images on the page…

Currently I have this as my javascript


    var imagePath = "/wp-content/uploads/" + $('#materials-osd').attr('data-image');
    var viewer = OpenSeadragon({
        id: "materials-osd",
        prefixUrl: "/wp-content/plugins/zoom-openseadragon/images/",
        tileSources: {
            type: "image",
            url: imagePath,
            buildPyramind: false
        }
    });
})(jQuery);

Code (markup):

This is my code I inputted into a wordpress block

<div id="materials-osd" style="height:460px; width:310px;" data-image="2020/05/dscn0348-1.jpg"></div>

Code (markup):

So I need to do the following
(1) fix references to your “id” and make it a variable vs static name
(2) fix the div block to include a unique class name that you can search on for the .each() function
(3) implement the “each” loop and update the object references for id and imagepath
(4) add 2 or more div blocks to test your code. Note that you can test the code after each step (should do that) .
The classname be something like “suarrmaterials-zoomable-image”
add some comments to describe what is going on. Most importantly, separate the Events functionality from the OSD functionality as right now it isn’t clear in the js file.
Any advice helps thank you.
SEMrush

 

how to loop multiple images on single page/post

Hello I am using openseadragon, and I was able to reference one image on my page via openseadragon, but how to do loop more images so I can have 5 more images on the page…
SEMrush

Currently I have this as my javascript


    var imagePath = "/wp-content/uploads/" + $('#materials-osd').attr('data-image');
    var viewer = OpenSeadragon({
        id: "materials-osd",
        prefixUrl: "/wp-content/plugins/zoom-openseadragon/images/",
        tileSources: {
            type: "image",
            url: imagePath,
            buildPyramind: false
        }
    });
})(jQuery); 

Code (markup):

This is my code I inputted into a wordpress block

<div id="materials-osd" style="height:460px; width:310px;" data-image="2020/05/dscn0348-1.jpg"></div>

Code (markup):

So I need to do the following
(1) fix references to your “id” and make it a variable vs static name

(2) fix the div block to include a unique class name that you can search on for the .each() function

(3) implement the “each” loop and update the object references for id and imagepath

(4) add 2 or more div blocks to test your code. Note that you can test the code after each step (should do that) .
The classname be something like “suarrmaterials-zoomable-image”

Any advice helps thank you.

 

How to combine two rows in a spreadsheet into a single row?

Image

I want the third row to be a combination of the first two row. The first two rows can be of varying length.

How can this be done?

Content Security Policy applied to Single Page Applications: Is it worth it with unsafe-inline

I have a website developed using VueJS (i.e. its a single page application). I’ve been looking at implementing Content Security Policy headers. As I tested out the header values I would need, I realised I would have to allow ‘unsafe-inline’ scripts, as this is fundamentally what my website is.

I’ve read around this a fair bit and found plenty of comments indicating that if I need to apply ‘unsafe-inline’, the CSP header really isn’t going to do much for me.

So my question is; does applying ‘unsafe-inline’ render CSP more or less pointless? Does anyone have any good ideas of how to handle CSP on an SPA?

Thanks in advance.

php – How To Probably Integrate my Custom WordPress Theme with Elementor, Customize Every single Area?

While I’ve done Multiple Themes for my Clients and it’s Really a Big Jump from just Customizing Readymade themes by their own Page Builders or even Coding some Custom CSS Codes, I would like now to Jump more further to integrate best Page Builder I’ve ever used “Elementor”, So while I’m surfing the Web and Especially on StackOverflow, I found several Answers that should Be working for Advanced Developers, but not me, I would like to get the Basic and Complete answer to ” How to Integrate Elemntor in my Custom HTML Based WordPress Theme?

I’m Usually using Underscores to build my Themes

❤ Dedicated Server 55$/m – USA location – SSD/SATA – Single / Duel processors – Paypal, BTC, Cards ❤


DEDICATED SERVER DEALS FROM Hostretina.com

Host Retina is a leading provider of hosting and virtualization solution founded in 2017. We provide our customers with an advanced tools to deploy, manage and maintain their products and services. This coupled with our strategic relationships allows to provide the most reliable solution at the best value

Great Plans, highly reliable, low cost dedicated servers https://www.webhostingtalk.com/

AMD Dual Opteron 2216

CPU: 2.4Ghz – 2 Processors

Threads: 4 Cores / 4 Threads

RAM: 4GB DDR2 ECC

HDD: 146GB SAS

Data Transfer: 20TB

OS: Linux/Windows*

IPv4: 5 usable IPv4 Address

IPv6: /64 IPv6 Address Block

– extra IPv4 available

price: $55 / m

Order Now

Phenom II x4 640

CPU: 3 Ghz Turbo

Threads: 4 Cores / 4 Threads

RAM: 4GB DDR3

HDD: 500GB HDD

Data Transfer: 20TB

OS: Linux/Windows*

IPv4: 5 usable IPv4 Address

IPv6: /64 IPv6 Address Block

– extra IPv4 available

price: $55 / m

Order Now

Dual Intel Xeon 5420

CPU: 2.5Ghz – 2 processors

Threads: 8 Cores / 8 Threads

RAM: 8GB DDR2

HDD: 1TB SATA Hard Drive

Data Transfer: 20TB

OS: Linux/Windows*

IPv4: 5 usable IPv4 Address

IPv6: /64 IPv6 Address Block

– extra IPv4 available

price: $69 / m

Order Now

Dual Intel Xeon 5520

CPU: 2.26Ghz – 2 Processors

Threads: 8 Cores / 16 Threads

RAM: 24GB DDR3 RAM

HDD: 2TB SATA or 120GB SSD

Data Transfer: 20TB

OS: Linux/Windows*

IPv4: 5 usable IPv4 Address

IPv6: /64 IPv6 Address Block

– extra IPv4 available

price: $199 / m

Order Now

MORE BUDGET SERVERS

MORE PREMIUM SERVERS

For Any Kind of Queries , you are most welcome ,

Direct Pre Sales Contact sales[at]hostretina.com
contact us

plotting – Getting values of 2 variables and a constant based on a single equation using a 3D graph

This is my function.

`g(p_, q_, c_) := 
 2^(-p*Log2(p) - 
     q*Log2(q) - (1 - p)*Log2(1 - p) - (1 - q)*
      Log2(1 - q))*(c^(p*q + (1 - p)*(1 - q)))*(1 - c)^(1 - 
     p*q - (1 - p)*(1 - q))`

I have graphed this function taking g as a function of p and q, I am varying c as a constant.

`flo=Manipulate(Plot3D({g(p, q, c)}, {p, 0, 1}, {q, 0, 1}), {c, 0.001, 1})`

enter image description here

How can I get values of p, q and c so that g(p,q,c)<1?

centos – Need to replace the HDD on a single disk system

I need to replace the HDD on a single disk system used as a pbx (CentOS-6 based FreePBX). The existing partition structure is:

ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 Apr 17  2018 /dev/sda
brw-rw---- 1 root disk 8, 1 Apr 17  2018 /dev/sda1
brw-rw---- 1 root disk 8, 2 May 25 14:12 /dev/sda2

parted /dev/sda print
Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  ext4         boot
 2      525MB   500GB  500GB  primary               lvm

parted /dev/sda1 print
Model: Unknown (unknown)
Disk /dev/sda1: 524MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0.00B  524MB  524MB  ext4

parted /dev/sda2 print
Error: /dev/sda2: unrecognised disk label 

I need to transfer the entire system to a new HDD. Ideally I would like to transfer the entire thing (boot-loader, OS, and filesystems) over the network to a larger disk temporarily installed on a separate host, that is not necessarily running CentOS, and then swap the drives. Is this possible?

I am guessing that with lvm in the mix this is a non-starter. But in case it is not then this scenario is the ideal.

Is this possible and how is it best accomplished?

macbook pro – Trying to copy files in single user mode but system says read-only (Catalina)

after i installed some wacom drivers my macbook (pro 2014) refuses to start. it goes to full progress bar but then gets stuck every time. safe mode and verbose mode do not work. i have accepted that i need to reinstall the os from recovery mode. every time i had to do this in the past (before using catalina) i was able to enter single user mode and make a backup of all the files. this time i can’t! following these instructions: http://macsage.com/mounting-usb-drive-in-single-user-mode/ i try to create a sharepoint in the /Volumes directory and get the message that the system is read-only. i have already disabled SIP in recovery mode. started the prompt with the command sudo mount -uw / but it still refuses to change from read-only. isn’t it incredibly dumb to make it impossible for users to backup their files once something goes wrong with the system? or to run fsck for that matter?! are all my files lost now? or is there another way to make a backup?