skip to content
Relatively General .NET

Starting a process as normal user from a process running as Administrator

by Gérald Barré

posted on: November 28, 2022

If you start a process from a process running as Administrator, the child process also runs as Administrator. Running a process as Administrator could be a security risk. So, a good practice is to use the minimum privileges required to run a process.If you want to start a process as a normal user f

RavenDB Index Cleanup feature

by Oren Eini

posted on: November 25, 2022

A database indexing strategy is a core part of achieving good performance. About 99.9% of all developers have a story where adding an index to a particular query cut the runtime from seconds or minutes to milliseconds. That percentage is 100% for DBAs, but the query was cut from hours or days to milliseconds. The appropriate indexing strategy is often a fairly complex balancing act between multiple competing needs. More indexing means more I/O and cost on writes, but faster reads. RavenDB has a query optimizer engine that will analyze your queries and generate the appropriate set of indexes on the fly, without you needing to think much about it. That means that RavenDB will continuously respond to your operational environment and changes in it. The end result is an optimal indexing strategy at all times. This automatic behavior applies only to automatic indexes, however. RavenDB also allows you to define your own indexes and many customers run critical business logic in those indexes. RavenDB now has a feature that aims to help you manage/organize your indexes by detecting redundant definitions & unqueried indexes which can be removed or merged. The index cleanup feature is now exposed in the Studio (since build 5.4.5): When you select it, the Studio will show you the following options: You can see that RavenDB detected that two indexes can be merged into a single one, and additionally there are some indexes that haven’t been used in a while or have been completely superseded by other indexes. RavenDB will even go ahead and suggest the merged index for you: The idea is to leverage RavenDB’s smarts so you won’t have to spend too much time thinking about index optimization and can focus on the real value-added portions of your system.

The dangers and gotchas of using scoped services in OptionsBuilder

by Andrew Lock

posted on: November 22, 2022

In this post I look at the problems you can hit with strongly-typed settings when you inject Scoped services into OptionsBuilder, and how to avoid them…

Killing all child processes when the parent exits (Job Object)

by Gérald Barré

posted on: November 21, 2022

A Job Object allows groups of processes to be managed as a unit. This is useful for managing the lifetime of a group of processes, for example, when you want to terminate a group of processes when one of them terminates. It is also useful for managing the resources consumed by a group of processes,

RavenDB PHP Client has been released

by Oren Eini

posted on: November 18, 2022

I recently talked about the beta release of the RavenDB PHP client a few months ago. I’m now really pleased to announce that we have just released the official RavenDB PHP client. Here is what this looks like:   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters use RavenDB\Documents\DocumentStore; use YourClass\Company; $store = new DocumentStore(["http://localhost:8080" ], "Northwind") $store->initialize(); { // save a new document $session = $store->openSession(); $entity = new Company("My Company Name"); $session->store($entity); $session->saveChanges(); } { // query on the data $session = $store->openSession(); $companies = $session->query(Company::class) ->whereGreaterThan("numberOfEmployees", 12) ->toList(); } view raw sample.php hosted with ❤ by GitHub

Recording

by Oren Eini

posted on: November 17, 2022

I had a lot of fun in this webinar, showing off some of RavenDB’s capabilities in really complex distributed systems:

Scaling Redis

by Ardalis

posted on: November 14, 2022

Redis is a popular open source cache server. When you have a web application that reaches the point of needing more than one front end…Keep Reading →

Minimal API validation with ASP.NET 7.0 Endpoint Filters

by Ben Foster

posted on: November 14, 2022

ASP.NET 7.0 included support for Minimal API endpoint filters. This post looks at how you can use this feature to validate requests using Fluent Validation.

39 Misconceptions about date and time

by Gérald Barré

posted on: November 14, 2022

This post contains a list of misconceptions about date and time. The explanations are not exhaustive, sometimes it's just counter-examples.#Everybody uses the same calendarNot all countries have adopted the Gregorian calendar at the same time. France, Spain, Italy and a few other countries adopted

Working with stacked branches in Git is easier with --update-refs

by Andrew Lock

posted on: November 08, 2022

In this post I discuss how to use the new Git rebasing feature, --update-refs, and how it makes working with stacked branches/PRs easier.…