Skip to content

Commit

Permalink
showcases: added 'Webserver Emulation Showcase'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgeorge309 committed Mar 22, 2024
1 parent 2e8f1af commit 26f53b8
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 1 deletion.
1 change: 1 addition & 0 deletions showcases/emulation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The following showcases demonstrate INET's emulation support:
.. toctree::
:maxdepth: 1

webserver/doc/index
babel/doc/index
voip/doc/index
voip/doc/mininet
Expand Down
76 changes: 76 additions & 0 deletions showcases/emulation/webserver/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Webserver Emulation Showcase
============================

Goals
-----

The goal of this showcase is to demonstrate the integration and operation of a
real-world application within an OMNeT++/INET simulation environment.
Specifically, it involves running a Python-based webserver and executing several
wget commands from host operating system environments. These are interfaced with
simulated network components, illustrating the capabilities of OMNeT++ in hybrid
simulations that involve both emulated and simulated network elements.

| INET version: ``4.6``
| Source files location: `inet/showcases/emulation/webserver <https://github.com/inet-framework/inet/tree/master/showcases/emulation/webserver>`__

The Model
---------

The showcase uses the following network:

.. figure:: media/Network.png

Here is the NED definition of the network:

.. literalinclude:: ../WebserverShowcase.ned
:start-at: WebserverShowcase
:language: ned

This network consists of a server connected to an Ethernet switch, along with a
configurable number of clients also connected to the switch. The server will run
a real Python webserver, and the clients will perform HTTP GET requests using
wget.


Configuration
-------------

The behavior of the model is controlled by the following INI file configuration:

.. literalinclude:: ../omnetpp.ini
:language: ini

This configuration sets up the real-time scheduler to synchronize the simulation
time with the wall clock time, allowing interaction between the simulated model
and real applications. It also specifies the number of clients in the simulation
and various other network settings.


Results
-------

Upon running the simulation, the webserver on the host OS will respond to HTTP
GET requests initiated by the wget commands from the simulated clients. The
interaction can be observed in the simulation's event log, and network
performance metrics such as response time and throughput can be analyzed based
on the simulation results.

The following terminal screenshot shows the running webserver and wget processes:

.. figure:: media/ps.png

The output of the processes appears in the Qtenv log window. Here is the output of one of the wget commands:

.. figure:: media/wget_module_log.png

Sources: :download:`omnetpp.ini <../omnetpp.ini>`,
:download:`WebserverShowcase.ned <../WebserverShowcase.ned>`,

Discussion
----------

Use `this
page <https://github.com/inet-framework/inet-showcases/issues/TODO>`__ in
the GitHub issue tracker for commenting on this showcase.
1 change: 1 addition & 0 deletions showcases/emulation/webserver/doc/media
2 changes: 1 addition & 1 deletion showcases/emulation/webserver/omnetpp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ unshare-user-namespace = true
*.client[*].app[0].process.command = "wget -o /dev/stdout http://192.168.0.1:8080/WebserverShowcase.ned"
*.client[*].app[0].process.startTime = 0.5s
*.client[*].app[0].process.onExit = "relaunch"
*.client[*].app[0].process.relaunchDelay = 1s
*.client[*].app[0].process.relaunchDelay = 0.1s
*.client[*].app[0].process.printStdout = true

0 comments on commit 26f53b8

Please sign in to comment.