Monitoring Settings Changes in ASP.NET Core
Photo by Linus Nylund on Unsplash
Did you know you can directly respond to config file changes in ASP.NET Core? By using the IOptionsMonitor<T>
interface, it’s possible to run a lambda function every time a config file is updated.
For those who aren’t too familiar with it, ASP.NET Core configuration is handled using the Options Pattern. That is, you create a model class that has a field for each property in your config file, and then set up the application to map the configuration to that class, which can be injected into controllers and services. In your controllers, you can request the configuration class T
as a dependency by using an options wrapper class like IOptions<T>
.
While this works just fine in some cases, it doesn’t allow you to actually run code when the configuration is changed. However, if you request your configuration using IOptionsMonitor<T>
, you get the ability to define a lambda function to run every time appsettings.json
is changed.
One use case for this functionality would be if you wanted to maintain a list in the config file, and log every time that list was changed. In this article I’ll explain how to set up an ASP.NET Core 5.0 API to run …
monitoring dotnet aspdotnet
Introducing VisionPort Remote
Welcome to End Point Liquid Galaxy’s new VisionPort Remote! This application not only allows the user to show their content on screen, but also gives control over Google Earth navigation through a number of touch actions. In addition to serving as a remote touchscreen of the system, Remote doubles as a portal that creators can use to test their content from their own devices. A new feature of Remote permits a shareable “guest view” allowing the presentation host to show their content without the possibility of a guest intervening.
Note: This interface layout is not final.
Why we created this
The COVID-19 pandemic increased the need for remote work, content, and presentations. Prior to the pandemic, the only way to use the Liquid Galaxy system was if you were in front of the display. The VisionPort Remote provides more flexibility and an ability to experience the system’s benefits from all over the world.
Who this benefits
The VisionPort remote helps content creators visualize the content that they are making without needing to be in front of the system, enables hands-free control of the Liquid Galaxy from any device, and allows for remote sharing of content to viewers who do not …
visionport
Lock down your security with GPG on a YubiKey
Photo by Mauro Sbicego on Unsplash
Gnu Privacy Guard (GnuPG or GPG) is a tool we use a lot at End Point. Its ubiquity and quite decent security is a perfect fit for us — and there’s a way to make it even safer.
GPG uses the OpenPGP standard to encrypt files. Normally, one creates a PGP key on their computer and just keeps the keyfile safe. A password is generally used, but as with any private key, it’s only as safe as the computer it’s on.
Got a YubiKey and not sure what to do with it? Want to get a little more secure with your encryption?
In case you haven’t heard of them, YubiKeys are hardware USB keys that can be used as a multi-factor authentication (MFA) token, or to fill in one-time password (OTP) fields (like those generated by Google Authenticator) on sites that don’t support the YubiKey directly as an MFA token.
Using a smart card like a YubiKey can increase GPG’s security, especially if the key is generated on an air-gapped machine. This way the keyfile is stored in the hardware security token, and is never exposed to the internet.
In addition, you can even store an SSH key on the card, which will enable you to log in to remote Linux …
security ssh
Video Conference Integration
End Point’s Immersive and Geospatial Division is proud to announce the rollout of our new Video Conference Integration as an extension to the Liquid Galaxy platform’s capabilities.
Video Conference Integration allows a user to join Zoom calls or host meetings with a native, software-level view of the Liquid Galaxy. The necessary hardware and software configuration can be added to existing installations or included in a solution provided by our sales team.
Functionally, this allows users to remotely share and view the Liquid Galaxy through a high-definition live stream, giving end users the capability to test content remotely or join in on presentations from other offices. Furthermore, the participant view can be shared to the main display wall or to an integrated side screen so that presenters or members in the Liquid Galaxy room can see and interact with others in the meeting.
Our integration currently supports Zoom. We plan to support Google Meet, Microsoft Teams, and Cisco Webex in the future.
Why we created this
The need for flexibility due to the COVID-19 pandemic raised the question of how users could present to clients who were unable to travel or be present in-person. We …
visionport
Converting to Hugo
We recently converted the End Point website from Middleman to Hugo. I’ll go into more detail shortly, but the general result has been much better build times with less configuration and better support for local development.
Background
In 2017 we converted this website from a Ruby on Rails app to a static site. With tons of high-quality static site generator options, we could implement the shiny features used by our Rails site in 2009 with less overhead and quicker load times.
We also wanted to move away from Blogger to self-hosting our blog, using GitHub issues for comments. We ended up switching to Middleman, a static site generator written in Ruby, and had a mostly positive experience. Ruby was a good fit switching from Rails, and (if I remember correctly) Middleman had pretty competitive performance.
With over 1000 blog posts at the time, as well as lots of other pages, our site was quite slow to build—3.5 minutes when building with the full blog.
Middleman had a nice development server, but due to some server-side rewrites, we couldn’t use it. Instead, we got around the build times by writing a simple Ruby script to generate an HTML preview, letting our blog authors see …
!-->company design html static-site-generator
Full-text search on a budget: Xapian
Over the years I’ve seen and implemented different full-text search applications using various technologies: plain SQL, PostgreSQL, Elasticsearch, Solr, and most recently Xapian.
While Solr and Elasticsearch are very well known, Xapian, despite the fact that it’s available and packaged in all the major GNU/Linux distributions, doesn’t seem to be so popular, at least not among project managers.
But Xapian is fast, advanced, can be configured to do faceted searches (so the user can filter the search results), and my favorite, is fast to build and has virtually no maintenance overhead.
Its main feature is that it’s not a stand-alone application, like Solr or Elasticsearch, but instead it’s a library written in C++ which has bindings for all the major languages (as advertised on its homepage). It has also great documentation.
Now, being in the e-commerce business, my typical use-case is that the client’s shop needs something faster and better than a search using a SQL query against the products table. And beware, even implementing a non-trivial SQL-based search can burn more hours than setting up Xapian.
With Xapian you can prototype very quickly, without losing hours wading through …
!-->database search perl
Liquid Galaxy at Kansas State University
End Point recently installed a Liquid Galaxy system in Kansas State University’s Sunderland Foundation Innovation Lab! The seven-screen Liquid Galaxy will provide students with engaging, immersive, and user-friendly educational experiences. It will be a great asset to the Innovation Lab, enhancing a collaboration space used for meetings, webinars, presentations, and seminars. The Liquid Galaxy enables data visualization, map viewing via Google Earth, GIS, and more.
During the installation, End Pointer Josh Harless had the opportunity to work very closely with K-State’s team to ensure the system met their expectations and vision, such as by adjusting the screen angles multiple times to perfect viewing positions.
K-State experienced a terrible fire at Hale Library in 2018. Liquid Galaxy fit into their plans as they rebuilt in the aftermath. In an interview with Dr. Sheila Yeh about her role in reinventing K-State’s library, Dr. Yeh commented that “Information technology has been the catalyst for much of the transformation we find in today’s academic libraries.” She added that digital and information technologies such as the Liquid Galaxy are “enablers” that offer “new opportunities …
education visionport clients
Building REST APIs with .NET 5, ASP.NET Core, and PostgreSQL
Photo by Sam Beasley
This is old news by now, but I’m still amazed by the fact that nowadays .NET is open source and can run on Linux. I truly believe that this new direction can help the technology realize its true potential, since it’s no longer shackled to Windows-based environments. I’ve personally been outside the .NET game for a good while, but with the milestone release that is .NET 5, I think now is a great time to dive back in.
So I thought of taking some time to do just that, really dive in, see what’s new, and get a sense of the general developer experience that the current incarnation of .NET offers. So in this blog post, I’m going to chronicle my experience developing a simple but complete REST API application. Along the way, I’ll touch on the most common problems that one runs into when developing such applications and how they are solved in the .NET world. So think of this piece as a sort of tutorial or overview of the most common framework features when it comes to developing REST APIs.
There’s a table of contents at the bottom.
First, let’s get familiar with what we’re building.
What we’re building
The demo application
You can find the finished product on my …
dotnet aspdotnet csharp rest api postgres docker containers