Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:49:19+00:00 2026-06-01T09:49:19+00:00

For a little educational project intended as a community resource to help people learn

  • 0

For a little educational project intended as a community resource to help people learn Scala I am looking for a simple way to serve and process web pages in a background thread.

Minimal background: Scalatron is a multi-player game in which players pit bot programs (written in Scala) against each other. It is accompanied by a step-by-step Scala tutorial. Currently players need to use an IDE on their local machines to compile bots, which are then published into the game by copying them into a shared network directory. This is cumbersome. For the next version it would be nice to offer browser-based bot editing and publishing to maximally simplify the setup for both organizers and players.

I already got a background thread working that will compile Scala source code arriving on the server on the fly (obviating the need for a full IDE). Next I have to run a tiny web server to provide an access point for players and to handle bot uploads (this gets rid of the network share).

The requirements are very basic: initially I envisage serving a single page with an edit box and a “Go” button (= upload to server, compile & publish into game); I expect no more than 20 concurrent users with not more than one bot upload across all users every 5 or 10 seconds; I need to hold minimal state for each users (just a name) and I need to return compiler error messages to the user. Note that game screen updates would NOT be displayed in the browser but on a projector attached to the server machine. And primarily to allow for the simplest possible setup (double click on the game server .jar) I think it would be nice to run the web server in a background thread within the existing game server.

What is the most appropriate way to do this? Should I use some existing framework, like Play or Lift? Is there existing code for doing something very similar to this? Is it even reasonable to plan to run a web server in a background thread like this? Any advice is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:49:21+00:00Added an answer on June 1, 2026 at 9:49 am

    One of the most used small, embeddable web servers / servlet containers in the Java world is Jetty. Since Scala can easily use Java libraries, it should be easy to use this from Scala.

    This page shows some simple examples (in Java) on how to start it as an embedded HTTP server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey Simple little app for educational purposes, its a simple uitableview and I want
I bought The D Programming Language a little while ago. Great book, very educational.
Little help if you don't mind. Basically, I have 3 radio boxes and a
A little help here to figure out what error to run this piece of
I'm tring to learn C++ and I have a little problem. I have some
New to Stackoverflow, so first off, hello. I'm working on a little project for
I want to write a simple compiler for educational purposes in Delphi. I have
Little help for a javascript noob please... I have this in a .js file
Little complicated title, but i don't know how to tell in different way =D.
Little help needed if possible. I think I'm close just can't quite figure it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.