java – Consuming Multiple resources from a single REST Service

I am developing a Spring Boot Application which consumes another REST service to get the User’s Account information. The same service provides multiple operations like:

GET: /userid/retrive -to get user and account information

POST: /user/create – to create a new user

POST: /userid/save – to save the user information

DELETE: /userid – to remove the user information from the system

POST: /userid/account : to update account information

So All the above apis are exposed by one service. Some of them return the same response object while others do not and each of them have their own request parameters and request headers that should be set before calling.

So what I have done is I have created a Base class which will have the common code and I have extended it for One Rest template per API operation which will set its own request parameters and call the service and also has different exception loggers/messages.

The service also exposes other operations which we start consuming in our upcoming sprints, and I wanted to make sure if we can utilize any existing design pattern for our advantage.

So I am writing this question to know if there are any alternatives or any design patterns you could suggest so as calling the same service would not have multiple rest templates.

performance tuning – Sql Server consuming lot of memory Creating Bottleneck for my web application Hosted in the same server

I’ll answer your second question first, which is typically it’s ideal to host your SQL Server instance on its own dedicated server, to maximize the resources it has available to it without causing contention for other applications or battling contention from other applications.

The Memory, CPU, I/O, and Disk Space available on the server are all key resources utilized by a SQL Server instance, and some of them are even eagerly acquired and held onto to maximize efficiency and performance of that SQL Server instance. For example, SQL Server will generally continually acquire more Memory (out of the total allocated to the instance) over time for multiple uses of caching, and generally won’t release that Memory back to the server, unless the Windows OS indicates a critical Memory pressure event, or the server or instance is restarted.

To answer your first question, we can’t accurately tell you the issue you’re currently facing without more details and context, unfortunately. It’s too complicated, and broad of a question, without observing actual concrete examples with metrics. But if you’re certain
your SQL Server instance is affecting performance of your web application, then you’re likely under-provisioned resource-wise. 12 GB of Memory sounds suspiciously low for both the OS (which likely needs a minimum of 4 GB itself) and the web application itself.

Aside from that, I wouldn’t doubt you’re seeing other resource contention either from the CPU or I/O. Your best bet is to try to isolate a specific example of a performance issue your web application is experiencing so that it’s reproducible, and then measuring what’s actively running on your SQL Server instance concurrent to those performance issues of the application. I find Adam Machanic’s sp_whoisactive very helpful as a starting point to see what is currently running on my SQL Server at any given instant.

Powershell – get diff of two files without consuming huge amount of memory – is there any alternative c# or c++ API?

I have two large files to compare (over 10 GB). The below command works fine for small files but seems to eat up RAM space on my machines.

How can I get diff of two files without consuming huge amount of memory ?

Any thoughts would be really appreciated.

robocopy.exe C:Folder C:Folder /l /nocopy /is /e /fp /ns /nc /njh /njs /tee  /log:c:tempFolderList.txt

$path = 'C:Folder'
$pattern = (regex)::Escape($path)
$newContent = @()
Get-Content -Path "c:tempFolderList.txt" | ForEach-Object {$newContent += $_ -replace $pattern, ''}
Set-Content -Path "c:tempFolderList.txt" -Value $newContent

(Get-Content C:tempFolderList.txt).Trim() -ne '' | Set-Content C:tempFolderList.txt

robocopy.exe C:Folder2 C:Folder2 /l /nocopy /is /e /fp /ns /nc /njh /njs /tee  /log:c:tempFolderList2.txt

$path = 'C:Folder2'
$pattern = (regex)::Escape($path)
$newContent = @()
Get-Content -Path "c:tempFolderList2.txt" | ForEach-Object {$newContent += $_ -replace $pattern, ''}
Set-Content -Path "c:tempFolderList2.txt" -Value $newContent

(Get-Content C:tempFolderList2.txt).Trim() -ne '' | Set-Content C:tempFolderList2.txt

Compare-Object -ReferenceObject (Get-Content c:tempFolderList.txt) -DifferenceObject (Get-Content c:tempFolderList2.txt)

blockchain – Why does mining / validation of new blocks have to be complicated / time consuming?

blockchain – Why does mining / validation of new blocks have to be complicated / time consuming? – Bitcoin Stack Exchange

electrical power – How to reduce energy consuming of PC home server while running from UPS?

I have old and very cheap Core2Duo PC ATX box. I use it as my main computer in my dacha (seasonal second home), but more important, it constantly gets some data via ethernet and sends some other data via second ethernet. Sometimes energy is shutting down, that’s why I use UPS.

But is there any way to reduce energy consuming using any crazy hardware modifications? For example, it is OK for me to shut down all USB bus and all coolers (I have no heavy computing more than 1% CPU load) and especially a videocard for the time while PC works from UPS. Is it possible to have a possibility to shut down all devices which I do not need while working from UPS? Can I just shut down any voltages except 1V for CPU, 1.5V for DDR2 RAM and those which are needed for disk and network cards? Is it possible not to use 230V chain while running from UPS and use direct connection from 12V battery to 12V duty voltage with additional DC-DC for every device in my system that needs 5V or 3.3V?

It is a hobby project, nothing serious and I am ready to waste my motherboard if I will accidentally solder something wrong, and I am ready if something will literally explode. I do not need to save any data, all I need is to keep the server working as long as battery can run, without any useless chains.

All I have done in this direction – remove a videocard any time when I am leaving. So, if I arrive to the dacha, I need to shut down the PC, then install the videocard then turn on the PC and after that I can see a picture on a monitor. Also I am ready to switch from 2.5 HDD to anything more power-efficient like SD card, I do not need fast memory in this project. But I am not ready to switch from x86 because I depend from some proprietary software on that machine.

Hope my question is understandable.

query – SQL Analyze – dbms_stats consuming much CPU on Oracle Server

In one bigger DB with many user schemas and big tables I have the devs starting regulary the Analyze select dbms_stats queries , that consume a lot of cpu when started for many users at once. These analyze queries have sometimes over 2-3 Minutes duration time and all of them have COUNT inside and the explain plan shows that the queries use every time table access FULL scan.

/* SQL Analyze(0) */ select /*+  full(t)    parallel(t,5) parallel_index(t,5) dbms_stats

A lot of those queries need to collect statistics, but during this period they consume all of the server CPUs, and I would like to see if they can be optimized.
The queries are similar like in the Doc ID 2552730.1

They have a lot of repetitve substrb(dump(max( and to_char(count( sub-functions for the table columns.

PX Coordinator is starting them parallel, which is ok, before SORT aggregate and after sort agreggate in the explain plan.
Many tables have over 150 million rows.

At the end of the queries we have also TOPN,NIL,NDV methods repeating many times.

Have you maybe encountered same issues and which approach could be taken to optimize those queries if possible. SQL Advisor gave back no recommendations.

Is there any option to kill the particular process automatically if it is consuming a particular value of cpu?

some sort of sql Proccess makes my database server to consume 100% of the cpu, Is there any option to kill the particular process automatically if it is consuming a particular value of cpu ?

dnd 5e – How can I either heat air for a balloon or heat another material to power a machine, without consuming fuel?

Create Bonfire might work

Create Bonfire creates a self-sustaining magic fire that lasts for 1 minute. However, as it is a cantrip, you can repeatedly re-cast it to keep the fire going longer. It can deal fire damage and ignite flammable materials in its area, so it definitely produces heat. However, it continues to burn even if no flammable materials are placed in its area. The spell has no material components. As long as you don’t intentionally place any flammable materials (or flammable creatures) in the bonfire’s space, this spell seems to satisfy all your requirements.

Create Bonfire might not work for a moving vehicle

Since you have added your reason for needing this spell, Create Bonfire may not be what you want. The bonfire created by the spell is stationary, but “stationary” is not clearly defined, leading to a number of questions about how certain spells work on moving vehicles, such as this one and this one. You should ask your DM how they will apply the rules in this case (or if you are the DM, you’ll need to make a ruling).

sql server – How to identify the top disk space consuming tables by file?

You may go to the report –> standard report and select Disk Usage by Top Table. This will be give you the table name in descending order which is used from maximum on disk to minimum on disk.

Alternatively, you may use the SQL below to get details:

SELECT, SUM(reserved_page_count) * 8.0 / 1024 as Size
FROM sys.dm_db_partition_stats, sys.objects 
WHERE sys.dm_db_partition_stats.object_id = sys.objects.object_id 

Or this query:

SELECT TOP 1000 AS SchemaName, AS TableName,
        a1.rows as Row_Count,
        (a1.reserved )* 8.0 / 1024 AS reserved_mb, * 8.0 / 1024 AS data_mb,
        (CASE WHEN (a1.used ) > THEN (a1.used ) - ELSE 0 END) * 8.0 / 1024 AS index_size_mb,
        (CASE WHEN (a1.reserved ) > a1.used THEN (a1.reserved ) - a1.used ELSE 0 END) * 8.0 / 1024 AS unused_mb

    FROM    (   SELECT
                SUM ( CASE WHEN (ps.index_id < 2) THEN row_count    ELSE 0 END ) AS (rows),
                SUM (ps.reserved_page_count) AS reserved,
                SUM (CASE   WHEN (ps.index_id < 2) THEN (ps.in_row_data_page_count + ps.lob_used_page_count + ps.row_overflow_used_page_count)
                            ELSE (ps.lob_used_page_count + ps.row_overflow_used_page_count) END
                    ) AS data,
                SUM (ps.used_page_count) AS used
                FROM sys.dm_db_partition_stats ps
                GROUP BY ps.object_id
            ) AS a1

    INNER JOIN sys.all_objects a2  ON ( a1.object_id = a2.object_id )

    INNER JOIN sys.schemas a3 ON (a2.schema_id = a3.schema_id)

    WHERE a2.type <> N'S' and a2.type <> N'IT'   
    order by desc         

Note: I have not tested these queries myself, confirming back whether it works or not would be appreciated.

This has been asked on multiple forums and I have used answers from here.

As far as files are concerned, you may need to list filegroups, if none are defined, all the allocations will take place in primary filegroup.

Below query could help you finding physical location:

       , i.indid
       , i.(name)           AS (Index_Name)
       , i.groupid
       ,             AS (File_Group)
       , d.physical_name    AS (File_Name)
       ,             AS (Data_Space)
FROM        sys.sysindexes i
INNER JOIN  sys.filegroups f        ON  f.data_space_id = i.groupid 
                                    AND f.data_space_id = i.groupid
INNER JOIN  sys.database_files d    ON  f.data_space_id = d.data_space_id
INNER JOIN  sys.data_spaces s       ON  f.data_space_id = s.data_space_id
WHERE       OBJECTPROPERTY(, 'IsUserTable') = 1

Hope this helps.

sharepoint online – What is the payload to be sent for “ViewFields” parameter as part of consuming the SPO REST API?

I am trying to create a SharePoint list view through the SharePoint REST API, with a defined set of columns to be part of the view. The endpoint i am using is below:



URL:‘ListName’)/views Headers:

‘Accept’ – ‘application/json;odata=verbose’
‘Content-Type’ – ‘application/json;odata=verbose’
Body (JSON):



I get a JSON error, since this payload does not seem to be right. Need help in understanding how to create a view with specific fields through the SharePoint REST API.

Thanks, Yesh

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies 5000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies New Proxy Lists Every Day Buy Cheap Private Proxies; Best Quality USA Private Proxies