Shared posts

20 May 13:27

Use renewable energy guys.

by /u/Difficult_Listen1909
31 Jan 18:06

Code is cheap. Show me the talk

27 Jan 22:31

Quartet of shortstops leads top-10 prospects to consider for 2026

by Eric Karabell
Eric Karabell outlines the prospects most likely to have an impact on the 2026 fantasy baseball season.
14 Dec 19:52

'Free Software Awards' Winners Announced: Andy Wingo, Alx Sa, Govdirectory

by EditorDavid
This week the Free Software Foundation honored Andy Wingo, Alx Sa, and Govdirectory with this year's annual Free Software Awards (given to community members and groups making "significant" contributions to software freedom): Andy Wingo is one of the co-maintainers of GNU Guile, the official extension language of the GNU operating system and the Scheme "backbone" of GNU Guix. Upon receiving the award, he stated: "Since I learned about free software, the vision of a world in which hackers freely share and build on each others' work has been a profound inspiration to me, and I am humbled by this recognition of my small efforts in the context of the Guile Scheme implementation. I thank my co-maintainer, Ludovic Courtès, for his comradery over the years: we are just building on the work of the past maintainers of Guile, and I hope that we live long enough to congratulate its many future maintainers." The 2024 Award for Outstanding New Free Software Contributor went to Alx Sa for work on the GNU Image Manipulation Program (GIMP). When asked to comment, Alx responded: "I am honored to receive this recognition! I started contributing to the GNU Image Manipulation Program as a way to return the favor because of all the cool things it's allowed me to do. Thanks to the help and mentorship of amazing people like Jehan Pagès, Jacob Boerema, Liam Quin, and so many others, I hope I've been able to help other people do some cool new things, too." Govdirectory was presented with this year's Award for Projects of Social Benefit, given to a project or team responsible for applying free software, or the ideas of the free software movement, to intentionally and significantly benefit society. Govdirectory provides a collaborative and fact-checked listing of government addresses, phone numbers, websites, and social media accounts, all of which can be viewed with free software and under a free license, allowing people to always reach their representatives in freedom... The FSF plans to further highlight the Free Software Award winners in a series of events scheduled for the new year to celebrate their contributions to free software.

Read more of this story at Slashdot.

01 Dec 11:52

Java News Roundup: Spring Cloud, Quarkus, Hibernate ORM, JobRunr, LangChain4j, Java Operator SDK

by Michael Redlich

This week's Java roundup for November 24th, 2025, features news highlighting: point releases of Spring Cloud, Quarkus, Hibernate ORM, JobRunr, LangChain4j and Java Operator SDK; first release candidates of Hibernate Reactive and Gradle; and a maintenance release of Keycloak.

By Michael Redlich
26 Nov 22:37

BoxLang Redis Has Landed: Enterprise-Grade Caching, Pub/Sub, and Distributed Locking

by Cristobal Escobar


We're thrilled to announce the release of the BoxLang Redis Module (bx-redis) - a powerful addition to BoxLang that brings enterprise-grade Redis functionality directly into your applications. Whether you're building distributed systems, implementing real-time messaging, or need high-performance caching, this module has you covered.

🎯 What is the Redis Module?

The BoxLang Redis Module provides native Redis functionality, enabling you to connect to Redis instances, clusters, or Sentinel setups with ease. It seamlessly integrates with BoxLang's caching infrastructure while adding powerful new capabilities like publish/subscribe messaging and distributed locking.

⚡ Key Features

  • Native Redis Integration - Connect to standalone Redis, Redis Cluster, or Redis Sentinel
  • Built-in Cache Provider - Drop-in replacement for any BoxLang cache
  • Publish/Subscribe Messaging - Real-time event-driven architecture support
  • Distributed Locking - Coordinate actions across multiple servers
  • Session Management - Distributed session storage with automatic failover
  • High Performance - Connection pooling and optimized operations
  • Flexible Configuration - Environment-based settings and multiple cache instances

📦 Getting Started

Installing the Redis module is straightforward. It's available to BoxLang +/++ subscribers and includes a 60-day trial so you can explore all features risk-free!

# For Operating Systems using our Quick Installer
install-bx-module bx-redis

# Using CommandBox for web servers
box install bx-redis

🔧 Quick Configuration

Configure your Redis cache in Application.bx:

component {
    this.name = "MyApp";
    
    // Configure Redis cache
    this.caches[ "redis" ] = {
        provider: "Redis",
        properties: {
            host: "127.0.0.1",
            port: 6379,
            database: 0,
            password: getSystemSetting( "REDIS_PASSWORD", "" ),
            keyprefix: "myapp",
            timeout: 2000,
            maxConnections: 50
        }
    };
    
    // Use Redis for sessions (optional)
    this.sessionStorage = "redis";
}

That's it! Your BoxLang application is now Redis-enabled and all sessions will be distributed to Redis.

💾 Powerful Caching Made Simple

The Redis module works seamlessly with BoxLang's standard caching approaches:

// Cache user data for 30 minutes
userData = {
    userID: 123,
    name: "John Doe",
    email: "john@example.com",
    preferences: { theme: "dark", language: "en" }
};

cache( "redis" ).set( "user:123", userData, 1800 );

// Retrieve with elegant Attempt handling
userAttempt = cache( "redis" ).get( "user:123" );

if ( userAttempt.isPresent() ) {
    user = userAttempt.get();
    writeOutput( "Welcome back, #user.name#!" );
}

// Or use getOrSet for automatic fallback
user = cache( "redis" ).getOrSet(
    "user:123",
    () => loadUserFromDatabase( 123 ),
    1800
);

Query Caching

Speed up your database operations with transparent query caching:

// Automatic query caching
qry = queryExecute(
    "SELECT * FROM products WHERE category = :category",
    { category: "electronics" },
    {
        cache: true,
        cacheTimeout: createTimespan( 0, 0, 30, 0 ),
        cacheProvider: "redis"
    }
);

// Or use manual caching for more control
function getCachedQuery( sql, params = {}, timeout = 1800 ) {
    var cacheKey = "query:" & hash( sql & serializeJSON( params ) );
    
    return cache( "redis" ).getOrSet(
        cacheKey,
        () => queryExecute( sql, params ),
        timeout
    );
}

📢 Publish/Subscribe: Real-Time Messaging

One of the most exciting features is Redis Pub/Sub support, enabling real-time event-driven architectures:

Publishing Messages

// Publish a notification
redisPublish( 
    "notifications", 
    {
        type: "alert",
        message: "System maintenance starting in 5 minutes",
        timestamp: now()
    }
);

// Broadcast user events
redisPublish(
    "user-events",
    {
        event: "login",
        userId: 12345,
        timestamp: now()
    }
);

Subscribing to Channels

Create a subscriber using a closure:

// Subscribe with a lambda function
redisSubscribe(
    ( channel, message ) => {
        var data = deserializeJSON( message );
        println( "Received on [#channel#]: #data.message#" );
        
        // Handle different message types
        if ( data.type == "alert" ) {
            emailService.sendAlert( data );
        }
    },
    [ "notifications", "alerts", "user-events" ]
);

Or use a listener class for complex scenarios:

// NotificationListener.bx
class {
    
    public void function onMessage( string channel, string message ) {
        var data = deserializeJSON( arguments.message );
        
        println( "Processing notification: #data.type#" );
        
        // Route based on channel
        switch( arguments.channel ) {
            case "user-events":
                handleUserEvent( data );
                break;
            case "notifications":
                emailService.sendNotification( data );
                break;
            case "system-alerts":
                logService.logAlert( data );
                break;
        }
    }
    
    public void function onSubscribe( string channel, numeric subscribedChannels ) {
        println( "✓ Subscribed to #arguments.channel#" );
    }
    
    private void function handleUserEvent( struct data ) {
        // Custom event handling logic
        if ( data.event == "login" ) {
            analyticsService.trackLogin( data.userId );
        }
    }
    
}

// Start the subscriber
var listener = new NotificationListener();
var subscription = redisSubscribe(
    listener,
    [ "user-events", "notifications", "system-alerts" ],
    "redis"
);

Real-World Pub/Sub Example: Cache Invalidation

// When data changes, notify all servers
function updateUser( required numeric userId, required struct data ) {
    // Update database
    userDAO.update( userId, data );
    
    // Invalidate local cache
    cacheRemove( "user:#userId#" );
    
    // Tell other servers to invalidate
    redisPublish( "cache:invalidate:  user", userId );
}

// All servers listen and invalidate their caches
redisSubscribe(
    ( channel, message ) => {
        cacheRemove( "user:#message#" );
        println( "Cache invalidated for user: #message#" );
    },
    "cache:invalidate:  user"
);

🔒 Distributed Locking: Coordinate Across Servers

In clustered environments, you need to prevent multiple servers from executing the same code simultaneously. The bx:RedisLock component makes this trivial:

// Ensure only one server processes orders at a time
redisLock name="processOrders" cache="redis" timeout=5 expires=30 {
    // Only one server executes this block
    var orders = orderService.getPendingOrders();
    for ( var order in orders ) {
        orderService.processOrder( order );
    }
}

Scheduled Task Coordination

// Prevent duplicate scheduled task execution
component {
    
    function runDailyCleanup() {
        redisLock 
            name="dailyCleanup" 
            cache="redis" 
            timeout=0 
            throwOnTimeout=false 
        {
            // Only runs on one server
            cleanupService.performDailyMaintenance();
            println( "Daily cleanup completed on this server" );
        }
    }
    
}

Cache Warming Without Race Conditions

// Prevent multiple servers from warming cache simultaneously
redisLock 
    name="warmProductCache" 
    cache="redis" 
    timeout=2 
    expires=120 
    throwOnTimeout=false 
{
    if ( !cacheService.isWarmed() ) {
        println( "Warming cache on this server..." );
        
        // Expensive operation
        var products = productService.getAllProducts();
        
        // Cache for 1 hour
        cache( "redis" ).set( "products:all", products, 3600 );
        
        println( "Cache warmed successfully" );
    }
}

Database Migration Coordination

// Ensure migrations run only once across the cluster
redisLock name="dbMigration" cache="redis" timeout=30 expires=600 {
    var pendingMigrations = migrationService.getPendingMigrations();
    
    for ( var migration in pendingMigrations ) {
        println( "Running migration: #migration.name#" );
        migrationService.runMigration( migration );
    }
    
    println( "All migrations completed" );
}

Templating Syntax Support

<bx:RedisLock
    name="processQueue"
    cache="redis"
    timeout="10"
    expires="60"
>
    <bx:set var="item" value="#queue.getNextItem()#" />
    <bx:if condition="#!isNull( item )#">
        <bx:set var="result" value="#processItem( item )#" />
        <bx:set var="marked" value="#queue.markComplete( item )#" />
    </bx:if>
</bx:RedisLock>

🎯 Deployment Modes

The Redis module supports three deployment modes to match your infrastructure:

Standalone Redis

Perfect for development and single-server applications:

this.caches[ "redis" ] = {
    provider: "Redis",
    properties: {
        host: "127.0.0.1",
        port: 6379,
        database: 0
    }
};

Redis Cluster

For high-availability production environments with automatic sharding:

this.caches[ "redis" ] = {
    provider: "RedisCluster",
    properties: {
        hosts: "node1.redis.local,node2.redis.local,node3.redis.local",
        port: 6379,
        username: getSystemSetting( "REDIS_USERNAME" ),
        password: getSystemSetting( "REDIS_PASSWORD" ),
        useSSL: true,
        maxConnections: 1000
    }
};

Redis Sentinel

For automatic failover with master-slave replication:

this.caches[ "redis" ] = {
    provider: "RedisSentinel",
    properties: {
        sentinels: "sentinel1.myhost.com:26379,sentinel2.myhost.com:26379",
        port: 6379,
        password: getSystemSetting( "REDIS_PASSWORD" ),
        useSSL: true
    }
};

📚 Comprehensive Documentation

The Redis module is fully documented with detailed guides covering:

  • Installation & Configuration - All deployment modes and settings
  • Code Usage - Practical examples for caching objects, queries, and content
  • Scope Storage - Using Redis for session and client storage
  • Publish/Subscribe - Building event-driven architectures
  • API Usage - Advanced features and direct Redis access
  • Distributed Locking - Coordinating actions across clusters
  • Troubleshooting - Debugging tools and common solutions

Access the complete documentation at:
https://boxlang.ortusbooks.com/boxlang-framework/boxlang-plus/modules/bx-redis

MCP Server Support

You can even connect to our documentation via the Model Context Protocol (MCP):
https://boxlang.ortusbooks.com/~gitbook/mcp

💡 Use Cases

The Redis module excels in these scenarios:

  • Distributed Applications - Share state across multiple servers
  • Real-Time Systems - Push notifications and live updates
  • High-Performance Caching - Reduce database load dramatically
  • Session Clustering - Eliminate sticky sessions
  • Microservices - Coordinate between services
  • Event-Driven Architecture - Decouple system components
  • Rate Limiting - Implement distributed rate limits
  • Job Queues - Coordinate background processing

🎁 Get Access

bx-ldap is available exclusively to BoxLang +/++ subscribers. Join our subscription program to access this and other premium modules that extend BoxLang's capabilities:

  • Priority Support - Get help when you need it
  • Premium Modules - Access subscriber-only modules
  • Early Access - Be first to try new features
  • Exclusive Benefits - CFCasts account, FORGEBOX Pro, and more

🛒 Purchase Options

Ready to unlock bx-ldap and other premium modules? Choose your plan:

🌟 View BoxLang Plans & Pricing

Need help choosing the right plan or have questions? Contact us directly:

📧 info@boxlang.io

The post BoxLang Redis Has Landed: Enterprise-Grade Caching, Pub/Sub, and Distributed Locking appeared first on foojay.

02 Nov 16:12

Mock – An API creation and testing utility: Examples

04 Sep 01:17

The ultimate upset: How Amanda Anisimova beat Iga Swiatek

by D'Arcy Maine
Fewer than two months ago, Swiatek bested Anisimova in the Wimbledon final 6-0, 6-0. On Wednesday, Ansimova got her revenge.
04 Jul 16:24

LL Cool Js girl may go around the way, but he won't [Cool]

13 Apr 17:32

Tim Walz - “I know I’m doing something right when the Fox News crowd is all just bitching at me like crazy, I’m loving it. Elon Musk was crying last week - Tim is being mean to me”

by /u/RoyalChris
13 Feb 02:10

AIO my coworker stole my edible

by /u/tiawimm
AIO my coworker stole my edible

Recently I’ve (F23) gotten involved with the new guy (M29) on staff and yesterday would be the second time he’s come over to my place. After doing our thing, I had to take my dog out to pee & when I came back I noticed that there was crumbs on my stove that wasn’t there before. Now, before he even came over I made sure to clean, wiping down the counters & stove, so i immediately knew that crumb was new. I left it alone though, until this morning when I went to clean it up i noticed it was a crumb from my cookie edible. I looked at the bag holding my edibles and saw one was missing. Now..I just don’t know how to feel about it. He’s a really cool guy & we have a good time but isn’t this just very odd behavior? Especially it being only the second time over at my place, he felt so comfortable to just take an edible? A normal cookie is different but an edible? I texted him about it & he was very nonchalant like he just assumed I’d be okay with it. Idk..AIO? We work together tomorrow and I want to be cool but I’m just really taken aback.

submitted by /u/tiawimm to r/AmIOverreacting
[link] [comments]
03 Dec 23:44

Openlayer (YC S21) is looking for top-tier design engineers

03 Dec 23:41

New kind of wood glows in the dark thanks to the magic of honey mushrooms

by Allan Rose Hill
image: Empa

Researchers have created a new kind of biohybrid wood that glows in the dark. Its green light comes from the addition of the the fungus D. tabescens. Also known as the ringless honey mushroom, the fungus fuels "foxfire," the bioluminescence in decaying wood. — Read the rest

The post New kind of wood glows in the dark thanks to the magic of honey mushrooms appeared first on Boing Boing.

13 Nov 16:07

Liquid nitrogen-cooled Raspberry Pi 5

by Rob Beschizza
Photo: Skatterbencher

Like strapping a rocket to a milk float, cooling a Raspberry Pi 5 with liquid nitrogen had interesting results.

"I tried everything but couldn't turn this Raspberry Pi 5 into the World's Fastest Pi 5," writes Skatterbencher. "Unfortunately, we can't quite claim that title … despite the software reporting 4 GHz." — Read the rest

The post Liquid nitrogen-cooled Raspberry Pi 5 appeared first on Boing Boing.

30 Oct 20:39

Haiku OS domain has been hijacked

30 Oct 20:39

A deep history of Halloween

22 Oct 20:09

Photoshop these big binoculars [Photoshop]

20 Oct 12:45

Bloodied but not beaten, Man United comeback spurred by anger and Garnacho

by Rob Dawson
Man United came from behind to win against Brentford after Matthijs de Ligt's head injury, and there are some signs of progress under Erik ten Hag.
14 Oct 11:33

Highlights from the 2024 Basketball Hall of Fame ceremony

by ESPN staff
The 2024 class included Vince Carter, Chauncey Billups, Michael Cooper, Seimone Augustus and Doug Collins.
09 Oct 18:59

What Is LibreDrive (2019)

02 Oct 20:49

Kerr says all but Curry's starting job up for grabs

by Kendra Andrews
Steve Kerr on Tuesday emphasized "competition across the board" for the Warriors' starting spots -- and his aim for Golden State is to establish an identity out of that competition.
22 Sep 09:45

"New Jedi Order film delayed."

by /u/imaryans
15 Sep 22:23

Alvin Kamara, Rashid Shaheed have Saints rolling vs. Cowboys

by Katherine Terrell
The Saints' offense has dominated to start the season, including two Derek Carr TD passes in the first half Sunday.
14 Sep 22:13

When it comes to school lunches, it's not about the money, it's about punishment [Murica]

06 Sep 01:05

The Georgia school shooter case is starting to get very Crumbley [Followup]

04 Sep 00:23

5 Years of InfoSec Focused Homelabbing

24 Aug 19:09

MIT's first freshman class since affirmative-action ban is less diverse

23 Aug 01:21

Todd Phillips Says Hulk Hogan Biopic With Chris Hemsworth No Longer Happening

by /u/MarvelsGrantMan136
22 Aug 00:51

TIL the idiom "said the quiet part loud" originated from the Simpsons in 1995

by /u/Snakebite7
19 Aug 01:01

Another beachfront property in the Outer Banks becomes oceanfront property [Scary]