Trending December 2023 # Complete Guide To The Rmi Architecture # Suggested January 2024 # Top 16 Popular

You are reading the article Complete Guide To The Rmi Architecture updated in December 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Complete Guide To The Rmi Architecture

Overview of RMI Architecture

Web development, programming languages, Software testing & others

RMI stands for Remote Method Invocation. Java provides an API allowing an object residing in one JVM (Java Virtual Machine) to access or invoke an object running on another. The other JVM could be on the same machine or a remote machine. This is an interesting feature because, in real-time applications, it becomes very easy for Java applications to communicate directly with each other without any external communication mechanism. Also, it is always a need for secure communication between applications based on distributed application architecture.

RMI Design

Before we go into detailed architecture, we will understand the basic design of RMI architecture.

RMI API is provided in the package chúng tôi Let’s introduce two terms for the understanding of RMI design architecture. First is the client, the JVM that will call the remote object; second is the server, the JVM contains the remote object. So, the client will call the server, in this case, on the object for method invocation.

The server will then return the reference of the object to the client. The catch here is both the objects, i.e., local and remote, will appear as a local object on the server. There will be no differentiation between the two. The syntax of the methods of both objects is also the same. Therefore, the server JVM acts like a normal JVM without knowing of any object, whether it is local or remote.

The same object can be both a server and a client. The program obtains the remote object’s reference and utilizes it as a local object. The RMI infrastructure is responsible for finding the remote object, intercepting method calls, and processing the remote request remotely. The client invokes methods on the object only after obtaining a reference to a remote object.

RMI Architecture

Below is a diagram of RMI architecture in a simple way. You will find various forms of the same architecture on the internet, but we have a simple one to help explain it better.

The client and server applications are the respective JVMs of the client machine and server machines. In the RMI application, we write two programs: the client program, which resides on the client, and the server program, which resides on the server machine.

1. Application Layer

This layer is the actual systems, i.e. client and server, which are involved in communication. The Java program on the client side communicates with the Java program on the server side.

2. Stub

We have client objects from the design intro; In RMI architecture, it is known as Stub. It is an object that resides on the client machine and acts as a proxy for the remote object. It is like a gateway for the client program.

The stub has the same methods as a remote object. When the client calls on the stub object, the stub forwards this request to a remote object (Skeleton) via RMI infrastructure, which is then executed on the server.

Initiates connection with remote JVM.

Writes and transmits (Marshals) parameters to remote JVM.

Waits for the result.

Pass the received result to the caller.

3. Skeleton

The server object, which is located in a server machine, is referred to as the Skeleton. Stub communicates with the server application with the help of an intermediate Skeleton object.

The responsibility of the skeleton object is to send parameters to method implementation and send the return values back to the client.

Skeleton Performs the following events:

Invokes the method on an actual Remote object.

Transmit/pass the result to the caller.

4. Stub / Skeleton layer

The Proxy Layer, also known as the Stub/Skeleton layer, intercepts calls made by the client and redirects them to the remote object. Stub and Skeleton are the proxies for the client and server. The Stub and Skeleton objects are like an interface between an application and the rest of the RMI System.

This layer aims to transfer data to Remote Reference Layer by Object Serialization. This process of converting data/objects into a byte stream is known as Marshalling, and the reverse is known as Unmarshalling. Marshaling is performed when requesting the object from the server, and Unmarshalling is performed when data/object reference is received from the server.

5. Remote Reference Layer

The Remote Reference Layer connects the proxy layer to the RMI mechanism. This layer is responsible for communicating and transferring objects between client and server. This layer defines and supports the invocation semantics of the RMI connection.

The remote Reference Layer maintains the session during the method call. i.e., It manages the references made by the client to the remote server object. This layer is also responsible for handling duplicated objects.

6. Transport Layer

The transport layer is responsible for setting up communication between the two machines. This layer uses standard TCP/IP protocol for connection. This layer performs the actual transportation of data. This layer is part of the Remote Reference Layer.


The Remote Method Invocation (RMI) is a highly useful API provided in Java that facilitates communication between two separate Java Virtual Machines (JVMs). It allows an object to invoke a method on an object residing in another address space.

It provides a secure way for applications to communicate with each other. It achieves this functionality using concepts Stub (Client calling object) and Skeleton (Remote object residing on the server).

RMI is used to build distributed applications. It preserves the type of safety. RMI architecture minimizes the complexity of the application in a distributed architecture.

Recommended Articles

This has been a guide to RMI Architecture. Here we discussed the basic concept, RMI design, and architecture. You can also go through our other suggested articles to learn more –

You're reading Complete Guide To The Rmi Architecture

The Complete Guide To Supcase Cases


It’s not easy to find a phone that packs premium features and can still take a beating. Thankfully, it’s not too difficult to find an excellent rugged phone case to keep your investment safe. Durable options from Otterbox are a safe bet, but if you want a case with even more features, you need to have a look at Supcase cases. Here’s everything you need to know.

Are you looking for even more case options? Check out our guides to the best phone case brands and the best phone accessories you can buy.

Supcase tends to keep the options pretty simple. The most widely available case is the UB Pro. It’s probably available for whatever device you’re carrying around, but some of the more niche cases are only available for flagship releases. The iPhone 14 lineup has the broadest range of cases and colorways available. Here are a few things to consider as you start your case hunt:

Design and colorways: The Supcase UB Pro isn’t exactly the lightest or sleekest option on the market, but there are many colors to choose from. You can also try a few clear cases or the UB Vault, which doubles as a wallet.

How much protection do you want? Supcase cases come with various thicknesses and weights, and they offer different levels of security. Some are thin and support wireless charging, while other UB Pro models offer built-in screen protection.

What extra features are available? One of the biggest draws with the Supcase UB Pro is the built-in kickstand. The UB Vault adds a few wallet slots, and there’s a version of the UB Style with MagSafe compatibility.

Read also: The best Samsung Galaxy S23 Ultra cases

Best clear Supcase case: UB Style


Supcase’s UB Style is less focused on all-out protection, but it’s a great way to show off your phone. The back panel is a transparent polycarbonate, and you can choose from many colorful bumpers around the edges.

The raised bezels should offer solid all-around protection, though the UB Style doesn’t meet MIL-STD 810G requirements. Nevertheless, it’s a thinner option, so you should have no problem with wireless charging. For iPhone models, there’s also a MagSafe version called the UB Mag that’s ready for MagSafe accessories. All models have a built-in wrist loop to keep your phone securely in hand.

If you have an iPhone 14 or iPhone 13, you should have no problem tracking down a UB Style that meets your needs, though it’s a bit of a grab bag on the Android side. For example, the Galaxy S22 lineup is not supported, but the OnePlus 8 lineup is.

Get the UB Style for:

Read also: The best Apple iPhone 14 Pro Max cases

Technically, Supcase does not offer waterproof cases. However, the UB Pro is water-resistant with port covers and 360-degree coverage in many cases. For better waterproofing, invest in a waterproof pouch.

Each Supcase purchased comes with a one-year warranty.

 Yes, you can ship directly from Supcase to any country that offers door-to-door tracking. You can check out the entire list of supported countries right here. Many cases are also on Amazon if you’re looking for a speedy alternative.

It’s a US military designation for technology. Essentially, it means that the device or case has been through nearly 30 tests for heat, cold, shock, and more. You can learn more about the standard in our helpful guide right here.

Usually, a special wipe or cloth is the best way to clean and sanitize your Supcase case. Check out our phone cleaning guide to learn more about techniques and products.

Yellowing tends to happen over time with some clear cases, but it’s usually not a permanent problem. Mix warm water with a drop or two of dish soap and scrub with a toothbrush. Let the case air dry for a while, and you should be good to go.

Complete Guide To Jdbc Getconnection

Introduction to JDBC getConnection

The following article provides an outline for JDBC getConnection. Java database connectivity gets connection method is used for establishing the connection between the java application program where you are working and the database that will be used for storing and manipulating the data of your application. There are certain basic steps that you should follow to establish the connection. There are also multiple approaches using which you can establish the connection.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Connection Establishment in JDBC

Import all the necessary packages: All the java programming packages that will be required in you program should be included and imported right at the beginning of the file by using the import statement.

Registration of JDBC driver: The loading of the required driver inside the memory of the system is done by the Java Virtual Machine for the handling and fulfilling of all the further requests that will be made.

Formation of the uniform resource locator un database: The URL plays an important role and is necessary to build while establishing a connection. This helps in recognizing the appropriate address and the target database which needs to be connected.

Object creation for connection: getConnection() method is given the call in this step which is an object of the driver manager that will, in turn, create an object of the connection establishing the actual connection to the database from our application.

Syntax of JDBC getConnection

Given below is the syntax in detail about each of the steps seen above:

1. Import Package

The syntax of importing is basically writing the import statement followed by the name of the package that you wish to import. This helps the java compiler to identify the classes that should be called and referred. This import statements are always written in the beginning part of the code covering the first few lines. For most of the manipulations related to SQL database operations, we will import the following two packages.

Import java.math. *; Import java.sql.*;

The first package helps in support of big integers and big decimals while the second package is used in the standard programs of JDBC.

2. Driver Registration

The class files of the driver get loaded inside the memory which can be further used further by interfaces of JDBC. The registration of the driver can be done by using either of the two approaches mentioned below.

a. Using Class.forName()

The following example demonstrates the syntax of the same.

try { Class.forName("com.mysql.jdbc.Driver"); } catch(ClassNotFoundException sampleException) { System.out.println("Sorry! We cannot load the class for the driver"); System.exit(1); }

b. Using DriverManager.registerDriver()

When we are making the use of the Java Virtual Machine which is non- JDK compliant like Microsoft then we can make the use of this static method called DriverManager.registerDriver() that will help you to register your driver.

try { Driver sampleExampleDriver = new com.mysql.jdbc.Driver(); DriverManager.registerDriver( sampleExampleDriver ); } catch(ClassNotFoundException sampleException) { System.out.println("Sorry! We could not establish the driver registration"); System.exit(1); } Formulation of URL for Database

We can create the connection by using the DriverManager.getConnection() method that is overloaded in three ways.

geConnection(String UniformResourceLocator, String username, String associatedPassword)

geConnection(String UniformResourceLocator)

geConnection(String UniformResourceLocator, Properties associatedProps)

Format of Uniform Resource Locator Name of the JDBC Driver Relational Database Management System

jdbc:oracle:thin:@name of host:number of port:name of database oracle.jdbc.driver.OracleDriver Oracle

jdbc:sybase:Tds:name of host: port Number/name of database com.sybase.jdbc.SybDriver Sybase

jdbc:mysql://name of host/ name of database com.mysql.jdbc.Driver


jdbc:db2:name of host:port Number/name of database DB2

We can specify the information of the connection URL of the user name, associated password and the port address information of the host along with IP address and the TCP/ IP protocol for transportation of the data containing request and response.

The below extract shows the sample of the info that will show this method.

Connection conn = DriverManager.getConnection(URL_TO_CONNECT, USERNAME, ASSOCIATED_PASSWORD);

Alternatively, you can also specify just a single url for connection establishment but in this case, the url should contain the information of username and the password in it as shown in the below sample.

Connection sampleConnection = DriverManager.getConnection(educba_URL);

One more method includes the specification of properties username and password same as above.

Closing the Connection

For sample statement consider shown below:

sampleConnectionObject.close(); Example of JDBC getConnection

Given below is the example mentioned:

Let us consider one sample program for setting up the connection by using the getConnection() method.


import java.sql.Connection; import java.sql.DriverManager; public class sampleEducbaPayalConnectionEstablishment{ public static void main(String args[]) throws ClassNotFoundException { String sampleURL; Connection sampleConnection = null; try { Class.forName("com.mysql.jdbc.Driver"); sampleURL="jdbc:mysql://localhost:3306/educba"; username="root"; associatedpassword=""; sampleConnection = DriverManager.getConnection(sampleURL,username,associatedpassword); System.out.println("Successfully Established the connection!"); sampleConnection.close(); System.out.println("The established connection has been closed!"); } catch (Exception sampleException) { System.out.println(sampleException.toString()); } } }



The creation of the connection to the database from the java application can be done by using the method getConnection by using the methodologies. Note that creating the connection consumes memory. Hence, after you are done with performing all your operations related to the database, you should close the created connection to clear up the resources.

Recommended Articles

This is a guide to JDBC getConnection. Here we discuss the introduction, how it works & the steps required? formulation of URL for database & example. You may also have a look at the following articles to learn more –

Complete Guide To Db2 Row_Number

Introduction to DB2 row_number

DB2 ROW_NUMBER is a function provided by IBM for generating a sequential number that can begin from 1 and continuously show an iterating value in the column name specified. Analytical Processing (OLAP) and is itself a window function. It is only possible because of this function that we don’t need to reiterate the data of the table again and again to induce a functionality of getting incremental values. It can be used in many real-time applications. One of the most frequent and popular usages of this function is pagination. In this article, we will see how we can use the ROW_NUMBER function, its syntax, and examples.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others


The ROW_NUMBER() function will generate a column that will contain the integer values beginning from the value assigned to the first row. One of the most useful but optional features in this syntax is the usage of partitions which can help us to assign the sequential number based on the groups or partitions of the data.

In the above syntax, the clause for partition is optional in nature. If we use this function, the result set rows are firstly divided into multiple groups based on the partition key and then the ROW_NUMBER function is implemented on each of the grouped data. By default, if we don’t specify the clause for partitions in our query statement then all the rows of the result set are considered as a single partition or group and then the function is implemented for it. The clause for the partition of syntax has the following syntax for specifying the partition key –

PARTITION BY [key1, key2, ….keyn]

Where key1, key2, ….keyn can be the names of the columns or any expression value on the basis of which we want to segregate the result.

The clause for ordering is used to order the data that is generated in the result set based on one or more order keys that are specified. The ORDER BY clause works individually for each partition. We can either specify the ordering to be done in ascending or descending manner depending on our requirement by using ASC or DESC at the end of the ORDER BY clause. By default, if we don’t specify either of them the ordering is done in ascending mode. We can also specify whether we have to display all the NULL values first or last in the result set by using the NULLS FIRST and NULLS LAST statements in the syntax of the clause for the order. The syntax of the order clause is shown below –

ORDER BY sort_exp1 [,sort_exp2, ..., sort_expn]

In the above syntax, the sort_exp1 [,sort_exp2, …, sort_expn] is the list of expressions like columns or collective use it number which is different with respect to each row in the result set. The specification of ASC or DEC is optional in nature to specify the order of the column values and result in ascending or descending order explicitly. By default, it’s done in ascending order. Many times, there is a requirement to display the data in the format where all the NULL values are displayed in the top at first in the result or all the result set is ordered in a way where all the rows with NULL values in it are displayed at the end. This is done by using the NULLS FIRST or NULLS LAST respectively.

Examples of DB2 row_number

Let us take one table named Sales_Customers which is created by using the following query statement –

) ;

The content of the table can be seen by using the following query statement –

SELECT * FROM Sales_Customers;

Which gives the following output –

As it can be seen the table has 14 rows in it and all are sorted based on the primary key customer_id when they are retrieved. We can assign the row number value as a pseudo column to see which row is on which number and how many rows are there by using the window function named ROW_NUMBER and using the following query statement for the same –


The output of the above query statement is as shown below –

If we want to order the data based on the amount of purchase done by that customer. We can do that by using the following query statement and mentioning the column name in the order by clause of the ROW_NUMBER() function –


The output of the above query is as shown below –

row_number <= 15

In big_customers the order by clause made sure that the customers are ordered and sorted based on the amount of bill of customers. Further, the ROW_NUMBER got applicable to all the resulted data having bill amounts arranged in ascending order, hence unique sequential numbers got assigned to each row, and by using the where clause we filtered out all the customers whose row numbers were in the range of 7 to 15 exclusive.

Suppose that we want the top 3 customers from the sales_customers table then we can do that by applying the partition on customer_id and setting the result set in the descending order of the bill amounts of the customer by using the following query statement –


which gives the following output –


We can make use of the ROW_NUMBER function to generate a pseudo column in the result set which is sequential in nature and can be used to assign the unique incremental values to rows.

Recommended Articles

This is a guide to DB2 row_number. Here we discuss the Introduction, syntax, and examples with code implementation. You may also have a look at the following articles to learn more –

Complete Guide To Archicad Shortcuts

Introduction to ArchiCAD Shortcuts

Start Your Free Design Course

3D animation, modelling, simulation, game development & others

Short cut commands of option of File Menu

The very first thing which we do before starting any project or work we create a New file or document and this option you can find in the File menu and for a shortcut of it you can press the Ctrl + N button on the keyboard.

By pressing Ctrl + Alt + N keys of the keyboard you can go for the New and Reset option of this menu.

Ctrl + O keys refer to shortcut key for opening any work, image, or any supported file format of this software.

You can close any window or tab of this software very quickly by pressing the Ctrl + W buttons of the keyboard.

The very important thing you do is to save your document and this option is also available in the File menu but you can press Ctrl + S for saving your work.

Ctrl + Shift + S is for Save as the option of this menu that means if you already saved your document and want to save it in another format or with another name then you can go with this option and its shortcut.

You Plot your work by pressing the Ctrl + P button of the keyboard and for its setup dialog box press the Ctrl + Shift + P button. You can also use Ctrl + P for printing any work.

Ctrl + Q are used for quitting this application program that means when you want to close the whole software then you can go with it.

File Modules and XREF commands’ short cut:

For placing the module in this software you can press Ctrl + ’ keys of the keyboard.

By pressing Ctrl + Shift + ’ you can go for Hotlink Manager.

Shortcut commands of File GDL Objects:

Press Ctrl + Shift + N for a new object in your work.

Ctrl + Shift + O will help for opening any object.

Ctrl + Shift + N can use for the ‘Save Project As’ option.

Edit menu Commands:

We need to undo our steps much time so this shortcut is very helpful during our working and it is Ctrl + Z not only this you can redo any steps you it undo by mistake and press Ctrl + Shift + Z for this.

There may be a lot of elements in our work and many times we need to select them all so press Ctrl + A for selecting them by one shortcut key.

Ctrl + B allows you to repeat your last used command.

For dragging any element of your designed component you can press Ctrl + D keys.

Press Ctrl + E for rotating an object or element.

Ctrl + F can be used for the Split command.

Stretch can do by pressing the Ctrl + H keys of the keyboard.

Ctrl + M keys will work for the mirror command.

Resize can do by pressing Ctrl + K keys.

For Adjust command press Ctrl + – buttons of the keyboard.

Press Ctrl + 0 for the ‘Trim to roof’ command during your designing work.

You can set tools as per your requirement and press Ctrl + T for the tool settings box.

For ‘Editing selection set’ you can go with Ctrl + Shift + T.

With Ctrl + Shift + D you can drag a copy of an object or element and same as for rotating it, you can press Ctrl + Shift + E, and for mirroring a copy of the object go with Ctrl + Shift + M keys of the keyboard.

There is also a shortcut key for editing text. So let us discuss them too.

Edit Commands for Text:

For finding and replace any particular text in your designing we use the Find and Replace command and the shortcut of it is Ctrl + H. You can press Ctrl + F to simply find any text in your design.

Tools’ shortcut keys:

Ctrl + G can be used for grouping a number of elements or objects and you can go with Ctrl + Shift + G for ungrouping them if there is no need for their grouping.

Alt + G will suspend a group and Alt + Shift + G can use for the Auto Group option.

The patch can be created by pressing Ctrl +; keys of the keyboard.

Ctrl + = will work for Explode command.

Press Shift + F6 functional key of a keyboard for ‘Bring to Front’ option and by pressing on by F6 you can use the ‘Bring Forward’ option. F5 can use for the ‘Send backward’ option and Shift + F5 is used for Send to back option.


There is so many short cut in this software which makes our work easy and you need not to worry about remembering them just start working with this software and use short cut keys for any command instead of using traditional ways for that and with a pass of time it will become your habit.

Recommended Articles

This is a guide to ArchiCAD Shortcuts. Here we discuss the introduction and Short cut commands of option of File Menu. You can also go through our other suggested articles to learn more –

The Complete Guide To Building A Rooftop Garden

Before man was, gardening waited for him. The ultimate trade awaiting its ultimate practitioner.

Ok fine, Cormac McCarthy was actually talking about war when he wrote that, but if you ask me, it still holds true for gardening.

Along with mastering fire, the purposeful cultivation of plants is widely considered to be one of the technological leaps that set humans on the path to complex civilization, for better or for worse. Speaking as a city dweller and inhabitant of the current iteration of said complex civilization, we need gardening now, more than ever, to smooth out some of the rougher edges of this weird world we’ve built for ourselves.

Gardening can be a great way to relax and free your mind from the numbing pressures of The Screen. Futzing around with plants in the sun helps us reconnect with the glories of the natural world that we’ve become increasingly isolated from. And, as this bizarrely dark listicle puts it, gardening “reminds us of the cycle of life,” and thus helps us “come to terms with that most universal of anxieties: death.”

But hey, let’s not worry about that just yet. The tall, skinny guy with the scythe and black robes comes for us all, but until he rings the buzzer, let’s squeeze all the joy we can out of the here and now.

Which brings us back to gardening, and how to get into it.

For those of us who live in the suburbs or, even better, the country, the process is easy: go outside and plant some seeds in the ground, then watch them grow. For those of us living in a city, it’s a bit more complicated.

But fear not. I have toiled for countless hours and spent thousands of dollars to thread that needle, so you don’t have to. After four years of banging my head against the wall in an attempt to garden despite living in a tiny apartment in Brooklyn, New York, I have finally figured out a design that is relatively simple, works well, and, most importantly, is extremely low-maintenance once it’s set up.

The author with his completed (and thriving) rooftop garden. Sheri Barclay

As long as you have rooftop access and a relatively chill landlord, there’s an excellent chance you can learn from my mistakes and build yourself a rooftop garden. It should only cost you a few hundred bucks and a weekend or two of your time—even less if you’ve already got spare materials lying around and are capable of getting out of bed before 1 p.m. on the weekend.

It’s really just three things

There are an endless variety of ways to garden on a roof, but my setup consists of three components intended to address what I consider to be the three main problems confronting the would-be rooftop gardener.

A PVC structure wrapped in bamboo fencing to protect the plants from wind, which can be brutal on a roof.

Self-watering containers to reduce the amount of time spent lugging water up to the roof and to ensure that, if you don’t do so for a few days, the plants won’t suffer.

A homemade soil mixture to encourage a bountiful harvest by providing the plants with primo dirt that won’t require constant fertilizing.

If you’re just starting out and all that seems overwhelming, you can halve the time required to put this together by foregoing the custom soil mix and simply adding organic fertilizers to store-bought potting soil (only bags marked as “potting soil,” no “in-ground” or “raised bed” stuff, as it’s much heavier and will not distribute water properly). This will work fine, but not as well as mixing it up from scratch.

It should go without saying, but definitely ask your landlord for permission before building a rooftop garden, and make sure the roof in question has the structural integrity necessary to support one. Most apartment building roofs shouldn’t have a problem supporting at least a small garden, but you do need to scope it out first. If in doubt, ask your landlord.

Build the structure

This part can seem intimidating, but it’s actually fairly straightforward, as long as you think ahead.

First, decide where you want your garden to go. Measure the area, and plan the size of your structure accordingly.

Mine, for example, is 12 feet long, 8 feet wide, and 8 feet tall. Your length and width may vary, but I recommend a simple square or rectangle with 8-foot-tall sides to keep the wind from roughing up your plants. You’ll also want to leave an opening on one side so you can get in and out.

Seriously, you don’t need to be a good artist to sketch a blueprint. Ryan Boysen

What you’ll need:

The materials listed below are standardized for one 4-by-4-by-8-foot section of garden space, which is the basic building block of my design. As you add square footage, you’ll need slightly fewer pieces for each additional section, as they will share poles and joints.

Materials (for one 4-by-4-by-8-foot block of garden space)


Hacksaw (or PVC pipe cutter)

Knife (or scissors)

Permanent marker

Once you’ve got your tools and materials, measure the pipe to your desired length, mark it, cut it, and start connecting. It’s OK to be a little confused during this step, but once you put a few pieces together it should begin making sense pretty quickly. When everything looks good, go back and glue all the joints together with the PVC cement.

Once your frame is complete, wrap the bamboo around it and secure the fencing with zip ties or string. This may take an hour or two, but it’s worth going slow and doing a thorough job. Your plants and neighbors will thank you the next time a storm rolls through. Tie the corners to something heavy to prevent your garden from flying away—wooden pallets work well if you’re using those to support your plants, but you can also anchor the structure to the handles of your planters.

Craft the self-watering containers

There are many ways to build self-watering containers, but the basic idea is this: each one has a built-in, refillable water reservoir and a wicking mechanism that brings that water up into the soil.

And while this how-to deals with 5-gallon buckets, it’s easy to extend the underlying principles to larger containers and other types of materials once you get the hang of things.

Self-watering containers, like those seen here, mean that even if you’re not always around to take care of your garden, your plants will still have enough to drink. Ryan Boysen

What you’ll need:

Materials (for one container)

2 plastic 5-gallon buckets (cheaper in bulk)

2 sponges

3 strips of foot-long cotton material (one t-shirt will make enough for about a dozen containers, but it must be 100% cotton—synthetic material doesn’t wick properly)

A 3-foot length of 3/4-inch PVC pipe

A large funnel (you only need one, no matter how many containers you have)

A wooden pallet or something else to elevate the planter (optional)



1-inch drill bit

1/4-inch drill bit

Permanent marker

Scissors (or a boxcutter)

So, you’ve got two buckets. Put one inside the other and measure where the bottom of the inside bucket reaches on the outside bucket. Mark that spot with your marker, then draw a little circle a half-inch below that. Separate the buckets and drill a 1/4-inch hole within the circle you marked on the outside one, then set that bucket aside.

Now take the other bucket, flip it upside-down and drill a 1-inch hole in the middle of its bottom. Drill another 1-inch hole near the outside of the bottom. Now drill a dozen or so 1/4-inch holes all around.

Now, take two sponges and use a knife or scissors to cut a 2-inch-long gash in the center of each sponge. Take your cotton strips and thread them through one sponge, so about 4 inches of material sticks out the other side.

Stuff that material through the big hole in the center of the inside bucket so the sponge and the majority of the fabric remains within the bucket. Take the other sponge, place it on the outside of the bucket, and thread the dangling strips through it, making sure it’s snug against the bottom of the bucket. These pieces of cloth will wick water from the reservoir into the soil, and the sponges will ensure they stay in place.

How to set up the inside bucket, from left to right: drill holes in the bottom, place a sponge inside and thread the fabric strips through it, and then thread the cloth through a sponge on the outside. Ryan Boysen

Now put the inside bucket back into the outside bucket. Jam the 3-foot length of PVC pipe into the other 1-inch hole. With the aid of the funnel you’ll use this pipe to fill the reservoir.

When you eventually load the inside bucket with soil, try to make sure that the cotton strips extend upward to ensure even water distribution throughout the soil mixture. I’ll usually fill it one-third of the way with dirt, lay one strip across that layer, add the next third and do the same thing with another strip, then try to bury the remaining strip just below the surface.

For you visual learners, this video directly inspired my container design and it’s a great way to see the process play out.

When putting the buckets in your garden, it’s best to place them on top of something to keep them from sitting directly on the roofing material. This will ensure proper drainage and prevent roof damage from any water trapped under the containers. I used wooden pallets, but pretty much anything that provides a bit of elevation will work just fine.

You should only need to fill your containers with water once or twice a week, depending on the size of the plants they hold and how much it has rained.

Mix the soil

You want your soil to be equal parts compost, vermiculite, and sphagnum moss—the amounts below are approximate.

Vermiculite and the moss are usually sold in bags of 1-3 cubic feet—more than enough for a single container. To save you the conversion time: one 5-gallon bucket holds about 0.7 cubic feet of material, so you’ll need a little less than 0.25 cubic feet of each (or about 1.5 gallons).

Compost is the most important element, and you can find the good stuff at nearby community gardens or composting operations. You can make your own, too, but it might be hard to produce enough if you’re building a large garden. Still, never settle for the store-bought stuff.

For best results, it helps to sift the compost and moss to filter out any large chunks. Doing so helps ensure even water distribution throughout the soil, but if you’re tired and just want to get to the actual gardening, you can skip this step without too much worry.

What you’ll need:

Materials (for one container)

1/4 cubic foot of vermiculite

1/4 cubic foot of sphagnum moss

1/4 cubic foot of compost

3 tablespoons of Azomite

3 tablespoons of kelp meal

3 tablespoons of all-purpose fertilizer

A large tarp

3 tablespoons of worm castings (optional)


If you’re not going to sift, simply dump the proper amount of each material onto your tarp. If you’re mixing soil for multiple containers, simply scale it up—your only limits are tarp size and how hard you want to work. If you’ve got a large container to mix in, that works, too, but a tarp is probably more practical for most apartment-dwellers.

Sprinkle kelp meal, all-purpose fertilizer, worm castings (if available), and Azomite on top. I usually use about 1 cup for six buckets worth.

Now mix it all up. Don’t half-ass it.

If you have a large container to mix the soil in, great! But if not, a tarp works just fine. Ryan Boysen

I had to pick out a bunch of worms during this process, so if your compost is also full of ‘em (which means the compost is healthy), keep them safe. Just put a little bit of compost in a small container, stash the worms in there, and then either release them into soil somewhere, or return them to wherever you got your compost. Unfortunately, the conditions inside your containers will probably not be optimal for worm survival, and a bunch of dead worms in your containers could lead to fungus or disease problems down the line.

When your soil is well-combined, put it in your containers.

If you want to sift the compost and moss, you’ll need to build a sifter.

What you’ll need:

Materials (for the sifter)

2 2-foot-long 2-by-4s

2 4-foot-long 2-by-4s

A piece of 1/4-inch mesh (at least 4 feet long and 2 feet wide)

1.5-inch screws


Make a rectangle with your 2-by-4s and screw the corners together. Cut a length of mesh to fit over it all, letting the edges overlap the wooden frame so you can fasten it in place. Then, staple it tightly to the wood with the staple gun.

Place the sifter above your tarp by putting it on top of two chairs, boxes, tables, or whatever you have that’ll keep it elevated. Dump the compost into the sifter, then rub it around with your gloved hands until most of it has fallen through. Put any large bits into another container and set it aside.

Now do the same with sphagnum moss. You don’t have to sift the vermiculite.

This video is a great way to see what the process looks like.

As you get more into it, I’d recommend experimenting with liquid fertilizers to give your plants some extra oomph, but the nutrients in this mixture should be more than enough to get you, and your plants, started.

Now get out there and get gardening, and remember this: even though a man’s at odds to know his mind because his mind is aught he has to know it with, as long as you’re gardening you won’t need to trouble yourself with all that. Just stand among the screaming leaves and call down the lightning, and know that the time has come for you to reap.

Update the detailed information about Complete Guide To The Rmi Architecture on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!